8000 Update ASF APIs, update provider signatures (#11822) · localstack/localstack@939b99d · GitHub
[go: up one dir, main page]

Skip to content

Commit 939b99d

Browse files
Update ASF APIs, update provider signatures (#11822)
Co-authored-by: LocalStack Bot <localstack-bot@users.noreply.github.com> Co-authored-by: Alexander Rashed <alexander.rashed@localstack.cloud>
1 parent edb1599 commit 939b99d

File tree

21 files changed

+648
-81
lines changed

21 files changed

+648
-81
lines changed

localstack-core/localstack/aws/api/cloudcontrol/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
ClientToken = str
88
ErrorMessage = str
99
HandlerNextToken = str
10+
HookFailureMode = str
11+
HookInvocationPoint = str
12+
HookStatus = str
13+
HookTypeArn = str
1014
Identifier = str
1115
MaxResults = int
1216
NextToken = str
@@ -23,6 +27,7 @@ class HandlerErrorCode(StrEnum):
2327
NotUpdatable = "NotUpdatable"
2428
InvalidRequest = "InvalidRequest"
2529
AccessDenied = "AccessDenied"
30+
UnauthorizedTaggingOperation = "UnauthorizedTaggingOperation"
2631
InvalidCredentials = "InvalidCredentials"
2732
AlreadyExists = "AlreadyExists"
2833
NotFound = "NotFound"
@@ -189,6 +194,7 @@ class ProgressEvent(TypedDict, total=False):
189194
TypeName: Optional[TypeName]
190195
Identifier: Optional[Identifier]
191196
RequestToken: Optional[RequestToken]
197+
HooksRequestToken: Optional[RequestToken]
192198
Operation: Optional[Operation]
193199
OperationStatus: Optional[OperationStatus]
194200
EventTime: Optional[Timestamp]
@@ -247,8 +253,23 @@ class GetResourceRequestStatusInput(ServiceRequest):
247253
RequestToken: RequestToken
248254

249255

256+
class HookProgressEvent(TypedDict, total=False):
257+
HookTypeName: Optional[TypeName]
258+
HookTypeVersionId: Optional[TypeVersionId]
259+
HookTypeArn: Optional[HookTypeArn]
260+
InvocationPoint: Optional[HookInvocationPoint]
261+
HookStatus: Optional[HookStatus]
262+
HookEventTime: Optional[Timestamp]
263+
HookStatusMessage: Optional[StatusMessage]
264+
FailureMode: Optional[HookFailureMode]
265+
266+
267+
HooksProgressEvent = List[HookProgressEvent]
268+
269+
250270
class GetResourceRequestStatusOutput(TypedDict, total=False):
251271
ProgressEvent: Optional[ProgressEvent]
272+
HooksProgressEvent: Optional[HooksProgressEvent]
252273

253274

254275
OperationStatuses = List[OperationStatus]

localstack-core/localstack/aws/api/cloudwatch/__init__.py

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
DatapointsToAlarm = int
2828
DimensionName = str
2929
DimensionValue = str
30+
EntityAttributesMapKeyString = str
31+
EntityAttributesMapValueString = str
32+
EntityKeyAttributesMapKeyString = str
33+
EntityKeyAttributesMapValueString = str
3034
ErrorMessage = str
3135
EvaluateLowSampleCountPercentile = str
3236
EvaluationPeriods = int
@@ -82,6 +86,7 @@
8286
StateReason = str
8387
StateReasonData = str
8488
StorageResolution = int
89+
StrictEntityValidation = bool
8590
SuppressorPeriod = int
8691
TagKey = str
8792
TagValue = str
@@ -643,6 +648,46 @@ class EnableInsightRulesOutput(TypedDict, total=False):
643648
Failures: Optional[BatchFailures]
644649

645650

651+
EntityAttributesMap = Dict[EntityAttributesMapKeyString, EntityAttributesMapValueString]
652+
EntityKeyAttributesMap = Dict[EntityKeyAttributesMapKeyString, EntityKeyAttributesMapValueString]
653+
654+
655+
class Entity(TypedDict, total=False):
656+
KeyAttributes: Optional[EntityKeyAttributesMap]
657+
Attributes: Optional[EntityAttributesMap]
658+
659+
660+
Values = List[DatapointValue]
661+
662+
663+
class StatisticSet(TypedDict, total=False):
664+
SampleCount: DatapointValue
665+
Sum: DatapointValue
666+
Minimum: DatapointValue
667+
Maximum: DatapointValue
668+
669+
670+
class MetricDatum(TypedDict, total=False):
671+
MetricName: MetricName
672+
Dimensions: Optional[Dimensions]
673+
Timestamp: Optional[Timestamp]
674+
Value: Optional[DatapointValue]
675+
StatisticValues: Optional[StatisticSet]
676+
Values: Optional[Values]
677+
Counts: Optional[Counts]
678+
Unit: Optional[StandardUnit]
679+
StorageResolution: Optional[StorageResolution]
680+
681+
682+
MetricData = List[MetricDatum]
683+
684+
685+
class EntityMetricData(TypedDict, total=False):
686+
Entity: Optional[Entity]
687+
MetricData: Optional[MetricData]
688+
689+
690+
EntityMetricDataList = List[EntityMetricData]
646691
ExtendedStatistics = List[ExtendedStatistic]
647692

648693

@@ -933,29 +978,6 @@ class ManagedRule(TypedDict, total=False):
933978

934979

935980
ManagedRules = List[ManagedRule]
936-
Values = List[DatapointValue]
937-
938-
939-
class StatisticSet(TypedDict, total=False):
940-
SampleCount: DatapointValue
941-
Sum: DatapointValue
942-
Minimum: DatapointValue
943-
Maximum: DatapointValue
944-
945-
946-
class MetricDatum(TypedDict, total=False):
947-
MetricName: MetricName
948-
Dimensions: Optional[Dimensions]
949-
Timestamp: Optional[Timestamp]
950-
Value: Optional[DatapointValue]
951-
StatisticValues: Optional[StatisticSet]
952-
Values: Optional[Values]
953-
Counts: Optional[Counts]
954-
Unit: Optional[StandardUnit]
955-
StorageResolution: Optional[StorageResolution]
956-
957-
958-
MetricData = List[MetricDatum]
959981
MetricStreamNames = List[MetricStreamName]
960982

961983

@@ -1043,7 +1065,9 @@ class PutMetricAlarmInput(ServiceRequest):
10431065

10441066
class PutMetricDataInput(ServiceRequest):
10451067
Namespace: Namespace
1046-
MetricData: MetricData
1068+
MetricData: Optional[MetricData]
1069+
EntityMetricData: Optional[EntityMetricDataList]
1070+
StrictEntityValidation: Optional[StrictEntityValidation]
10471071

10481072

10491073
class PutMetricStreamInput(ServiceRequest):
@@ -1458,7 +1482,13 @@ def put_metric_alarm(
14581482

14591483
@handler("PutMetricData")
14601484
def put_metric_data(
1461-
self, context: RequestContext, namespace: Namespace, metric_data: MetricData, **kwargs
1485+
self,
1486+
context: RequestContext,
1487+
namespace: Namespace,
1488+
metric_data: MetricData = None,
1489+
entity_metric_data: EntityMetricDataList = None,
1490+
strict_entity_validation: StrictEntityValidation = None,
1491+
**kwargs,
14621492
) -> None:
14631493
raise NotImplementedError
14641494

localstack-core/localstack/aws/api/dynamodb/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,12 +972,18 @@ class CreateBackupOutput(TypedDict, total=False):
972972
BackupDetails: Optional[BackupDetails]
973973

974974

975+
class WarmThroughput(TypedDict, total=False):
976+
ReadUnitsPerSecond: Optional[LongObject]
977+
WriteUnitsPerSecond: Optional[LongObject]
978+
979+
975980
class CreateGlobalSecondaryIndexAction(TypedDict, total=False):
976981
IndexName: IndexName
977982
KeySchema: KeySchema
978983
Projection: Projection
979984
ProvisionedThroughput: Optional[ProvisionedThroughput]
980985
OnDemandThroughput: Optional[OnDemandThroughput]
986+
WarmThroughput: Optional[WarmThroughput]
981987

982988

983989
class Replica(TypedDict, total=False):
@@ -997,6 +1003,12 @@ class TableClassSummary(TypedDict, total=False):
9971003
LastUpdateDateTime: Optional[Date]
9981004

9991005

1006+
class GlobalSecondaryIndexWarmThroughputDescription(TypedDict, total=False):
1007+
ReadUnitsPerSecond: Optional[PositiveLongObject]
1008+
WriteUnitsPerSecond: Optional[PositiveLongObject]
1009+
Status: Optional[IndexStatus]
1010+
1011+
10001012
class OnDemandThroughputOverride(TypedDict, total=False):
10011013
MaxReadRequestUnits: Optional[LongObject]
10021014

@@ -1009,11 +1021,18 @@ class ReplicaGlobalSecondaryIndexDescription(TypedDict, total=False):
10091021
IndexName: Optional[IndexName]
10101022
ProvisionedThroughputOverride: Optional[ProvisionedThroughputOverride]
10111023
OnDemandThroughputOverride: Optional[OnDemandThroughputOverride]
1024+
WarmThroughput: Optional[GlobalSecondaryIndexWarmThroughputDescription]
10121025

10131026

10141027
ReplicaGlobalSecondaryIndexDescriptionList = List[ReplicaGlobalSecondaryIndexDescription]
10151028

10161029

1030+
class TableWarmThroughputDescription(TypedDict, total=False):
1031+
ReadUnitsPerSecond: Optional[PositiveLongObject]
1032+
WriteUnitsPerSecond: Optional[PositiveLongObject]
1033+
Status: Optional[TableStatus]
1034+
1035+
10171036
class ReplicaDescription(TypedDict, total=False):
10181037
RegionName: Optional[RegionName]
10191038
ReplicaStatus: Optional[ReplicaStatus]
@@ -1022,6 +1041,7 @@ class ReplicaDescription(TypedDict, total=False):
10221041
KMSMasterKeyId: Optional[KMSMasterKeyId]
10231042
ProvisionedThroughputOverride: Optional[ProvisionedThroughputOverride]
10241043
OnDemandThroughputOverride: Optional[OnDemandThroughputOverride]
1044+
WarmThroughput: Optional[TableWarmThroughputDescription]
10251045
GlobalSecondaryIndexes: Optional[ReplicaGlobalSecondaryIndexDescriptionList]
10261046
ReplicaInaccessibleDateTime: Optional[Date]
10271047
ReplicaTableClassSummary: Optional[TableClassSummary]
@@ -1084,6 +1104,7 @@ class GlobalSecondaryIndex(TypedDict, total=False):
10841104
Projection: Projection
10851105
ProvisionedThroughput: Optional[ProvisionedThroughput]
10861106
OnDemandThroughput: Optional[OnDemandThroughput]
1107+
WarmThroughput: Optional[WarmThroughput]
10871108

10881109

10891110
GlobalSecondaryIndexList = List[GlobalSecondaryIndex]
@@ -1111,6 +1132,7 @@ class CreateTableInput(ServiceRequest):
11111132
Tags: Optional[TagList]
11121133
TableClass: Optional[TableClass]
11131134
DeletionProtectionEnabled: Optional[DeletionProtectionEnabled]
1135+
WarmThroughput: Optional[WarmThroughput]
11141136
ResourcePolicy: Optional[ResourcePolicy]
11151137
OnDemandThroughput: Optional[OnDemandThroughput]
11161138

@@ -1144,6 +1166,7 @@ class GlobalSecondaryIndexDescription(TypedDict, total=False):
11441166
ItemCount: Optional[LongObject]
11451167
IndexArn: Optional[String]
11461168
OnDemandThroughput: Optional[OnDemandThroughput]
1169+
WarmThroughput: Optional[GlobalSecondaryIndexWarmThroughputDescription]
11471170

11481171

11491172
GlobalSecondaryIndexDescriptionList = List[GlobalSecondaryIndexDescription]
@@ -1186,6 +1209,7 @@ class TableDescription(TypedDict, total=False):
11861209
TableClassSummary: Optional[TableClassSummary]
11871210
DeletionProtectionEnabled: Optional[DeletionProtectionEnabled]
11881211
OnDemandThroughput: Optional[OnDemandThroughput]
1212+
WarmThroughput: Optional[TableWarmThroughputDescription]
11891213

11901214

11911215
class CreateTableOutput(TypedDict, total=False):
@@ -1692,6 +1716,7 @@ class UpdateGlobalSecondaryIndexAction(TypedDict, total=False):
16921716
IndexName: IndexName
16931717
ProvisionedThroughput: Optional[ProvisionedThroughput]
16941718
OnDemandThroughput: Optional[OnDemandThroughput]
1719+
WarmThroughput: Optional[WarmThroughput]
16951720

16961721

16971722
class GlobalSecondaryIndexUpdate(TypedDict, total=False):
@@ -2213,6 +2238,7 @@ class UpdateTableInput(ServiceRequest):
22132238
TableClass: Optional[TableClass]
22142239
DeletionProtectionEnabled: Optional[DeletionProtectionEnabled]
22152240
OnDemandThroughput: Optional[OnDemandThroughput]
2241+
WarmThroughput: Optional[WarmThroughput]
22162242

22172243

22182244
class UpdateTableOutput(TypedDict, total=False):
@@ -2306,6 +2332,7 @@ def create_table(
23062332
tags: TagList = None,
23072333
table_class: TableClass = None,
23082334
deletion_protection_enabled: DeletionProtectionEnabled = None,
2335+
warm_throughput: WarmThroughput = None,
23092336
resource_policy: ResourcePolicy = None,
23102337
on_demand_throughput: OnDemandThroughput = None,
23112338
**kwargs,
@@ -2852,6 +2879,7 @@ def update_table(
28522879
table_class: TableClass = None,
28532880
deletion_protection_enabled: DeletionProtectionEnabled = None,
28542881
on_demand_throughput: OnDemandThroughput = None,
2882+
warm_throughput: WarmThroughput = None,
28552883
**kwargs,
28562884
) -> UpdateTableOutput:
28572885
raise NotImplementedError

localstack-core/localstack/aws/api/ec2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,6 @@ class FleetCapacityReservationTenancy(StrEnum):
10121012

10131013
class FleetCapacityReservationUsageStrategy(StrEnum):
10141014
use_capacity_reservations_first = "use-capacity-reservations-first"
1015-
use_capacity_reservations_only = "use-capacity-reservations-only"
1016-
none = "none"
10171015

10181016

10191017
class FleetEventType(StrEnum):
@@ -11253,6 +11251,8 @@ class Image(TypedDict, total=False):
1125311251
SourceInstanceId: Optional[String]
1125411252
DeregistrationProtection: Optional[String]
1125511253
LastLaunchedTime: Optional[String]
11254+
SourceImageId: Optional[String]
11255+
SourceImageRegion: Optional[String]
1125611256
ImageId: Optional[String]
1125711257
ImageLocation: Optional[String]
1125811258
State: Optional[ImageState]

0 commit comments

Comments
 (0)
0