Skip to content

Commit

Permalink
Update the new AWS SDK version to v1.26.1(Excluding new column additi…
Browse files Browse the repository at this point in the history
…on) (#2163)
  • Loading branch information
ParthaI authored Apr 19, 2024
1 parent 90518c1 commit df91aee
Show file tree
Hide file tree
Showing 52 changed files with 526 additions and 527 deletions.
2 changes: 1 addition & 1 deletion aws/parliament_iam_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -239999,4 +239999,4 @@ func getParliamentIamPermissions() ParliamentPermissions {
},
}
return permissions
}
}
2 changes: 1 addition & 1 deletion aws/table_aws_cognito_identity_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func listCognitoIdentityPools(ctx context.Context, d *plugin.QueryData, _ *plugi
}
}
input := &cognitoidentity.ListIdentityPoolsInput{
MaxResults: maxLimit,
MaxResults: aws.Int32(maxLimit),
}
// List call
paginator := cognitoidentity.NewListIdentityPoolsPaginator(svc, input, func(o *cognitoidentity.ListIdentityPoolsPaginatorOptions) {
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_cognito_user_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func listCognitoUserPools(ctx context.Context, d *plugin.QueryData, _ *plugin.Hy
}
}
input := &cognitoidentityprovider.ListUserPoolsInput{
MaxResults: maxLimit,
MaxResults: aws.Int32(maxLimit),
}
// List call
paginator := cognitoidentityprovider.NewListUserPoolsPaginator(svc, input, func(o *cognitoidentityprovider.ListUserPoolsPaginatorOptions) {
Expand Down
4 changes: 2 additions & 2 deletions aws/table_aws_docdb_cluster_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ func listDocDBClusterSnapshots(ctx context.Context, d *plugin.QueryData, _ *plug
input.SnapshotType = aws.String(d.EqualsQualString("snapshot_type"))
}
if d.EqualsQuals["include_public"] != nil {
input.IncludePublic = d.EqualsQuals["include_public"].GetBoolValue()
input.IncludePublic = aws.Bool(d.EqualsQuals["include_public"].GetBoolValue())
}
if d.EqualsQuals["include_shared"] != nil {
input.IncludePublic = d.EqualsQuals["include_shared"].GetBoolValue()
input.IncludePublic = aws.Bool(d.EqualsQuals["include_shared"].GetBoolValue())
}

// List call
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_drs_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func listAwsDRSJobs(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD
}
}

input.MaxResults = int32(maxItems)
input.MaxResults = &maxItems

filter := &types.DescribeJobsRequestFilters{}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_drs_recovery_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func listAwsDRSRecoveryInstances(ctx context.Context, d *plugin.QueryData, _ *pl
}
}

input.MaxResults = int32(maxItems)
input.MaxResults = &maxItems
sourceServerID := d.EqualsQualString("source_server_id")
recoveryInstanceId := d.EqualsQualString("recovery_instance_id")

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_drs_recovery_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func listAwsDRSRecoverySnapshots(ctx context.Context, d *plugin.QueryData, h *pl
}
}

input.MaxResults = int32(maxItems)
input.MaxResults = &maxItems

filter := &types.DescribeRecoverySnapshotsRequestFilters{}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_drs_source_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func listAwsDRSSourceServers(ctx context.Context, d *plugin.QueryData, _ *plugin
}
}

input.MaxResults = int32(maxItems)
input.MaxResults = &maxItems
sourceServerID := d.EqualsQualString("source_server_id")
stagingAccountID := d.EqualsQualString("staging_account_id")
hardwareID := d.EqualsQualString("hardware_id")
Expand Down
4 changes: 2 additions & 2 deletions aws/table_aws_guardduty_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ func listGuardDutyDetectors(ctx context.Context, d *plugin.QueryData, _ *plugin.

maxItems := int32(50)
params := &guardduty.ListDetectorsInput{
MaxResults: maxItems,
MaxResults: &maxItems,
}

// Reduce the basic request limit down if the user has only requested a small number of rows
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
params.MaxResults = limit
params.MaxResults = &limit
}
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_guardduty_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func listAwsGuardDutyFilters(ctx context.Context, d *plugin.QueryData, h *plugin
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
params.MaxResults = limit
params.MaxResults = &limit
}
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_guardduty_finding.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func listGuardDutyFindings(ctx context.Context, d *plugin.QueryData, h *plugin.H
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
input.MaxResults = limit
input.MaxResults = &limit
}
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_guardduty_ipset.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func listAwsGuardDutyIPSets(ctx context.Context, d *plugin.QueryData, h *plugin.
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
params.MaxResults = limit
params.MaxResults = &limit
}
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_guardduty_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func listGuardDutyMembers(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
params.MaxResults = limit
params.MaxResults = &limit
}
}

Expand Down
5 changes: 2 additions & 3 deletions aws/table_aws_guardduty_publishing_destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/guardduty"
"github.com/aws/aws-sdk-go-v2/service/guardduty/types"

Expand Down Expand Up @@ -147,7 +146,7 @@ func listGuardDutyPublishingDestinations(ctx context.Context, d *plugin.QueryDat
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
input.MaxResults = limit
input.MaxResults = &limit
}
}

Expand Down Expand Up @@ -229,7 +228,7 @@ func getGuardDutyPublishingDestination(ctx context.Context, d *plugin.QueryData,
DestinationArn: data.DestinationProperties.DestinationArn,
KmsKeyArn: data.DestinationProperties.KmsKeyArn,
Status: data.Status,
PublishingFailureStartTimestamp: aws.Int64(data.PublishingFailureStartTimestamp),
PublishingFailureStartTimestamp: data.PublishingFailureStartTimestamp,
DetectorId: detectorID,
}, nil
}
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_guardduty_threat_intel_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func listGuardDutyThreatIntelSets(ctx context.Context, d *plugin.QueryData, h *p
if d.QueryContext.Limit != nil {
limit := int32(*d.QueryContext.Limit)
if limit < maxItems {
input.MaxResults = limit
input.MaxResults = &limit
}
}

Expand Down
4 changes: 2 additions & 2 deletions aws/table_aws_lambda_layer_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func getLambdaLayerVersion(ctx context.Context, d *plugin.QueryData, h *plugin.H
// Build the params
params := &lambda.GetLayerVersionInput{
LayerName: aws.String(layerName),
VersionNumber: version,
VersionNumber: &version,
}

// Get call
Expand Down Expand Up @@ -295,7 +295,7 @@ func getLambdaLayerVersionPolicy(ctx context.Context, d *plugin.QueryData, h *pl
// Build the params
params := &lambda.GetLayerVersionPolicyInput{
LayerName: aws.String(layerName),
VersionNumber: version,
VersionNumber: &version,
}

// Get call
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_macie2_classification_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func listMacie2ClassificationJobs(ctx context.Context, d *plugin.QueryData, _ *p

maxItems := int32(200)
input := &macie2.ListClassificationJobsInput{
MaxResults: maxItems,
MaxResults: &maxItems,
}

// Reduce the basic request limit down if the user has only requested a small number of rows
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_mgn_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func ListAwsMGNApplications(ctx context.Context, d *plugin.QueryData, h *plugin.

// Page size must be greater than 0 and less than or equal to 1000
input := &mgn.ListApplicationsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

filter := buildMGNApplicationFilter(d.Quals)
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_mq_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func listMQBrokers(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateDa
}

input := mq.ListBrokersInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

paginator := mq.NewListBrokersPaginator(svc, &input, func(o *mq.ListBrokersPaginatorOptions) {
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_msk_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func listKafkaClusters(clusterType string) func(ctx context.Context, d *plugin.Q
}

input := kafka.ListClustersV2Input{
MaxResults: maxLimit,
MaxResults: &maxLimit,
ClusterTypeFilter: &clusterType,
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_rds_db_engine_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func listRDSDBEngineVersions(ctx context.Context, d *plugin.QueryData, _ *plugin
input.ListSupportedTimezones = aws.Bool(d.EqualsQuals["list_supported_timezones"].GetBoolValue())
}
if d.EqualsQuals["default_only"] != nil {
input.DefaultOnly = d.EqualsQuals["default_only"].GetBoolValue()
input.DefaultOnly = aws.Bool(d.EqualsQuals["default_only"].GetBoolValue())
}

// Additional input filter
Expand Down
9 changes: 5 additions & 4 deletions aws/table_aws_s3_account_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/aws-sdk-go-v2/service/s3control"
"github.com/aws/smithy-go"
Expand Down Expand Up @@ -111,10 +112,10 @@ func getAccountBucketPublicAccessBlock(ctx context.Context, d *plugin.QueryData,
}

defaultAccessBlock := &types.PublicAccessBlockConfiguration{
BlockPublicAcls: false,
BlockPublicPolicy: false,
IgnorePublicAcls: false,
RestrictPublicBuckets: false,
BlockPublicAcls: aws.Bool(false),
BlockPublicPolicy: aws.Bool(false),
IgnorePublicAcls: aws.Bool(false),
RestrictPublicBuckets: aws.Bool(false),
}

accessBlock, err := svc.GetPublicAccessBlock(ctx, params)
Expand Down
9 changes: 5 additions & 4 deletions aws/table_aws_s3_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/smithy-go"
Expand Down Expand Up @@ -552,10 +553,10 @@ func getBucketPublicAccessBlock(ctx context.Context, d *plugin.QueryData, h *plu

params := &s3.GetPublicAccessBlockInput{Bucket: bucket.Name}
defaultAccessBlock := &types.PublicAccessBlockConfiguration{
BlockPublicAcls: false,
BlockPublicPolicy: false,
IgnorePublicAcls: false,
RestrictPublicBuckets: false,
BlockPublicAcls: aws.Bool(false),
BlockPublicPolicy: aws.Bool(false),
IgnorePublicAcls: aws.Bool(false),
RestrictPublicBuckets: aws.Bool(false),
}

accessBlock, err := svc.GetPublicAccessBlock(ctx, params)
Expand Down
4 changes: 2 additions & 2 deletions aws/table_aws_s3_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ func listS3Objects(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateDa

input := &s3.ListObjectsV2Input{
Bucket: aws.String(bucketName),
MaxKeys: maxItems,
FetchOwner: true,
MaxKeys: &maxItems,
FetchOwner: aws.Bool(true),
}

equalQuals := d.EqualsQuals
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_s3_object_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func listS3ObjectVersions(ctx context.Context, d *plugin.QueryData, h *plugin.Hy

input := &s3.ListObjectVersionsInput{
Bucket: aws.String(bucketName),
MaxKeys: maxItems,
MaxKeys: &maxItems,
}

if d.EqualsQualString("key") != "" {
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_action_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func listSecurityHubActionTargets(ctx context.Context, d *plugin.QueryData, _ *p

// Filter parameter is not supported yet in this SDK version so optional quals can not be implemented
input := &securityhub.DescribeActionTargetsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

// List call
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_finding.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func listSecurityHubFindings(ctx context.Context, d *plugin.QueryData, _ *plugin
}

input := &securityhub.GetFindingsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

findingsFilter := buildListFindingsParam(d.Quals)
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_finding_aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func listSecurityHubFindingAggregators(ctx context.Context, d *plugin.QueryData,
}

input := &securityhub.ListFindingAggregatorsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}
// List Call
paginator := securityhub.NewListFindingAggregatorsPaginator(svc, input, func(o *securityhub.ListFindingAggregatorsPaginatorOptions) {
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_insight.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func listSecurityHubInsights(ctx context.Context, d *plugin.QueryData, _ *plugin
}

input := &securityhub.GetInsightsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

paginator := securityhub.NewGetInsightsPaginator(svc, input, func(o *securityhub.GetInsightsPaginatorOptions) {
Expand Down
3 changes: 2 additions & 1 deletion aws/table_aws_securityhub_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"strconv"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/securityhub"

securityhubv1 "github.com/aws/aws-sdk-go/service/securityhub"
Expand Down Expand Up @@ -98,7 +99,7 @@ func listSecurityHubMembers(ctx context.Context, d *plugin.QueryData, _ *plugin.
}

params := &securityhub.ListMembersInput{
OnlyAssociated: false,
OnlyAssociated: aws.Bool(false),
}

// Reduce the basic request limit down if the user has only requested a small number of rows
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_product.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func listSecurityHubProducts(ctx context.Context, d *plugin.QueryData, _ *plugin
}

input := &securityhub.DescribeProductsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

paginator := securityhub.NewDescribeProductsPaginator(svc, input, func(o *securityhub.DescribeProductsPaginatorOptions) {
Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_standards_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func listSecurityHubStandardsControls(ctx context.Context, d *plugin.QueryData,
}

input := &securityhub.DescribeStandardsControlsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
StandardsSubscriptionArn: aws.String(standardsSubscriptionArn),
}

Expand Down
2 changes: 1 addition & 1 deletion aws/table_aws_securityhub_standards_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func listSecurityHubStandardsSubcriptions(ctx context.Context, d *plugin.QueryDa
}

input := &securityhub.DescribeStandardsInput{
MaxResults: maxLimit,
MaxResults: &maxLimit,
}

paginator := securityhub.NewDescribeStandardsPaginator(svc, input, func(o *securityhub.DescribeStandardsPaginatorOptions) {
Expand Down
Loading

0 comments on commit df91aee

Please sign in to comment.