Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appsync: Migrate to AWS SDK v2 #36568

Merged
merged 210 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
9c276d1
appsync: Migrate to AWS SDK v2
mattburgess Mar 25, 2024
56d2743
Revert "appsync: Migrate to AWS SDK v2"
ewbankkit Jun 19, 2024
1a05bf1
Merge branch 'main' into HEAD
ewbankkit Jun 19, 2024
c8f760f
appsync: Use AWS SDK for Go v2.
ewbankkit Jun 19, 2024
89641e7
Run 'make gen'.
ewbankkit Jun 19, 2024
bacee02
Run 'go get github.com/aws/aws-sdk-go-v2/service/appsync@v1.32.6 && g…
ewbankkit Jun 19, 2024
90e4340
Add 'names.AppSyncEndpointID'.
ewbankkit Jun 19, 2024
6a7b1bf
r/aws_appsync_api_cache: Migrate to AWS SDK for Go v2.
ewbankkit Jun 19, 2024
d4333a0
r/aws_appsync_api_key: Migrate to AWS SDK for Go v2.
ewbankkit Jun 19, 2024
c12170c
r/aws_appsync_datasource: Migrate to AWS SDK for Go v2.
ewbankkit Jun 19, 2024
f928f46
r/aws_appsync_domain_name: Migrate to AWS SDK for Go v2.
ewbankkit Jun 19, 2024
bbe739b
r/aws_appsync_domain_name_api_association: Migrate to AWS SDK for Go v2.
ewbankkit Jun 19, 2024
90bc906
r/aws_appsync_function: Migrate to AWS SDK for Go v2.
ewbankkit Jun 20, 2024
6a61917
r/aws_appsync_graphql_api: Migrate to AWS SDK for Go v2.
ewbankkit Jun 20, 2024
8abc8a5
r/aws_appsync_type: Migrate to AWS SDK for Go v2.
ewbankkit Jun 20, 2024
75a893d
r/aws_appsync_resolver: Migrate to AWS SDK for Go v2.
ewbankkit Jun 20, 2024
0b3bfce
appsync: Migrate sweepers to AWS SDK for Go v2.
ewbankkit Jun 20, 2024
69541d2
Run 'make fix-constants PKG=appsync'.
ewbankkit Jun 20, 2024
6bf8cd2
Fix semgrep 'ci.aws-in-func-name'.
ewbankkit Jun 20, 2024
f618750
Fix semgrep 'ci.typed-enum-conversion'.
ewbankkit Jun 20, 2024
e9bdc50
Fix golangci-lint 'unparam'.
ewbankkit Jun 20, 2024
cb80290
Merge branch 'main' into HEAD
ewbankkit Jun 20, 2024
b290008
go get github.com/aws/aws-sdk-go-v2.
ewbankkit Jun 20, 2024
705a0d5
go get github.com/aws/aws-sdk-go-v2/config.
ewbankkit Jun 20, 2024
f54ccb6
go get github.com/aws/aws-sdk-go-v2/feature/s3/manager.
ewbankkit Jun 20, 2024
4d3f0b0
go get github.com/aws/aws-sdk-go-v2/service/accessanalyzer.
ewbankkit Jun 20, 2024
d33aa0d
go get github.com/aws/aws-sdk-go-v2/service/account.
ewbankkit Jun 20, 2024
1c97600
go get github.com/aws/aws-sdk-go-v2/service/acm.
ewbankkit Jun 20, 2024
db1f414
go get github.com/aws/aws-sdk-go-v2/service/acmpca.
ewbankkit Jun 20, 2024
bed1c34
go get github.com/aws/aws-sdk-go-v2/service/amp.
ewbankkit Jun 20, 2024
c2b6796
go get github.com/aws/aws-sdk-go-v2/service/amplify.
ewbankkit Jun 20, 2024
5d0e56f
go get github.com/aws/aws-sdk-go-v2/service/apigateway.
ewbankkit Jun 20, 2024
648d5c9
go get github.com/aws/aws-sdk-go-v2/service/apigatewayv2.
ewbankkit Jun 20, 2024
389afb0
go get github.com/aws/aws-sdk-go-v2/service/appconfig.
ewbankkit Jun 20, 2024
bddeeb8
go get github.com/aws/aws-sdk-go-v2/service/appfabric.
ewbankkit Jun 20, 2024
dad742b
go get github.com/aws/aws-sdk-go-v2/service/appflow.
ewbankkit Jun 20, 2024
08c2da3
go get github.com/aws/aws-sdk-go-v2/service/appintegrations.
ewbankkit Jun 20, 2024
5874cc4
go get github.com/aws/aws-sdk-go-v2/service/applicationautoscaling.
ewbankkit Jun 20, 2024
981f349
go get github.com/aws/aws-sdk-go-v2/service/applicationinsights.
ewbankkit Jun 20, 2024
f48877a
go get github.com/aws/aws-sdk-go-v2/service/applicationsignals.
ewbankkit Jun 20, 2024
a816d80
go get github.com/aws/aws-sdk-go-v2/service/apprunner.
ewbankkit Jun 20, 2024
cd9164d
go get github.com/aws/aws-sdk-go-v2/service/appstream.
ewbankkit Jun 20, 2024
787dd59
go get github.com/aws/aws-sdk-go-v2/service/appsync.
ewbankkit Jun 20, 2024
1cb5b31
go get github.com/aws/aws-sdk-go-v2/service/athena.
ewbankkit Jun 20, 2024
5274f38
go get github.com/aws/aws-sdk-go-v2/service/auditmanager.
ewbankkit Jun 20, 2024
424ce10
go get github.com/aws/aws-sdk-go-v2/service/autoscaling.
ewbankkit Jun 20, 2024
2f5c153
go get github.com/aws/aws-sdk-go-v2/service/autoscalingplans.
ewbankkit Jun 20, 2024
4f5b92f
go get github.com/aws/aws-sdk-go-v2/service/backup.
ewbankkit Jun 20, 2024
f125a1d
go get github.com/aws/aws-sdk-go-v2/service/batch.
ewbankkit Jun 20, 2024
6deb558
go get github.com/aws/aws-sdk-go-v2/service/bcmdataexports.
ewbankkit Jun 20, 2024
054d8a5
go get github.com/aws/aws-sdk-go-v2/service/bedrock.
ewbankkit Jun 20, 2024
158ff3e
go get github.com/aws/aws-sdk-go-v2/service/bedrockagent.
ewbankkit Jun 20, 2024
c7fc8c6
go get github.com/aws/aws-sdk-go-v2/service/budgets.
ewbankkit Jun 20, 2024
0e0e1a3
go get github.com/aws/aws-sdk-go-v2/service/chatbot.
ewbankkit Jun 20, 2024
02aff98
go get github.com/aws/aws-sdk-go-v2/service/chimesdkmediapipelines.
ewbankkit Jun 20, 2024
5f4c123
go get github.com/aws/aws-sdk-go-v2/service/chimesdkvoice.
ewbankkit Jun 20, 2024
9b0f569
go get github.com/aws/aws-sdk-go-v2/service/cleanrooms.
ewbankkit Jun 20, 2024
f144ca8
go get github.com/aws/aws-sdk-go-v2/service/cloud9.
ewbankkit Jun 20, 2024
5af35a9
go get github.com/aws/aws-sdk-go-v2/service/cloudcontrol.
ewbankkit Jun 20, 2024
6a46e55
go get github.com/aws/aws-sdk-go-v2/service/cloudformation.
ewbankkit Jun 20, 2024
14c3788
go get github.com/aws/aws-sdk-go-v2/service/cloudfront.
ewbankkit Jun 20, 2024
01019d6
go get github.com/aws/aws-sdk-go-v2/service/cloudfrontkeyvaluestore.
ewbankkit Jun 20, 2024
ba00283
go get github.com/aws/aws-sdk-go-v2/service/cloudhsmv2.
ewbankkit Jun 20, 2024
6626eff
go get github.com/aws/aws-sdk-go-v2/service/cloudsearch.
ewbankkit Jun 20, 2024
708e96e
go get github.com/aws/aws-sdk-go-v2/service/cloudtrail.
ewbankkit Jun 20, 2024
20995bb
go get github.com/aws/aws-sdk-go-v2/service/cloudwatch.
ewbankkit Jun 20, 2024
9707c82
go get github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs.
ewbankkit Jun 20, 2024
349b6b1
go get github.com/aws/aws-sdk-go-v2/service/codeartifact.
ewbankkit Jun 20, 2024
ec348ca
go get github.com/aws/aws-sdk-go-v2/service/codebuild.
ewbankkit Jun 20, 2024
9ef75cb
go get github.com/aws/aws-sdk-go-v2/service/codecatalyst.
ewbankkit Jun 20, 2024
dc53bfb
go get github.com/aws/aws-sdk-go-v2/service/codecommit.
ewbankkit Jun 20, 2024
d8e3dea
go get github.com/aws/aws-sdk-go-v2/service/codedeploy.
ewbankkit Jun 20, 2024
3be4947
go get github.com/aws/aws-sdk-go-v2/service/codeguruprofiler.
ewbankkit Jun 20, 2024
f221a52
go get github.com/aws/aws-sdk-go-v2/service/codegurureviewer.
ewbankkit Jun 20, 2024
9dee305
go get github.com/aws/aws-sdk-go-v2/service/codepipeline.
ewbankkit Jun 20, 2024
8e5f86e
go get github.com/aws/aws-sdk-go-v2/service/codestarconnections.
ewbankkit Jun 20, 2024
ef48195
go get github.com/aws/aws-sdk-go-v2/service/codestarnotifications.
ewbankkit Jun 20, 2024
63e3ddc
go get github.com/aws/aws-sdk-go-v2/service/cognitoidentity.
ewbankkit Jun 20, 2024
2773128
go get github.com/aws/aws-sdk-go-v2/service/comprehend.
ewbankkit Jun 20, 2024
a94d0dd
go get github.com/aws/aws-sdk-go-v2/service/computeoptimizer.
ewbankkit Jun 20, 2024
f812cff
go get github.com/aws/aws-sdk-go-v2/service/configservice.
ewbankkit Jun 20, 2024
addb855
go get github.com/aws/aws-sdk-go-v2/service/connectcases.
ewbankkit Jun 20, 2024
09f6d47
go get github.com/aws/aws-sdk-go-v2/service/controltower.
ewbankkit Jun 20, 2024
502b5e1
go get github.com/aws/aws-sdk-go-v2/service/costandusagereportservice.
ewbankkit Jun 20, 2024
16eccde
go get github.com/aws/aws-sdk-go-v2/service/costexplorer.
ewbankkit Jun 20, 2024
b7de4e8
go get github.com/aws/aws-sdk-go-v2/service/costoptimizationhub.
ewbankkit Jun 20, 2024
2c9159f
go get github.com/aws/aws-sdk-go-v2/service/customerprofiles.
ewbankkit Jun 20, 2024
b906a15
go get github.com/aws/aws-sdk-go-v2/service/datasync.
ewbankkit Jun 20, 2024
aea7e10
go get github.com/aws/aws-sdk-go-v2/service/datazone.
ewbankkit Jun 20, 2024
6a84a8b
go get github.com/aws/aws-sdk-go-v2/service/dax.
ewbankkit Jun 20, 2024
1e9ff95
go get github.com/aws/aws-sdk-go-v2/service/devicefarm.
ewbankkit Jun 20, 2024
f24b075
go get github.com/aws/aws-sdk-go-v2/service/devopsguru.
ewbankkit Jun 20, 2024
5bab9ca
go get github.com/aws/aws-sdk-go-v2/service/directoryservice.
ewbankkit Jun 20, 2024
8716a99
go get github.com/aws/aws-sdk-go-v2/service/dlm.
ewbankkit Jun 20, 2024
d2b4c0c
go get github.com/aws/aws-sdk-go-v2/service/docdb.
ewbankkit Jun 20, 2024
859f11c
go get github.com/aws/aws-sdk-go-v2/service/docdbelastic.
ewbankkit Jun 20, 2024
66f608d
go get github.com/aws/aws-sdk-go-v2/service/drs.
ewbankkit Jun 20, 2024
31ede96
go get github.com/aws/aws-sdk-go-v2/service/dynamodb.
ewbankkit Jun 20, 2024
ef1cf16
go get github.com/aws/aws-sdk-go-v2/service/ec2.
ewbankkit Jun 20, 2024
b0aeb19
go get github.com/aws/aws-sdk-go-v2/service/ecr.
ewbankkit Jun 20, 2024
9c824b3
go get github.com/aws/aws-sdk-go-v2/service/ecrpublic.
ewbankkit Jun 20, 2024
e71a043
go get github.com/aws/aws-sdk-go-v2/service/ecs.
ewbankkit Jun 20, 2024
dd7f6ec
go get github.com/aws/aws-sdk-go-v2/service/eks.
ewbankkit Jun 20, 2024
87ced68
go get github.com/aws/aws-sdk-go-v2/service/elasticache.
ewbankkit Jun 20, 2024
d0e0ee3
go get github.com/aws/aws-sdk-go-v2/service/elasticbeanstalk.
ewbankkit Jun 20, 2024
7545ff0
go get github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2.
ewbankkit Jun 20, 2024
f1adb74
go get github.com/aws/aws-sdk-go-v2/service/emr.
ewbankkit Jun 20, 2024
737ba72
go get github.com/aws/aws-sdk-go-v2/service/emrserverless.
ewbankkit Jun 20, 2024
1bb72b6
go get github.com/aws/aws-sdk-go-v2/service/eventbridge.
ewbankkit Jun 20, 2024
07cc686
go get github.com/aws/aws-sdk-go-v2/service/evidently.
ewbankkit Jun 20, 2024
aa3abfc
go get github.com/aws/aws-sdk-go-v2/service/finspace.
ewbankkit Jun 20, 2024
9724c60
go get github.com/aws/aws-sdk-go-v2/service/firehose.
ewbankkit Jun 20, 2024
d1b738c
go get github.com/aws/aws-sdk-go-v2/service/fis.
ewbankkit Jun 20, 2024
b4fb6e1
go get github.com/aws/aws-sdk-go-v2/service/fms.
ewbankkit Jun 20, 2024
e4b3ccb
go get github.com/aws/aws-sdk-go-v2/service/glacier.
ewbankkit Jun 20, 2024
23be9a7
go get github.com/aws/aws-sdk-go-v2/service/globalaccelerator.
ewbankkit Jun 20, 2024
30ccf7e
go get github.com/aws/aws-sdk-go-v2/service/groundstation.
ewbankkit Jun 20, 2024
983826a
go get github.com/aws/aws-sdk-go-v2/service/guardduty.
ewbankkit Jun 20, 2024
21f3226
go get github.com/aws/aws-sdk-go-v2/service/healthlake.
ewbankkit Jun 20, 2024
b700e5e
go get github.com/aws/aws-sdk-go-v2/service/iam.
ewbankkit Jun 20, 2024
0aac4d9
go get github.com/aws/aws-sdk-go-v2/service/identitystore.
ewbankkit Jun 20, 2024
999d06e
go get github.com/aws/aws-sdk-go-v2/service/inspector2.
ewbankkit Jun 20, 2024
d71cd64
go get github.com/aws/aws-sdk-go-v2/service/internetmonitor.
ewbankkit Jun 20, 2024
7e09f8d
go get github.com/aws/aws-sdk-go-v2/service/ivschat.
ewbankkit Jun 20, 2024
3b8ba86
go get github.com/aws/aws-sdk-go-v2/service/kafka.
ewbankkit Jun 20, 2024
6de42f9
go get github.com/aws/aws-sdk-go-v2/service/kendra.
ewbankkit Jun 20, 2024
e9c7058
go get github.com/aws/aws-sdk-go-v2/service/keyspaces.
ewbankkit Jun 20, 2024
b949c67
go get github.com/aws/aws-sdk-go-v2/service/kinesis.
ewbankkit Jun 20, 2024
d9230fa
go get github.com/aws/aws-sdk-go-v2/service/kms.
ewbankkit Jun 20, 2024
fb36bf4
go get github.com/aws/aws-sdk-go-v2/service/lakeformation.
ewbankkit Jun 20, 2024
cf9d006
go get github.com/aws/aws-sdk-go-v2/service/lambda.
ewbankkit Jun 20, 2024
d7d7a39
go get github.com/aws/aws-sdk-go-v2/service/launchwizard.
ewbankkit Jun 20, 2024
3691ea7
go get github.com/aws/aws-sdk-go-v2/service/lexmodelsv2.
ewbankkit Jun 20, 2024
796be79
go get github.com/aws/aws-sdk-go-v2/service/lightsail.
ewbankkit Jun 20, 2024
d7909c7
go get github.com/aws/aws-sdk-go-v2/service/lookoutmetrics.
ewbankkit Jun 20, 2024
94ee41e
go get github.com/aws/aws-sdk-go-v2/service/m2.
ewbankkit Jun 20, 2024
439b596
go get github.com/aws/aws-sdk-go-v2/service/mediaconnect.
ewbankkit Jun 20, 2024
15d3a87
go get github.com/aws/aws-sdk-go-v2/service/mediaconvert.
ewbankkit Jun 20, 2024
0936015
go get github.com/aws/aws-sdk-go-v2/service/medialive.
ewbankkit Jun 20, 2024
d4c471c
go get github.com/aws/aws-sdk-go-v2/service/mediapackage.
ewbankkit Jun 20, 2024
6a85b9b
go get github.com/aws/aws-sdk-go-v2/service/mediapackagev2.
ewbankkit Jun 20, 2024
20202bc
go get github.com/aws/aws-sdk-go-v2/service/mediastore.
ewbankkit Jun 20, 2024
a4006ae
go get github.com/aws/aws-sdk-go-v2/service/mq.
ewbankkit Jun 20, 2024
b401aae
go get github.com/aws/aws-sdk-go-v2/service/mwaa.
ewbankkit Jun 20, 2024
e317e07
go get github.com/aws/aws-sdk-go-v2/service/neptunegraph.
ewbankkit Jun 20, 2024
477418b
go get github.com/aws/aws-sdk-go-v2/service/oam.
ewbankkit Jun 20, 2024
af38cca
go get github.com/aws/aws-sdk-go-v2/service/opensearchserverless.
ewbankkit Jun 20, 2024
43e8271
go get github.com/aws/aws-sdk-go-v2/service/organizations.
ewbankkit Jun 20, 2024
b0c0ed4
go get github.com/aws/aws-sdk-go-v2/service/osis.
ewbankkit Jun 20, 2024
d557b7d
go get github.com/aws/aws-sdk-go-v2/service/paymentcryptography.
ewbankkit Jun 20, 2024
d92944d
go get github.com/aws/aws-sdk-go-v2/service/pcaconnectorad.
ewbankkit Jun 20, 2024
2ae35a6
go get github.com/aws/aws-sdk-go-v2/service/pipes.
ewbankkit Jun 20, 2024
470a2c2
go get github.com/aws/aws-sdk-go-v2/service/polly.
ewbankkit Jun 20, 2024
f7b8eef
go get github.com/aws/aws-sdk-go-v2/service/pricing.
ewbankkit Jun 20, 2024
c63ed50
go get github.com/aws/aws-sdk-go-v2/service/qbusiness.
ewbankkit Jun 20, 2024
5df2ede
go get github.com/aws/aws-sdk-go-v2/service/qldb.
ewbankkit Jun 20, 2024
88c2045
go get github.com/aws/aws-sdk-go-v2/service/ram.
ewbankkit Jun 20, 2024
1e25efd
go get github.com/aws/aws-sdk-go-v2/service/rbin.
ewbankkit Jun 20, 2024
2d6a8de
go get github.com/aws/aws-sdk-go-v2/service/rds.
ewbankkit Jun 20, 2024
1d1d2f0
go get github.com/aws/aws-sdk-go-v2/service/redshift.
ewbankkit Jun 20, 2024
d114e61
go get github.com/aws/aws-sdk-go-v2/service/redshiftdata.
ewbankkit Jun 20, 2024
815414c
go get github.com/aws/aws-sdk-go-v2/service/redshiftserverless.
ewbankkit Jun 20, 2024
0c41ffc
go get github.com/aws/aws-sdk-go-v2/service/rekognition.
ewbankkit Jun 20, 2024
357ac74
go get github.com/aws/aws-sdk-go-v2/service/resourceexplorer2.
ewbankkit Jun 20, 2024
180beb8
go get github.com/aws/aws-sdk-go-v2/service/resourcegroups.
ewbankkit Jun 20, 2024
eb7d80a
go get github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi.
ewbankkit Jun 20, 2024
75755f5
go get github.com/aws/aws-sdk-go-v2/service/rolesanywhere.
ewbankkit Jun 20, 2024
eb94a9b
go get github.com/aws/aws-sdk-go-v2/service/route53.
ewbankkit Jun 20, 2024
e019018
go get github.com/aws/aws-sdk-go-v2/service/route53domains.
ewbankkit Jun 20, 2024
de81327
go get github.com/aws/aws-sdk-go-v2/service/route53profiles.
ewbankkit Jun 20, 2024
4bfeb2a
go get github.com/aws/aws-sdk-go-v2/service/rum.
ewbankkit Jun 20, 2024
c6914bc
go get github.com/aws/aws-sdk-go-v2/service/s3control.
ewbankkit Jun 20, 2024
27eafa7
go get github.com/aws/aws-sdk-go-v2/service/scheduler.
ewbankkit Jun 20, 2024
5dc3098
go get github.com/aws/aws-sdk-go-v2/service/schemas.
ewbankkit Jun 20, 2024
875037f
go get github.com/aws/aws-sdk-go-v2/service/secretsmanager.
ewbankkit Jun 20, 2024
b52b433
go get github.com/aws/aws-sdk-go-v2/service/securityhub.
ewbankkit Jun 20, 2024
5498061
go get github.com/aws/aws-sdk-go-v2/service/securitylake.
ewbankkit Jun 20, 2024
7955701
go get github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry.
ewbankkit Jun 20, 2024
49303b1
go get github.com/aws/aws-sdk-go-v2/service/servicediscovery.
ewbankkit Jun 20, 2024
eada22e
go get github.com/aws/aws-sdk-go-v2/service/servicequotas.
ewbankkit Jun 20, 2024
3048fb9
go get github.com/aws/aws-sdk-go-v2/service/sesv2.
ewbankkit Jun 20, 2024
15632ba
go get github.com/aws/aws-sdk-go-v2/service/shield.
ewbankkit Jun 20, 2024
9511739
go get github.com/aws/aws-sdk-go-v2/service/signer.
ewbankkit Jun 20, 2024
df6e0d8
go get github.com/aws/aws-sdk-go-v2/service/sns.
ewbankkit Jun 20, 2024
7f2d7d8
go get github.com/aws/aws-sdk-go-v2/service/sqs.
ewbankkit Jun 20, 2024
9756cd7
go get github.com/aws/aws-sdk-go-v2/service/ssm.
ewbankkit Jun 20, 2024
c52de39
go get github.com/aws/aws-sdk-go-v2/service/ssmcontacts.
ewbankkit Jun 20, 2024
ccc255f
go get github.com/aws/aws-sdk-go-v2/service/ssmincidents.
ewbankkit Jun 20, 2024
d57cb0f
go get github.com/aws/aws-sdk-go-v2/service/ssmsap.
ewbankkit Jun 20, 2024
c9b2de7
go get github.com/aws/aws-sdk-go-v2/service/ssoadmin.
ewbankkit Jun 20, 2024
1da65f8
go get github.com/aws/aws-sdk-go-v2/service/swf.
ewbankkit Jun 20, 2024
070c31b
go get github.com/aws/aws-sdk-go-v2/service/synthetics.
ewbankkit Jun 20, 2024
21d2ad0
go get github.com/aws/aws-sdk-go-v2/service/timestreaminfluxdb.
ewbankkit Jun 20, 2024
bc227f8
go get github.com/aws/aws-sdk-go-v2/service/timestreamwrite.
ewbankkit Jun 20, 2024
08f8677
go get github.com/aws/aws-sdk-go-v2/service/transcribe.
ewbankkit Jun 20, 2024
b311780
go get github.com/aws/aws-sdk-go-v2/service/transfer.
ewbankkit Jun 20, 2024
cf5782a
go get github.com/aws/aws-sdk-go-v2/service/verifiedpermissions.
ewbankkit Jun 20, 2024
3b34c0d
go get github.com/aws/aws-sdk-go-v2/service/vpclattice.
ewbankkit Jun 20, 2024
50dc4e8
go get github.com/aws/aws-sdk-go-v2/service/waf.
ewbankkit Jun 20, 2024
8027ab3
go get github.com/aws/aws-sdk-go-v2/service/wafregional.
ewbankkit Jun 20, 2024
35a79f3
go get github.com/aws/aws-sdk-go-v2/service/wafv2.
ewbankkit Jun 20, 2024
5eb08b5
go get github.com/aws/aws-sdk-go-v2/service/wellarchitected.
ewbankkit Jun 20, 2024
ddabdc0
go get github.com/aws/aws-sdk-go-v2/service/workspaces.
ewbankkit Jun 20, 2024
c2ae41f
go get github.com/aws/aws-sdk-go-v2/service/workspacesweb.
ewbankkit Jun 20, 2024
ed575cf
go get github.com/aws/aws-sdk-go-v2/service/xray.
ewbankkit Jun 20, 2024
eb2175d
go get github.com/aws/aws-sdk-go.
ewbankkit Jun 20, 2024
6ed8599
Run 'make clean-tidy'.
ewbankkit Jun 20, 2024
0872461
appsync: Tidy up acceptance test configurations.
ewbankkit Jun 20, 2024
039d6be
appsync: Custom API client factory.
ewbankkit Jun 20, 2024
baa3ebf
r/aws_appsync_graphql_api: Fix 'InvalidParameterValueException: The r…
ewbankkit Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/36568.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_appsync_api_key: Add `api_key_id` attribute
```
393 changes: 197 additions & 196 deletions go.mod

Large diffs are not rendered by default.

786 changes: 394 additions & 392 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions internal/conns/awsclient_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions internal/sdkv2/state.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package sdkv2

import (
"strings"
)

// ToUpperSchemaStateFunc converts a string value to uppercase before storing it in state.
func ToUpperSchemaStateFunc(v interface{}) string {
return strings.ToUpper(v.(string))
}
23 changes: 23 additions & 0 deletions internal/sdkv2/state_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package sdkv2

import (
"testing"

"github.com/google/go-cmp/cmp"
)

func TestToUpperSchemaStateFunc(t *testing.T) {
t.Parallel()

var input interface{} = "in-state"
want := "IN-STATE"

got := ToUpperSchemaStateFunc(input)

if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("unexpected diff (+want, -got): %s", diff)
}
}
205 changes: 147 additions & 58 deletions internal/service/appsync/api_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,42 @@ package appsync
import (
"context"
"log"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/appsync"
"github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2/tfawserr"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/appsync"
awstypes "github.com/aws/aws-sdk-go-v2/service/appsync/types"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
"github.com/hashicorp/terraform-provider-aws/internal/enum"
"github.com/hashicorp/terraform-provider-aws/internal/errs"
"github.com/hashicorp/terraform-provider-aws/internal/errs/sdkdiag"
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
"github.com/hashicorp/terraform-provider-aws/names"
)

// @SDKResource("aws_appsync_api_cache")
func ResourceAPICache() *schema.Resource {
// @SDKResource("aws_appsync_api_cache", name="API Cache")
func resourceAPICache() *schema.Resource {
return &schema.Resource{
CreateWithoutTimeout: resourceAPICacheCreate,
ReadWithoutTimeout: resourceAPICacheRead,
UpdateWithoutTimeout: resourceAPICacheUpdate,
DeleteWithoutTimeout: resourceAPICacheDelete,

Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},

Schema: map[string]*schema.Schema{
"api_id": {
Type: schema.TypeString,
Required: true,
},
"api_caching_behavior": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appsync.ApiCachingBehavior_Values(), false),
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: enum.Validate[awstypes.ApiCachingBehavior](),
},
names.AttrType: {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appsync.ApiCacheType_Values(), false),
},
"ttl": {
Type: schema.TypeInt,
"api_id": {
Type: schema.TypeString,
Required: true,
},
"at_rest_encryption_enabled": {
Expand All @@ -59,120 +54,214 @@ func ResourceAPICache() *schema.Resource {
Optional: true,
ForceNew: true,
},
"ttl": {
Type: schema.TypeInt,
Required: true,
},
names.AttrType: {
Type: schema.TypeString,
Required: true,
ValidateDiagFunc: enum.Validate[awstypes.ApiCacheType](),
},
},
}
}

func resourceAPICacheCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
var diags diag.Diagnostics
conn := meta.(*conns.AWSClient).AppSyncConn(ctx)
conn := meta.(*conns.AWSClient).AppSyncClient(ctx)

apiID := d.Get("api_id").(string)

params := &appsync.CreateApiCacheInput{
input := &appsync.CreateApiCacheInput{
ApiCachingBehavior: awstypes.ApiCachingBehavior(d.Get("api_caching_behavior").(string)),
ApiId: aws.String(apiID),
Type: aws.String(d.Get(names.AttrType).(string)),
ApiCachingBehavior: aws.String(d.Get("api_caching_behavior").(string)),
Ttl: aws.Int64(int64(d.Get("ttl").(int))),
Ttl: int64(d.Get("ttl").(int)),
Type: awstypes.ApiCacheType(d.Get(names.AttrType).(string)),
}

if v, ok := d.GetOk("at_rest_encryption_enabled"); ok {
params.AtRestEncryptionEnabled = aws.Bool(v.(bool))
input.AtRestEncryptionEnabled = v.(bool)
}

if v, ok := d.GetOk("transit_encryption_enabled"); ok {
params.TransitEncryptionEnabled = aws.Bool(v.(bool))
input.TransitEncryptionEnabled = v.(bool)
}

_, err := conn.CreateApiCacheWithContext(ctx, params)
_, err := conn.CreateApiCache(ctx, input)

if err != nil {
return sdkdiag.AppendErrorf(diags, "creating Appsync API Cache: %s", err)
return sdkdiag.AppendErrorf(diags, "creating Appsync API Cache (%s): %s", apiID, err)
}

d.SetId(apiID)

if err := waitAPICacheAvailable(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) availability: %s", d.Id(), err)
if _, err := waitAPICacheAvailable(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) create: %s", d.Id(), err)
}

return append(diags, resourceAPICacheRead(ctx, d, meta)...)
}

func resourceAPICacheRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
var diags diag.Diagnostics
conn := meta.(*conns.AWSClient).AppSyncConn(ctx)
conn := meta.(*conns.AWSClient).AppSyncClient(ctx)

cache, err := findAPICacheByID(ctx, conn, d.Id())

cache, err := FindAPICacheByID(ctx, conn, d.Id())
if !d.IsNewResource() && tfresource.NotFound(err) {
log.Printf("[WARN] AppSync API Cache (%s) not found, removing from state", d.Id())
d.SetId("")
return diags
}

if err != nil {
return sdkdiag.AppendErrorf(diags, "getting Appsync API Cache %q: %s", d.Id(), err)
return sdkdiag.AppendErrorf(diags, "reading Appsync API Cache (%s): %s", d.Id(), err)
}

d.Set("api_id", d.Id())
d.Set(names.AttrType, cache.Type)
d.Set("api_caching_behavior", cache.ApiCachingBehavior)
d.Set("ttl", cache.Ttl)
d.Set("api_id", d.Id())
d.Set("at_rest_encryption_enabled", cache.AtRestEncryptionEnabled)
d.Set("transit_encryption_enabled", cache.TransitEncryptionEnabled)
d.Set("ttl", cache.Ttl)
d.Set(names.AttrType, cache.Type)

return diags
}

func resourceAPICacheUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
var diags diag.Diagnostics
conn := meta.(*conns.AWSClient).AppSyncConn(ctx)
conn := meta.(*conns.AWSClient).AppSyncClient(ctx)

params := &appsync.UpdateApiCacheInput{
input := &appsync.UpdateApiCacheInput{
ApiId: aws.String(d.Id()),
}

if d.HasChange(names.AttrType) {
params.Type = aws.String(d.Get(names.AttrType).(string))
}

if d.HasChange("api_caching_behavior") {
params.ApiCachingBehavior = aws.String(d.Get("api_caching_behavior").(string))
input.ApiCachingBehavior = awstypes.ApiCachingBehavior(d.Get("api_caching_behavior").(string))
}

if d.HasChange("ttl") {
params.Ttl = aws.Int64(int64(d.Get("ttl").(int)))
input.Ttl = int64(d.Get("ttl").(int))
}

if d.HasChange(names.AttrType) {
input.Type = awstypes.ApiCacheType(d.Get(names.AttrType).(string))
}

_, err := conn.UpdateApiCacheWithContext(ctx, params)
_, err := conn.UpdateApiCache(ctx, input)

if err != nil {
return sdkdiag.AppendErrorf(diags, "updating Appsync API Cache %q: %s", d.Id(), err)
}

if err := waitAPICacheAvailable(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) availability: %s", d.Id(), err)
if _, err := waitAPICacheAvailable(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) update: %s", d.Id(), err)
}

return append(diags, resourceAPICacheRead(ctx, d, meta)...)
}

func resourceAPICacheDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
var diags diag.Diagnostics
conn := meta.(*conns.AWSClient).AppSyncConn(ctx)
conn := meta.(*conns.AWSClient).AppSyncClient(ctx)

input := &appsync.DeleteApiCacheInput{
log.Printf("[INFO] Deleting Appsync API Cache: %s", d.Id())
_, err := conn.DeleteApiCache(ctx, &appsync.DeleteApiCacheInput{
ApiId: aws.String(d.Id()),
})

if errs.IsA[*awstypes.NotFoundException](err) {
return diags
}

if err != nil {
return sdkdiag.AppendErrorf(diags, "deleting Appsync API Cache (%s): %s", d.Id(), err)
}

if _, err := waitAPICacheDeleted(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) delete: %s", d.Id(), err)
}

return diags
}

func findAPICacheByID(ctx context.Context, conn *appsync.Client, id string) (*awstypes.ApiCache, error) {
input := &appsync.GetApiCacheInput{
ApiId: aws.String(id),
}
_, err := conn.DeleteApiCacheWithContext(ctx, input)

output, err := conn.GetApiCache(ctx, input)

if errs.IsA[*awstypes.NotFoundException](err) {
return nil, &retry.NotFoundError{
LastError: err,
LastRequest: input,
}
}

if err != nil {
if tfawserr.ErrCodeEquals(err, appsync.ErrCodeNotFoundException) {
return diags
return nil, err
}

if output == nil || output.ApiCache == nil {
return nil, tfresource.NewEmptyResultError(input)
}

return output.ApiCache, nil
}

func statusAPICache(ctx context.Context, conn *appsync.Client, name string) retry.StateRefreshFunc {
return func() (interface{}, string, error) {
output, err := findAPICacheByID(ctx, conn, name)

if tfresource.NotFound(err) {
return nil, "", nil
}

if err != nil {
return nil, "", err
}
return sdkdiag.AppendErrorf(diags, "deleting Appsync API Cache: %s", err)

return output, string(output.Status), nil
}
}

if err := waitAPICacheDeleted(ctx, conn, d.Id()); err != nil {
return sdkdiag.AppendErrorf(diags, "waiting for Appsync API Cache (%s) to be deleted: %s", d.Id(), err)
func waitAPICacheAvailable(ctx context.Context, conn *appsync.Client, id string) (*awstypes.ApiCache, error) { //nolint:unparam
const (
timeout = 60 * time.Minute
)
stateConf := &retry.StateChangeConf{
Pending: enum.Slice(awstypes.ApiCacheStatusCreating, awstypes.ApiCacheStatusModifying),
Target: enum.Slice(awstypes.ApiCacheStatusAvailable),
Refresh: statusAPICache(ctx, conn, id),
Timeout: timeout,
}

return diags
outputRaw, err := stateConf.WaitForStateContext(ctx)

if output, ok := outputRaw.(*awstypes.ApiCache); ok {
return output, err
}

return nil, err
}

func waitAPICacheDeleted(ctx context.Context, conn *appsync.Client, id string) (*awstypes.ApiCache, error) {
const (
timeout = 60 * time.Minute
)
stateConf := &retry.StateChangeConf{
Pending: enum.Slice(awstypes.ApiCacheStatusDeleting),
Target: []string{},
Refresh: statusAPICache(ctx, conn, id),
Timeout: timeout,
}

outputRaw, err := stateConf.WaitForStateContext(ctx)

if output, ok := outputRaw.(*awstypes.ApiCache); ok {
return output, err
}

return nil, err
}
Loading
Loading