@aws-sdk/client-devops-guru 3.43.0 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +96 -45
- package/dist-cjs/protocols/Aws_restJson1.js +379 -0
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +65 -28
- package/dist-es/protocols/Aws_restJson1.js +372 -6
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/DevOpsGuru.d.ts +13 -10
- package/dist-types/DevOpsGuruClient.d.ts +5 -1
- package/dist-types/commands/DescribeResourceCollectionHealthCommand.d.ts +3 -2
- package/dist-types/commands/GetResourceCollectionCommand.d.ts +3 -2
- package/dist-types/commands/SearchOrganizationInsightsCommand.d.ts +4 -4
- package/dist-types/commands/UpdateResourceCollectionCommand.d.ts +3 -2
- package/dist-types/models/models_0.d.ts +1093 -111
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/DevOpsGuruClient.d.ts +3 -1
- package/dist-types/ts3.4/models/models_0.d.ts +217 -31
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
3
|
import { expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
@@ -1534,6 +1534,7 @@ export var deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthC
|
|
|
1534
1534
|
CloudFormation: undefined,
|
|
1535
1535
|
NextToken: undefined,
|
|
1536
1536
|
Service: undefined,
|
|
1537
|
+
Tags: undefined,
|
|
1537
1538
|
};
|
|
1538
1539
|
_a = __expectNonNull;
|
|
1539
1540
|
_b = __expectObject;
|
|
@@ -1552,6 +1553,9 @@ export var deserializeAws_restJson1DescribeOrganizationResourceCollectionHealthC
|
|
|
1552
1553
|
if (data.Service !== undefined && data.Service !== null) {
|
|
1553
1554
|
contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context);
|
|
1554
1555
|
}
|
|
1556
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
1557
|
+
contents.Tags = deserializeAws_restJson1TagHealths(data.Tags, context);
|
|
1558
|
+
}
|
|
1555
1559
|
return [2, Promise.resolve(contents)];
|
|
1556
1560
|
}
|
|
1557
1561
|
});
|
|
@@ -1631,6 +1635,7 @@ export var deserializeAws_restJson1DescribeResourceCollectionHealthCommand = fun
|
|
|
1631
1635
|
CloudFormation: undefined,
|
|
1632
1636
|
NextToken: undefined,
|
|
1633
1637
|
Service: undefined,
|
|
1638
|
+
Tags: undefined,
|
|
1634
1639
|
};
|
|
1635
1640
|
_a = __expectNonNull;
|
|
1636
1641
|
_b = __expectObject;
|
|
@@ -1646,6 +1651,9 @@ export var deserializeAws_restJson1DescribeResourceCollectionHealthCommand = fun
|
|
|
1646
1651
|
if (data.Service !== undefined && data.Service !== null) {
|
|
1647
1652
|
contents.Service = deserializeAws_restJson1ServiceHealths(data.Service, context);
|
|
1648
1653
|
}
|
|
1654
|
+
if (data.Tags !== undefined && data.Tags !== null) {
|
|
1655
|
+
contents.Tags = deserializeAws_restJson1TagHealths(data.Tags, context);
|
|
1656
|
+
}
|
|
1649
1657
|
return [2, Promise.resolve(contents)];
|
|
1650
1658
|
}
|
|
1651
1659
|
});
|
|
@@ -3411,9 +3419,12 @@ var serializeAws_restJson1CloudFormationCostEstimationResourceCollectionFilter =
|
|
|
3411
3419
|
}));
|
|
3412
3420
|
};
|
|
3413
3421
|
var serializeAws_restJson1CostEstimationResourceCollectionFilter = function (input, context) {
|
|
3414
|
-
return __assign({}, (input.CloudFormation !== undefined &&
|
|
3422
|
+
return __assign(__assign({}, (input.CloudFormation !== undefined &&
|
|
3415
3423
|
input.CloudFormation !== null && {
|
|
3416
3424
|
CloudFormation: serializeAws_restJson1CloudFormationCostEstimationResourceCollectionFilter(input.CloudFormation, context),
|
|
3425
|
+
})), (input.Tags !== undefined &&
|
|
3426
|
+
input.Tags !== null && {
|
|
3427
|
+
Tags: serializeAws_restJson1TagCostEstimationResourceCollectionFilters(input.Tags, context),
|
|
3417
3428
|
}));
|
|
3418
3429
|
};
|
|
3419
3430
|
var serializeAws_restJson1CostEstimationStackNames = function (input, context) {
|
|
@@ -3426,6 +3437,16 @@ var serializeAws_restJson1CostEstimationStackNames = function (input, context) {
|
|
|
3426
3437
|
return entry;
|
|
3427
3438
|
});
|
|
3428
3439
|
};
|
|
3440
|
+
var serializeAws_restJson1CostEstimationTagValues = function (input, context) {
|
|
3441
|
+
return input
|
|
3442
|
+
.filter(function (e) { return e != null; })
|
|
3443
|
+
.map(function (entry) {
|
|
3444
|
+
if (entry === null) {
|
|
3445
|
+
return null;
|
|
3446
|
+
}
|
|
3447
|
+
return entry;
|
|
3448
|
+
});
|
|
3449
|
+
};
|
|
3429
3450
|
var serializeAws_restJson1EndTimeRange = function (input, context) {
|
|
3430
3451
|
return __assign(__assign({}, (input.FromTime !== undefined &&
|
|
3431
3452
|
input.FromTime !== null && { FromTime: Math.round(input.FromTime.getTime() / 1000) })), (input.ToTime !== undefined && input.ToTime !== null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }));
|
|
@@ -3525,10 +3546,11 @@ var serializeAws_restJson1OrganizationalUnitIdList = function (input, context) {
|
|
|
3525
3546
|
});
|
|
3526
3547
|
};
|
|
3527
3548
|
var serializeAws_restJson1ResourceCollection = function (input, context) {
|
|
3528
|
-
return __assign({}, (input.CloudFormation !== undefined &&
|
|
3549
|
+
return __assign(__assign({}, (input.CloudFormation !== undefined &&
|
|
3529
3550
|
input.CloudFormation !== null && {
|
|
3530
3551
|
CloudFormation: serializeAws_restJson1CloudFormationCollection(input.CloudFormation, context),
|
|
3531
|
-
}))
|
|
3552
|
+
})), (input.Tags !== undefined &&
|
|
3553
|
+
input.Tags !== null && { Tags: serializeAws_restJson1TagCollections(input.Tags, context) }));
|
|
3532
3554
|
};
|
|
3533
3555
|
var serializeAws_restJson1SearchInsightsAccountIdList = function (input, context) {
|
|
3534
3556
|
return input
|
|
@@ -3593,15 +3615,58 @@ var serializeAws_restJson1StartTimeRange = function (input, context) {
|
|
|
3593
3615
|
return __assign(__assign({}, (input.FromTime !== undefined &&
|
|
3594
3616
|
input.FromTime !== null && { FromTime: Math.round(input.FromTime.getTime() / 1000) })), (input.ToTime !== undefined && input.ToTime !== null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }));
|
|
3595
3617
|
};
|
|
3618
|
+
var serializeAws_restJson1TagCollection = function (input, context) {
|
|
3619
|
+
return __assign(__assign({}, (input.AppBoundaryKey !== undefined &&
|
|
3620
|
+
input.AppBoundaryKey !== null && { AppBoundaryKey: input.AppBoundaryKey })), (input.TagValues !== undefined &&
|
|
3621
|
+
input.TagValues !== null && { TagValues: serializeAws_restJson1TagValues(input.TagValues, context) }));
|
|
3622
|
+
};
|
|
3623
|
+
var serializeAws_restJson1TagCollections = function (input, context) {
|
|
3624
|
+
return input
|
|
3625
|
+
.filter(function (e) { return e != null; })
|
|
3626
|
+
.map(function (entry) {
|
|
3627
|
+
if (entry === null) {
|
|
3628
|
+
return null;
|
|
3629
|
+
}
|
|
3630
|
+
return serializeAws_restJson1TagCollection(entry, context);
|
|
3631
|
+
});
|
|
3632
|
+
};
|
|
3633
|
+
var serializeAws_restJson1TagCostEstimationResourceCollectionFilter = function (input, context) {
|
|
3634
|
+
return __assign(__assign({}, (input.AppBoundaryKey !== undefined &&
|
|
3635
|
+
input.AppBoundaryKey !== null && { AppBoundaryKey: input.AppBoundaryKey })), (input.TagValues !== undefined &&
|
|
3636
|
+
input.TagValues !== null && {
|
|
3637
|
+
TagValues: serializeAws_restJson1CostEstimationTagValues(input.TagValues, context),
|
|
3638
|
+
}));
|
|
3639
|
+
};
|
|
3640
|
+
var serializeAws_restJson1TagCostEstimationResourceCollectionFilters = function (input, context) {
|
|
3641
|
+
return input
|
|
3642
|
+
.filter(function (e) { return e != null; })
|
|
3643
|
+
.map(function (entry) {
|
|
3644
|
+
if (entry === null) {
|
|
3645
|
+
return null;
|
|
3646
|
+
}
|
|
3647
|
+
return serializeAws_restJson1TagCostEstimationResourceCollectionFilter(entry, context);
|
|
3648
|
+
});
|
|
3649
|
+
};
|
|
3650
|
+
var serializeAws_restJson1TagValues = function (input, context) {
|
|
3651
|
+
return input
|
|
3652
|
+
.filter(function (e) { return e != null; })
|
|
3653
|
+
.map(function (entry) {
|
|
3654
|
+
if (entry === null) {
|
|
3655
|
+
return null;
|
|
3656
|
+
}
|
|
3657
|
+
return entry;
|
|
3658
|
+
});
|
|
3659
|
+
};
|
|
3596
3660
|
var serializeAws_restJson1UpdateCloudFormationCollectionFilter = function (input, context) {
|
|
3597
3661
|
return __assign({}, (input.StackNames !== undefined &&
|
|
3598
3662
|
input.StackNames !== null && { StackNames: serializeAws_restJson1UpdateStackNames(input.StackNames, context) }));
|
|
3599
3663
|
};
|
|
3600
3664
|
var serializeAws_restJson1UpdateResourceCollectionFilter = function (input, context) {
|
|
3601
|
-
return __assign({}, (input.CloudFormation !== undefined &&
|
|
3665
|
+
return __assign(__assign({}, (input.CloudFormation !== undefined &&
|
|
3602
3666
|
input.CloudFormation !== null && {
|
|
3603
3667
|
CloudFormation: serializeAws_restJson1UpdateCloudFormationCollectionFilter(input.CloudFormation, context),
|
|
3604
|
-
}))
|
|
3668
|
+
})), (input.Tags !== undefined &&
|
|
3669
|
+
input.Tags !== null && { Tags: serializeAws_restJson1UpdateTagCollectionFilters(input.Tags, context) }));
|
|
3605
3670
|
};
|
|
3606
3671
|
var serializeAws_restJson1UpdateServiceIntegrationConfig = function (input, context) {
|
|
3607
3672
|
return __assign({}, (input.OpsCenter !== undefined &&
|
|
@@ -3619,6 +3684,31 @@ var serializeAws_restJson1UpdateStackNames = function (input, context) {
|
|
|
3619
3684
|
return entry;
|
|
3620
3685
|
});
|
|
3621
3686
|
};
|
|
3687
|
+
var serializeAws_restJson1UpdateTagCollectionFilter = function (input, context) {
|
|
3688
|
+
return __assign(__assign({}, (input.AppBoundaryKey !== undefined &&
|
|
3689
|
+
input.AppBoundaryKey !== null && { AppBoundaryKey: input.AppBoundaryKey })), (input.TagValues !== undefined &&
|
|
3690
|
+
input.TagValues !== null && { TagValues: serializeAws_restJson1UpdateTagValues(input.TagValues, context) }));
|
|
3691
|
+
};
|
|
3692
|
+
var serializeAws_restJson1UpdateTagCollectionFilters = function (input, context) {
|
|
3693
|
+
return input
|
|
3694
|
+
.filter(function (e) { return e != null; })
|
|
3695
|
+
.map(function (entry) {
|
|
3696
|
+
if (entry === null) {
|
|
3697
|
+
return null;
|
|
3698
|
+
}
|
|
3699
|
+
return serializeAws_restJson1UpdateTagCollectionFilter(entry, context);
|
|
3700
|
+
});
|
|
3701
|
+
};
|
|
3702
|
+
var serializeAws_restJson1UpdateTagValues = function (input, context) {
|
|
3703
|
+
return input
|
|
3704
|
+
.filter(function (e) { return e != null; })
|
|
3705
|
+
.map(function (entry) {
|
|
3706
|
+
if (entry === null) {
|
|
3707
|
+
return null;
|
|
3708
|
+
}
|
|
3709
|
+
return entry;
|
|
3710
|
+
});
|
|
3711
|
+
};
|
|
3622
3712
|
var deserializeAws_restJson1AccountHealth = function (output, context) {
|
|
3623
3713
|
return {
|
|
3624
3714
|
AccountId: __expectString(output.AccountId),
|
|
@@ -3653,11 +3743,30 @@ var deserializeAws_restJson1AnomalyReportedTimeRange = function (output, context
|
|
|
3653
3743
|
: undefined,
|
|
3654
3744
|
};
|
|
3655
3745
|
};
|
|
3746
|
+
var deserializeAws_restJson1AnomalyResource = function (output, context) {
|
|
3747
|
+
return {
|
|
3748
|
+
Name: __expectString(output.Name),
|
|
3749
|
+
Type: __expectString(output.Type),
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
var deserializeAws_restJson1AnomalyResources = function (output, context) {
|
|
3753
|
+
return (output || [])
|
|
3754
|
+
.filter(function (e) { return e != null; })
|
|
3755
|
+
.map(function (entry) {
|
|
3756
|
+
if (entry === null) {
|
|
3757
|
+
return null;
|
|
3758
|
+
}
|
|
3759
|
+
return deserializeAws_restJson1AnomalyResource(entry, context);
|
|
3760
|
+
});
|
|
3761
|
+
};
|
|
3656
3762
|
var deserializeAws_restJson1AnomalySourceDetails = function (output, context) {
|
|
3657
3763
|
return {
|
|
3658
3764
|
CloudWatchMetrics: output.CloudWatchMetrics !== undefined && output.CloudWatchMetrics !== null
|
|
3659
3765
|
? deserializeAws_restJson1CloudWatchMetricsDetails(output.CloudWatchMetrics, context)
|
|
3660
3766
|
: undefined,
|
|
3767
|
+
PerformanceInsightsMetrics: output.PerformanceInsightsMetrics !== undefined && output.PerformanceInsightsMetrics !== null
|
|
3768
|
+
? deserializeAws_restJson1PerformanceInsightsMetricsDetails(output.PerformanceInsightsMetrics, context)
|
|
3769
|
+
: undefined,
|
|
3661
3770
|
};
|
|
3662
3771
|
};
|
|
3663
3772
|
var deserializeAws_restJson1AnomalyTimeRange = function (output, context) {
|
|
@@ -3670,6 +3779,16 @@ var deserializeAws_restJson1AnomalyTimeRange = function (output, context) {
|
|
|
3670
3779
|
: undefined,
|
|
3671
3780
|
};
|
|
3672
3781
|
};
|
|
3782
|
+
var deserializeAws_restJson1AssociatedResourceArns = function (output, context) {
|
|
3783
|
+
return (output || [])
|
|
3784
|
+
.filter(function (e) { return e != null; })
|
|
3785
|
+
.map(function (entry) {
|
|
3786
|
+
if (entry === null) {
|
|
3787
|
+
return null;
|
|
3788
|
+
}
|
|
3789
|
+
return __expectString(entry);
|
|
3790
|
+
});
|
|
3791
|
+
};
|
|
3673
3792
|
var deserializeAws_restJson1Channels = function (output, context) {
|
|
3674
3793
|
return (output || [])
|
|
3675
3794
|
.filter(function (e) { return e != null; })
|
|
@@ -3773,6 +3892,9 @@ var deserializeAws_restJson1CostEstimationResourceCollectionFilter = function (o
|
|
|
3773
3892
|
CloudFormation: output.CloudFormation !== undefined && output.CloudFormation !== null
|
|
3774
3893
|
? deserializeAws_restJson1CloudFormationCostEstimationResourceCollectionFilter(output.CloudFormation, context)
|
|
3775
3894
|
: undefined,
|
|
3895
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
3896
|
+
? deserializeAws_restJson1TagCostEstimationResourceCollectionFilters(output.Tags, context)
|
|
3897
|
+
: undefined,
|
|
3776
3898
|
};
|
|
3777
3899
|
};
|
|
3778
3900
|
var deserializeAws_restJson1CostEstimationStackNames = function (output, context) {
|
|
@@ -3785,6 +3907,16 @@ var deserializeAws_restJson1CostEstimationStackNames = function (output, context
|
|
|
3785
3907
|
return __expectString(entry);
|
|
3786
3908
|
});
|
|
3787
3909
|
};
|
|
3910
|
+
var deserializeAws_restJson1CostEstimationTagValues = function (output, context) {
|
|
3911
|
+
return (output || [])
|
|
3912
|
+
.filter(function (e) { return e != null; })
|
|
3913
|
+
.map(function (entry) {
|
|
3914
|
+
if (entry === null) {
|
|
3915
|
+
return null;
|
|
3916
|
+
}
|
|
3917
|
+
return __expectString(entry);
|
|
3918
|
+
});
|
|
3919
|
+
};
|
|
3788
3920
|
var deserializeAws_restJson1CostEstimationTimeRange = function (output, context) {
|
|
3789
3921
|
return {
|
|
3790
3922
|
EndTime: output.EndTime !== undefined && output.EndTime !== null
|
|
@@ -3883,6 +4015,130 @@ var deserializeAws_restJson1OpsCenterIntegration = function (output, context) {
|
|
|
3883
4015
|
OptInStatus: __expectString(output.OptInStatus),
|
|
3884
4016
|
};
|
|
3885
4017
|
};
|
|
4018
|
+
var deserializeAws_restJson1PerformanceInsightsMetricDimensionGroup = function (output, context) {
|
|
4019
|
+
return {
|
|
4020
|
+
Dimensions: output.Dimensions !== undefined && output.Dimensions !== null
|
|
4021
|
+
? deserializeAws_restJson1PerformanceInsightsMetricDimensions(output.Dimensions, context)
|
|
4022
|
+
: undefined,
|
|
4023
|
+
Group: __expectString(output.Group),
|
|
4024
|
+
Limit: __expectInt32(output.Limit),
|
|
4025
|
+
};
|
|
4026
|
+
};
|
|
4027
|
+
var deserializeAws_restJson1PerformanceInsightsMetricDimensions = function (output, context) {
|
|
4028
|
+
return (output || [])
|
|
4029
|
+
.filter(function (e) { return e != null; })
|
|
4030
|
+
.map(function (entry) {
|
|
4031
|
+
if (entry === null) {
|
|
4032
|
+
return null;
|
|
4033
|
+
}
|
|
4034
|
+
return __expectString(entry);
|
|
4035
|
+
});
|
|
4036
|
+
};
|
|
4037
|
+
var deserializeAws_restJson1PerformanceInsightsMetricFilterMap = function (output, context) {
|
|
4038
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
4039
|
+
var _b;
|
|
4040
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
4041
|
+
if (value === null) {
|
|
4042
|
+
return acc;
|
|
4043
|
+
}
|
|
4044
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
4045
|
+
}, {});
|
|
4046
|
+
};
|
|
4047
|
+
var deserializeAws_restJson1PerformanceInsightsMetricQuery = function (output, context) {
|
|
4048
|
+
return {
|
|
4049
|
+
Filter: output.Filter !== undefined && output.Filter !== null
|
|
4050
|
+
? deserializeAws_restJson1PerformanceInsightsMetricFilterMap(output.Filter, context)
|
|
4051
|
+
: undefined,
|
|
4052
|
+
GroupBy: output.GroupBy !== undefined && output.GroupBy !== null
|
|
4053
|
+
? deserializeAws_restJson1PerformanceInsightsMetricDimensionGroup(output.GroupBy, context)
|
|
4054
|
+
: undefined,
|
|
4055
|
+
Metric: __expectString(output.Metric),
|
|
4056
|
+
};
|
|
4057
|
+
};
|
|
4058
|
+
var deserializeAws_restJson1PerformanceInsightsMetricsDetail = function (output, context) {
|
|
4059
|
+
return {
|
|
4060
|
+
MetricDisplayName: __expectString(output.MetricDisplayName),
|
|
4061
|
+
MetricQuery: output.MetricQuery !== undefined && output.MetricQuery !== null
|
|
4062
|
+
? deserializeAws_restJson1PerformanceInsightsMetricQuery(output.MetricQuery, context)
|
|
4063
|
+
: undefined,
|
|
4064
|
+
ReferenceData: output.ReferenceData !== undefined && output.ReferenceData !== null
|
|
4065
|
+
? deserializeAws_restJson1PerformanceInsightsReferenceDataList(output.ReferenceData, context)
|
|
4066
|
+
: undefined,
|
|
4067
|
+
StatsAtAnomaly: output.StatsAtAnomaly !== undefined && output.StatsAtAnomaly !== null
|
|
4068
|
+
? deserializeAws_restJson1PerformanceInsightsStats(output.StatsAtAnomaly, context)
|
|
4069
|
+
: undefined,
|
|
4070
|
+
StatsAtBaseline: output.StatsAtBaseline !== undefined && output.StatsAtBaseline !== null
|
|
4071
|
+
? deserializeAws_restJson1PerformanceInsightsStats(output.StatsAtBaseline, context)
|
|
4072
|
+
: undefined,
|
|
4073
|
+
Unit: __expectString(output.Unit),
|
|
4074
|
+
};
|
|
4075
|
+
};
|
|
4076
|
+
var deserializeAws_restJson1PerformanceInsightsMetricsDetails = function (output, context) {
|
|
4077
|
+
return (output || [])
|
|
4078
|
+
.filter(function (e) { return e != null; })
|
|
4079
|
+
.map(function (entry) {
|
|
4080
|
+
if (entry === null) {
|
|
4081
|
+
return null;
|
|
4082
|
+
}
|
|
4083
|
+
return deserializeAws_restJson1PerformanceInsightsMetricsDetail(entry, context);
|
|
4084
|
+
});
|
|
4085
|
+
};
|
|
4086
|
+
var deserializeAws_restJson1PerformanceInsightsReferenceComparisonValues = function (output, context) {
|
|
4087
|
+
return {
|
|
4088
|
+
ReferenceMetric: output.ReferenceMetric !== undefined && output.ReferenceMetric !== null
|
|
4089
|
+
? deserializeAws_restJson1PerformanceInsightsReferenceMetric(output.ReferenceMetric, context)
|
|
4090
|
+
: undefined,
|
|
4091
|
+
ReferenceScalar: output.ReferenceScalar !== undefined && output.ReferenceScalar !== null
|
|
4092
|
+
? deserializeAws_restJson1PerformanceInsightsReferenceScalar(output.ReferenceScalar, context)
|
|
4093
|
+
: undefined,
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
var deserializeAws_restJson1PerformanceInsightsReferenceData = function (output, context) {
|
|
4097
|
+
return {
|
|
4098
|
+
ComparisonValues: output.ComparisonValues !== undefined && output.ComparisonValues !== null
|
|
4099
|
+
? deserializeAws_restJson1PerformanceInsightsReferenceComparisonValues(output.ComparisonValues, context)
|
|
4100
|
+
: undefined,
|
|
4101
|
+
Name: __expectString(output.Name),
|
|
4102
|
+
};
|
|
4103
|
+
};
|
|
4104
|
+
var deserializeAws_restJson1PerformanceInsightsReferenceDataList = function (output, context) {
|
|
4105
|
+
return (output || [])
|
|
4106
|
+
.filter(function (e) { return e != null; })
|
|
4107
|
+
.map(function (entry) {
|
|
4108
|
+
if (entry === null) {
|
|
4109
|
+
return null;
|
|
4110
|
+
}
|
|
4111
|
+
return deserializeAws_restJson1PerformanceInsightsReferenceData(entry, context);
|
|
4112
|
+
});
|
|
4113
|
+
};
|
|
4114
|
+
var deserializeAws_restJson1PerformanceInsightsReferenceMetric = function (output, context) {
|
|
4115
|
+
return {
|
|
4116
|
+
MetricQuery: output.MetricQuery !== undefined && output.MetricQuery !== null
|
|
4117
|
+
? deserializeAws_restJson1PerformanceInsightsMetricQuery(output.MetricQuery, context)
|
|
4118
|
+
: undefined,
|
|
4119
|
+
};
|
|
4120
|
+
};
|
|
4121
|
+
var deserializeAws_restJson1PerformanceInsightsReferenceScalar = function (output, context) {
|
|
4122
|
+
return {
|
|
4123
|
+
Value: __limitedParseDouble(output.Value),
|
|
4124
|
+
};
|
|
4125
|
+
};
|
|
4126
|
+
var deserializeAws_restJson1PerformanceInsightsStat = function (output, context) {
|
|
4127
|
+
return {
|
|
4128
|
+
Type: __expectString(output.Type),
|
|
4129
|
+
Value: __limitedParseDouble(output.Value),
|
|
4130
|
+
};
|
|
4131
|
+
};
|
|
4132
|
+
var deserializeAws_restJson1PerformanceInsightsStats = function (output, context) {
|
|
4133
|
+
return (output || [])
|
|
4134
|
+
.filter(function (e) { return e != null; })
|
|
4135
|
+
.map(function (entry) {
|
|
4136
|
+
if (entry === null) {
|
|
4137
|
+
return null;
|
|
4138
|
+
}
|
|
4139
|
+
return deserializeAws_restJson1PerformanceInsightsStat(entry, context);
|
|
4140
|
+
});
|
|
4141
|
+
};
|
|
3886
4142
|
var deserializeAws_restJson1PredictionTimeRange = function (output, context) {
|
|
3887
4143
|
return {
|
|
3888
4144
|
EndTime: output.EndTime !== undefined && output.EndTime !== null
|
|
@@ -3987,6 +4243,9 @@ var deserializeAws_restJson1ProactiveInsights = function (output, context) {
|
|
|
3987
4243
|
};
|
|
3988
4244
|
var deserializeAws_restJson1ProactiveInsightSummary = function (output, context) {
|
|
3989
4245
|
return {
|
|
4246
|
+
AssociatedResourceArns: output.AssociatedResourceArns !== undefined && output.AssociatedResourceArns !== null
|
|
4247
|
+
? deserializeAws_restJson1AssociatedResourceArns(output.AssociatedResourceArns, context)
|
|
4248
|
+
: undefined,
|
|
3990
4249
|
Id: __expectString(output.Id),
|
|
3991
4250
|
InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
|
|
3992
4251
|
? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
|
|
@@ -4052,11 +4311,17 @@ var deserializeAws_restJson1ReactiveAnomaly = function (output, context) {
|
|
|
4052
4311
|
AnomalyReportedTimeRange: output.AnomalyReportedTimeRange !== undefined && output.AnomalyReportedTimeRange !== null
|
|
4053
4312
|
? deserializeAws_restJson1AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
|
|
4054
4313
|
: undefined,
|
|
4314
|
+
AnomalyResources: output.AnomalyResources !== undefined && output.AnomalyResources !== null
|
|
4315
|
+
? deserializeAws_restJson1AnomalyResources(output.AnomalyResources, context)
|
|
4316
|
+
: undefined,
|
|
4055
4317
|
AnomalyTimeRange: output.AnomalyTimeRange !== undefined && output.AnomalyTimeRange !== null
|
|
4056
4318
|
? deserializeAws_restJson1AnomalyTimeRange(output.AnomalyTimeRange, context)
|
|
4057
4319
|
: undefined,
|
|
4058
4320
|
AssociatedInsightId: __expectString(output.AssociatedInsightId),
|
|
4321
|
+
CausalAnomalyId: __expectString(output.CausalAnomalyId),
|
|
4322
|
+
Description: __expectString(output.Description),
|
|
4059
4323
|
Id: __expectString(output.Id),
|
|
4324
|
+
Name: __expectString(output.Name),
|
|
4060
4325
|
ResourceCollection: output.ResourceCollection !== undefined && output.ResourceCollection !== null
|
|
4061
4326
|
? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context)
|
|
4062
4327
|
: undefined,
|
|
@@ -4065,6 +4330,7 @@ var deserializeAws_restJson1ReactiveAnomaly = function (output, context) {
|
|
|
4065
4330
|
? deserializeAws_restJson1AnomalySourceDetails(output.SourceDetails, context)
|
|
4066
4331
|
: undefined,
|
|
4067
4332
|
Status: __expectString(output.Status),
|
|
4333
|
+
Type: __expectString(output.Type),
|
|
4068
4334
|
};
|
|
4069
4335
|
};
|
|
4070
4336
|
var deserializeAws_restJson1ReactiveAnomalySummary = function (output, context) {
|
|
@@ -4072,11 +4338,17 @@ var deserializeAws_restJson1ReactiveAnomalySummary = function (output, context)
|
|
|
4072
4338
|
AnomalyReportedTimeRange: output.AnomalyReportedTimeRange !== undefined && output.AnomalyReportedTimeRange !== null
|
|
4073
4339
|
? deserializeAws_restJson1AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context)
|
|
4074
4340
|
: undefined,
|
|
4341
|
+
AnomalyResources: output.AnomalyResources !== undefined && output.AnomalyResources !== null
|
|
4342
|
+
? deserializeAws_restJson1AnomalyResources(output.AnomalyResources, context)
|
|
4343
|
+
: undefined,
|
|
4075
4344
|
AnomalyTimeRange: output.AnomalyTimeRange !== undefined && output.AnomalyTimeRange !== null
|
|
4076
4345
|
? deserializeAws_restJson1AnomalyTimeRange(output.AnomalyTimeRange, context)
|
|
4077
4346
|
: undefined,
|
|
4078
4347
|
AssociatedInsightId: __expectString(output.AssociatedInsightId),
|
|
4348
|
+
CausalAnomalyId: __expectString(output.CausalAnomalyId),
|
|
4349
|
+
Description: __expectString(output.Description),
|
|
4079
4350
|
Id: __expectString(output.Id),
|
|
4351
|
+
Name: __expectString(output.Name),
|
|
4080
4352
|
ResourceCollection: output.ResourceCollection !== undefined && output.ResourceCollection !== null
|
|
4081
4353
|
? deserializeAws_restJson1ResourceCollection(output.ResourceCollection, context)
|
|
4082
4354
|
: undefined,
|
|
@@ -4085,6 +4357,7 @@ var deserializeAws_restJson1ReactiveAnomalySummary = function (output, context)
|
|
|
4085
4357
|
? deserializeAws_restJson1AnomalySourceDetails(output.SourceDetails, context)
|
|
4086
4358
|
: undefined,
|
|
4087
4359
|
Status: __expectString(output.Status),
|
|
4360
|
+
Type: __expectString(output.Type),
|
|
4088
4361
|
};
|
|
4089
4362
|
};
|
|
4090
4363
|
var deserializeAws_restJson1ReactiveInsight = function (output, context) {
|
|
@@ -4114,6 +4387,9 @@ var deserializeAws_restJson1ReactiveInsights = function (output, context) {
|
|
|
4114
4387
|
};
|
|
4115
4388
|
var deserializeAws_restJson1ReactiveInsightSummary = function (output, context) {
|
|
4116
4389
|
return {
|
|
4390
|
+
AssociatedResourceArns: output.AssociatedResourceArns !== undefined && output.AssociatedResourceArns !== null
|
|
4391
|
+
? deserializeAws_restJson1AssociatedResourceArns(output.AssociatedResourceArns, context)
|
|
4392
|
+
: undefined,
|
|
4117
4393
|
Id: __expectString(output.Id),
|
|
4118
4394
|
InsightTimeRange: output.InsightTimeRange !== undefined && output.InsightTimeRange !== null
|
|
4119
4395
|
? deserializeAws_restJson1InsightTimeRange(output.InsightTimeRange, context)
|
|
@@ -4184,6 +4460,7 @@ var deserializeAws_restJson1RecommendationRelatedAnomalies = function (output, c
|
|
|
4184
4460
|
};
|
|
4185
4461
|
var deserializeAws_restJson1RecommendationRelatedAnomaly = function (output, context) {
|
|
4186
4462
|
return {
|
|
4463
|
+
AnomalyId: __expectString(output.AnomalyId),
|
|
4187
4464
|
Resources: output.Resources !== undefined && output.Resources !== null
|
|
4188
4465
|
? deserializeAws_restJson1RecommendationRelatedAnomalyResources(output.Resources, context)
|
|
4189
4466
|
: undefined,
|
|
@@ -4290,6 +4567,9 @@ var deserializeAws_restJson1ResourceCollection = function (output, context) {
|
|
|
4290
4567
|
CloudFormation: output.CloudFormation !== undefined && output.CloudFormation !== null
|
|
4291
4568
|
? deserializeAws_restJson1CloudFormationCollection(output.CloudFormation, context)
|
|
4292
4569
|
: undefined,
|
|
4570
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
4571
|
+
? deserializeAws_restJson1TagCollections(output.Tags, context)
|
|
4572
|
+
: undefined,
|
|
4293
4573
|
};
|
|
4294
4574
|
};
|
|
4295
4575
|
var deserializeAws_restJson1ResourceCollectionFilter = function (output, context) {
|
|
@@ -4297,6 +4577,9 @@ var deserializeAws_restJson1ResourceCollectionFilter = function (output, context
|
|
|
4297
4577
|
CloudFormation: output.CloudFormation !== undefined && output.CloudFormation !== null
|
|
4298
4578
|
? deserializeAws_restJson1CloudFormationCollectionFilter(output.CloudFormation, context)
|
|
4299
4579
|
: undefined,
|
|
4580
|
+
Tags: output.Tags !== undefined && output.Tags !== null
|
|
4581
|
+
? deserializeAws_restJson1TagCollectionFilters(output.Tags, context)
|
|
4582
|
+
: undefined,
|
|
4300
4583
|
};
|
|
4301
4584
|
};
|
|
4302
4585
|
var deserializeAws_restJson1ServiceCollection = function (output, context) {
|
|
@@ -4381,6 +4664,89 @@ var deserializeAws_restJson1StackNames = function (output, context) {
|
|
|
4381
4664
|
return __expectString(entry);
|
|
4382
4665
|
});
|
|
4383
4666
|
};
|
|
4667
|
+
var deserializeAws_restJson1TagCollection = function (output, context) {
|
|
4668
|
+
return {
|
|
4669
|
+
AppBoundaryKey: __expectString(output.AppBoundaryKey),
|
|
4670
|
+
TagValues: output.TagValues !== undefined && output.TagValues !== null
|
|
4671
|
+
? deserializeAws_restJson1TagValues(output.TagValues, context)
|
|
4672
|
+
: undefined,
|
|
4673
|
+
};
|
|
4674
|
+
};
|
|
4675
|
+
var deserializeAws_restJson1TagCollectionFilter = function (output, context) {
|
|
4676
|
+
return {
|
|
4677
|
+
AppBoundaryKey: __expectString(output.AppBoundaryKey),
|
|
4678
|
+
TagValues: output.TagValues !== undefined && output.TagValues !== null
|
|
4679
|
+
? deserializeAws_restJson1TagValues(output.TagValues, context)
|
|
4680
|
+
: undefined,
|
|
4681
|
+
};
|
|
4682
|
+
};
|
|
4683
|
+
var deserializeAws_restJson1TagCollectionFilters = function (output, context) {
|
|
4684
|
+
return (output || [])
|
|
4685
|
+
.filter(function (e) { return e != null; })
|
|
4686
|
+
.map(function (entry) {
|
|
4687
|
+
if (entry === null) {
|
|
4688
|
+
return null;
|
|
4689
|
+
}
|
|
4690
|
+
return deserializeAws_restJson1TagCollectionFilter(entry, context);
|
|
4691
|
+
});
|
|
4692
|
+
};
|
|
4693
|
+
var deserializeAws_restJson1TagCollections = function (output, context) {
|
|
4694
|
+
return (output || [])
|
|
4695
|
+
.filter(function (e) { return e != null; })
|
|
4696
|
+
.map(function (entry) {
|
|
4697
|
+
if (entry === null) {
|
|
4698
|
+
return null;
|
|
4699
|
+
}
|
|
4700
|
+
return deserializeAws_restJson1TagCollection(entry, context);
|
|
4701
|
+
});
|
|
4702
|
+
};
|
|
4703
|
+
var deserializeAws_restJson1TagCostEstimationResourceCollectionFilter = function (output, context) {
|
|
4704
|
+
return {
|
|
4705
|
+
AppBoundaryKey: __expectString(output.AppBoundaryKey),
|
|
4706
|
+
TagValues: output.TagValues !== undefined && output.TagValues !== null
|
|
4707
|
+
? deserializeAws_restJson1CostEstimationTagValues(output.TagValues, context)
|
|
4708
|
+
: undefined,
|
|
4709
|
+
};
|
|
4710
|
+
};
|
|
4711
|
+
var deserializeAws_restJson1TagCostEstimationResourceCollectionFilters = function (output, context) {
|
|
4712
|
+
return (output || [])
|
|
4713
|
+
.filter(function (e) { return e != null; })
|
|
4714
|
+
.map(function (entry) {
|
|
4715
|
+
if (entry === null) {
|
|
4716
|
+
return null;
|
|
4717
|
+
}
|
|
4718
|
+
return deserializeAws_restJson1TagCostEstimationResourceCollectionFilter(entry, context);
|
|
4719
|
+
});
|
|
4720
|
+
};
|
|
4721
|
+
var deserializeAws_restJson1TagHealth = function (output, context) {
|
|
4722
|
+
return {
|
|
4723
|
+
AppBoundaryKey: __expectString(output.AppBoundaryKey),
|
|
4724
|
+
Insight: output.Insight !== undefined && output.Insight !== null
|
|
4725
|
+
? deserializeAws_restJson1InsightHealth(output.Insight, context)
|
|
4726
|
+
: undefined,
|
|
4727
|
+
TagValue: __expectString(output.TagValue),
|
|
4728
|
+
};
|
|
4729
|
+
};
|
|
4730
|
+
var deserializeAws_restJson1TagHealths = function (output, context) {
|
|
4731
|
+
return (output || [])
|
|
4732
|
+
.filter(function (e) { return e != null; })
|
|
4733
|
+
.map(function (entry) {
|
|
4734
|
+
if (entry === null) {
|
|
4735
|
+
return null;
|
|
4736
|
+
}
|
|
4737
|
+
return deserializeAws_restJson1TagHealth(entry, context);
|
|
4738
|
+
});
|
|
4739
|
+
};
|
|
4740
|
+
var deserializeAws_restJson1TagValues = function (output, context) {
|
|
4741
|
+
return (output || [])
|
|
4742
|
+
.filter(function (e) { return e != null; })
|
|
4743
|
+
.map(function (entry) {
|
|
4744
|
+
if (entry === null) {
|
|
4745
|
+
return null;
|
|
4746
|
+
}
|
|
4747
|
+
return __expectString(entry);
|
|
4748
|
+
});
|
|
4749
|
+
};
|
|
4384
4750
|
var deserializeAws_restJson1TimestampMetricValuePair = function (output, context) {
|
|
4385
4751
|
return {
|
|
4386
4752
|
MetricValue: __limitedParseDouble(output.MetricValue),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
6
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
7
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
|
10
10
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
11
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
12
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
13
15
|
export var getRuntimeConfig = function (config) {
|
|
14
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
15
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
21
|
+
switch (_a.label) {
|
|
22
|
+
case 0: return [4, defaultConfigProvider()];
|
|
23
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
24
|
+
}
|
|
25
|
+
}); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
17
26
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
4
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
5
5
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
6
6
|
import { Hash } from "@aws-sdk/hash-node";
|
|
7
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
10
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
11
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
12
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
13
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
-
import {
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
16
17
|
export var getRuntimeConfig = function (config) {
|
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
19
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
22
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0: return [4, defaultConfigProvider()];
|
|
25
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
26
|
+
}
|
|
27
|
+
}); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
21
28
|
};
|