Skip to content

Commit 8c9d9b0

Browse files
Update ASF APIs, update s3 provider signature (#11718)
Co-authored-by: LocalStack Bot <localstack-bot@users.noreply.github.com> Co-authored-by: Alexander Rashed <alexander.rashed@localstack.cloud>
1 parent 28e81d1 commit 8c9d9b0

10 files changed

+183
-20
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18089,7 +18089,7 @@ class RequestSpotLaunchSpecification(TypedDict, total=False):
1808918089
ImageId: Optional[ImageId]
1809018090
InstanceType: Optional[InstanceType]
1809118091
KernelId: Optional[KernelId]
18092-
KeyName: Optional[KeyPairName]
18092+
KeyName: Optional[KeyPairNameWithResolver]
1809318093
Monitoring: Optional[RunInstancesMonitoringEnabled]
1809418094
NetworkInterfaces: Optional[InstanceNetworkInterfaceSpecificationList]
1809518095
Placement: Optional[SpotPlacement]

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

Lines changed: 155 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import datetime
22
from enum import StrEnum
3-
from typing import List, Optional, TypedDict
3+
from typing import Dict, List, Optional, TypedDict
44

55
from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
66

@@ -9,12 +9,16 @@
99
BooleanOptional = bool
1010
CustomDomainCertificateArnString = str
1111
CustomDomainNameString = str
12+
Description = str
1213
Double = float
1314
DoubleOptional = float
1415
IdcDisplayNameString = str
1516
IdentityNamespaceString = str
1617
Integer = int
1718
IntegerOptional = int
19+
IntegrationArn = str
20+
IntegrationDescription = str
21+
IntegrationName = str
1822
PartnerIntegrationAccountId = str
1923
PartnerIntegrationClusterIdentifier = str
2024
PartnerIntegrationDatabaseName = str
@@ -71,6 +75,13 @@ class DataShareStatusForProducer(StrEnum):
7175
REJECTED = "REJECTED"
7276

7377

78+
class DescribeIntegrationsFilterName(StrEnum):
79+
integration_arn = "integration-arn"
80+
source_arn = "source-arn"
81+
source_types = "source-types"
82+
status = "status"
83+
84+
7485
class ImpactRankingType(StrEnum):
7586
HIGH = "HIGH"
7687
MEDIUM = "MEDIUM"
@@ -545,12 +556,48 @@ class InsufficientS3BucketPolicyFault(ServiceException):
545556
status_code: int = 400
546557

547558

559+
class IntegrationAlreadyExistsFault(ServiceException):
560+
code: str = "IntegrationAlreadyExistsFault"
561+
sender_fault: bool = True
562+
status_code: int = 400
563+
564+
565+
class IntegrationConflictOperationFault(ServiceException):
566+
code: str = "IntegrationConflictOperationFault"
567+
sender_fault: bool = True
568+
status_code: int = 400
569+
570+
571+
class IntegrationConflictStateFault(ServiceException):
572+
code: str = "IntegrationConflictStateFault"
573+
sender_fault: bool = True
574+
status_code: int = 400
575+
576+
548577
class IntegrationNotFoundFault(ServiceException):
549578
code: str = "IntegrationNotFoundFault"
550579
sender_fault: bool = True
551580
status_code: int = 404
552581

553582

583+
class IntegrationQuotaExceededFault(ServiceException):
584+
code: str = "IntegrationQuotaExceededFault"
585+
sender_fault: bool = True
586+
status_code: int = 400
587+
588+
589+
class IntegrationSourceNotFoundFault(ServiceException):
590+
code: str = "IntegrationSourceNotFoundFault"
591+
sender_fault: bool = True
592+
status_code: int = 404
593+
594+
595+
class IntegrationTargetNotFoundFault(ServiceException):
596+
code: str = "IntegrationTargetNotFoundFault"
597+
sender_fault: bool = True
598+
status_code: int = 404
599+
600+
554601
class InvalidAuthenticationProfileRequestFault(ServiceException):
555602
code: str = "InvalidAuthenticationProfileRequestFault"
556603
sender_fault: bool = True
@@ -1910,6 +1957,19 @@ class CreateHsmConfigurationResult(TypedDict, total=False):
19101957
HsmConfiguration: Optional[HsmConfiguration]
19111958

19121959

1960+
EncryptionContextMap = Dict[String, String]
1961+
1962+
1963+
class CreateIntegrationMessage(ServiceRequest):
1964+
SourceArn: String
1965+
TargetArn: String
1966+
IntegrationName: IntegrationName
1967+
KMSKeyId: Optional[String]
1968+
TagList: Optional[TagList]
1969+
AdditionalEncryptionContext: Optional[EncryptionContextMap]
1970+
Description: Optional[IntegrationDescription]
1971+
1972+
19131973
class LakeFormationQuery(TypedDict, total=False):
19141974
Authorization: ServiceAuthorization
19151975

@@ -2135,6 +2195,10 @@ class DeleteHsmConfigurationMessage(ServiceRequest):
21352195
HsmConfigurationIdentifier: String
21362196

21372197

2198+
class DeleteIntegrationMessage(ServiceRequest):
2199+
IntegrationArn: IntegrationArn
2200+
2201+
21382202
class DeleteRedshiftIdcApplicationMessage(ServiceRequest):
21392203
RedshiftIdcApplicationArn: String
21402204

@@ -2378,6 +2442,24 @@ class DescribeInboundIntegrationsMessage(ServiceRequest):
23782442
Marker: Optional[String]
23792443

23802444

2445+
DescribeIntegrationsFilterValueList = List[String]
2446+
2447+
2448+
class DescribeIntegrationsFilter(TypedDict, total=False):
2449+
Name: DescribeIntegrationsFilterName
2450+
Values: DescribeIntegrationsFilterValueList
2451+
2452+
2453+
DescribeIntegrationsFilterList = List[DescribeIntegrationsFilter]
2454+
2455+
2456+
class DescribeIntegrationsMessage(ServiceRequest):
2457+
IntegrationArn: Optional[IntegrationArn]
2458+
MaxRecords: Optional[IntegerOptional]
2459+
Marker: Optional[String]
2460+
Filters: Optional[DescribeIntegrationsFilterList]
2461+
2462+
23812463
class DescribeLoggingStatusMessage(ServiceRequest):
23822464
ClusterIdentifier: String
23832465

@@ -2835,6 +2917,28 @@ class InboundIntegrationsMessage(TypedDict, total=False):
28352917
InboundIntegrations: Optional[InboundIntegrationList]
28362918

28372919

2920+
class Integration(TypedDict, total=False):
2921+
IntegrationArn: Optional[String]
2922+
IntegrationName: Optional[IntegrationName]
2923+
SourceArn: Optional[String]
2924+
TargetArn: Optional[String]
2925+
Status: Optional[ZeroETLIntegrationStatus]
2926+
Errors: Optional[IntegrationErrorList]
2927+
CreateTime: Optional[TStamp]
2928+
Description: Optional[Description]
2929+
KMSKeyId: Optional[String]
2930+
AdditionalEncryptionContext: Optional[EncryptionContextMap]
2931+
Tags: Optional[TagList]
2932+
2933+
2934+
IntegrationList = List[Integration]
2935+
2936+
2937+
class IntegrationsMessage(TypedDict, total=False):
2938+
Marker: Optional[String]
2939+
Integrations: Optional[IntegrationList]
2940+
2941+
28382942
class ListRecommendationsMessage(ServiceRequest):
28392943
ClusterIdentifier: Optional[String]
28402944
NamespaceArn: Optional[String]
@@ -3051,6 +3155,12 @@ class ModifyEventSubscriptionResult(TypedDict, total=False):
30513155
EventSubscription: Optional[EventSubscription]
30523156

30533157

3158+
class ModifyIntegrationMessage(ServiceRequest):
3159+
IntegrationArn: IntegrationArn
3160+
Description: Optional[IntegrationDescription]
3161+
IntegrationName: Optional[IntegrationName]
3162+
3163+
30543164
class ModifyRedshiftIdcApplicationMessage(ServiceRequest):
30553165
RedshiftIdcApplicationArn: String
30563166
IdentityNamespace: Optional[IdentityNamespaceString]
@@ -3718,6 +3828,21 @@ def create_hsm_configuration(
37183828
) -> CreateHsmConfigurationResult:
37193829
raise NotImplementedError
37203830

3831+
@handler("CreateIntegration")
3832+
def create_integration(
3833+
self,
3834+
context: RequestContext,
3835+
source_arn: String,
3836+
target_arn: String,
3837+
integration_name: IntegrationName,
3838+
kms_key_id: String = None,
3839+
tag_list: TagList = None,
3840+
additional_encryption_context: EncryptionContextMap = None,
3841+
description: IntegrationDescription = None,
3842+
**kwargs,
3843+
) -> Integration:
3844+
raise NotImplementedError
3845+
37213846
@handler("CreateRedshiftIdcApplication")
37223847
def create_redshift_idc_application(
37233848
self,
@@ -3884,6 +4009,12 @@ def delete_hsm_configuration(
38844009
) -> None:
38854010
raise NotImplementedError
38864011

4012+
@handler("DeleteIntegration")
4013+
def delete_integration(
4014+
self, context: RequestContext, integration_arn: IntegrationArn, **kwargs
4015+
) -> Integration:
4016+
raise NotImplementedError
4017+
38874018
@handler("DeletePartner")
38884019
def delete_partner(
38894020
self,
@@ -4227,6 +4358,18 @@ def describe_inbound_integrations(
42274358
) -> InboundIntegrationsMessage:
42284359
raise NotImplementedError
42294360

4361+
@handler("DescribeIntegrations")
4362+
def describe_integrations(
4363+
self,
4364+
context: RequestContext,
4365+
integration_arn: IntegrationArn = None,
4366+
max_records: IntegerOptional = None,
4367+
marker: String = None,
4368+
filters: DescribeIntegrationsFilterList = None,
4369+
**kwargs,
4370+
) -> IntegrationsMessage:
4371+
raise NotImplementedError
4372+
42304373
@handler("DescribeLoggingStatus")
42314374
def describe_logging_status(
42324375
self, context: RequestContext, cluster_identifier: String, **kwargs
@@ -4705,6 +4848,17 @@ def modify_event_subscription(
47054848
) -> ModifyEventSubscriptionResult:
47064849
raise NotImplementedError
47074850

4851+
@handler("ModifyIntegration")
4852+
def modify_integration(
4853+
self,
4854+
context: RequestContext,
4855+
integration_arn: IntegrationArn,
4856+
description: IntegrationDescription = None,
4857+
integration_name: IntegrationName = None,
4858+
**kwargs,
4859+
) -> Integration:
4860+
raise NotImplementedError
4861+
47084862
@handler("ModifyRedshiftIdcApplication")
47094863
def modify_redshift_idc_application(
47104864
self,

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
BucketKeyEnabled = bool
1919
BucketLocationName = str
2020
BucketName = str
21+
BucketRegion = str
2122
BypassGovernanceRetention = bool
2223
CacheControl = str
2324
ChecksumCRC32 = str
@@ -166,7 +167,6 @@
166167
VersionIdMarker = str
167168
WebsiteRedirectLocation = str
168169
Years = int
169-
BucketRegion = str
170170
BucketContentType = str
171171
IfCondition = str
172172
RestoreObjectOutputStatusCode = int
@@ -1085,6 +1085,7 @@ class AnalyticsConfiguration(TypedDict, total=False):
10851085
class Bucket(TypedDict, total=False):
10861086
Name: Optional[BucketName]
10871087
CreationDate: Optional[CreationDate]
1088+
BucketRegion: Optional[BucketRegion]
10881089

10891090

10901091
class BucketInfo(TypedDict, total=False):
@@ -2554,12 +2555,15 @@ class ListBucketMetricsConfigurationsRequest(ServiceRequest):
25542555
class ListBucketsOutput(TypedDict, total=False):
25552556
Owner: Optional[Owner]
25562557
ContinuationToken: Optional[NextToken]
2558+
Prefix: Optional[Prefix]
25572559
Buckets: Optional[Buckets]
25582560

25592561

25602562
class ListBucketsRequest(ServiceRequest):
25612563
MaxBuckets: Optional[MaxBuckets]
25622564
ContinuationToken: Optional[Token]
2565+
Prefix: Optional[Prefix]
2566+
BucketRegion: Optional[BucketRegion]
25632567

25642568

25652569
class ListDirectoryBucketsOutput(TypedDict, total=False):
@@ -4207,6 +4211,8 @@ def list_buckets(
42074211
context: RequestContext,
42084212
max_buckets: MaxBuckets = None,
42094213
continuation_token: Token = None,
4214+
prefix: Prefix = None,
4215+
bucket_region: BucketRegion = None,
42104216
**kwargs,
42114217
) -> ListBucketsOutput:
42124218
raise NotImplementedError

localstack-core/localstack/services/s3/provider.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
BucketLoggingStatus,
3030
BucketName,
3131
BucketNotEmpty,
32+
BucketRegion,
3233
BucketVersioningStatus,
3334
BypassGovernanceRetention,
3435
ChecksumAlgorithm,
@@ -549,9 +550,11 @@ def list_buckets(
549550
context: RequestContext,
550551
max_buckets: MaxBuckets = None,
551552
continuation_token: Token = None,
553+
prefix: Prefix = None,
554+
bucket_region: BucketRegion = None,
552555
**kwargs,
553556
) -> ListBucketsOutput:
554-
# TODO add support for max_buckets and continuation_token
557+
# TODO add support for max_buckets, continuation_token, prefix, and bucket_region
555558
owner = get_owner_for_account_id(context.account_id)
556559
store = self.get_store(context.account_id, context.region)
557560
buckets = [

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Issues = "https://github.com/localstack/localstack/issues"
5353
# minimal required to actually run localstack on the host for services natively implemented in python
5454
base-runtime = [
5555
# pinned / updated by ASF update action
56-
"boto3==1.35.39",
56+
"boto3==1.35.44",
5757
# pinned / updated by ASF update action
58-
"botocore==1.35.39",
58+
"botocore==1.35.44",
5959
"awscrt>=0.13.14",
6060
"cbor2>=5.2.0",
6161
"dnspython>=1.16.0",

requirements-base-runtime.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ attrs==24.2.0
1111
# referencing
1212
awscrt==0.22.0
1313
# via localstack-core (pyproject.toml)
14-
boto3==1.35.39
14+
boto3==1.35.44
1515
# via localstack-core (pyproject.toml)
16-
botocore==1.35.39
16+
botocore==1.35.44
1717
# via
1818
# boto3
1919
# localstack-core (pyproject.toml)

requirements-dev.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ aws-sam-translator==1.91.0
4343
# localstack-core
4444
aws-xray-sdk==2.14.0
4545
# via moto-ext
46-
awscli==1.35.5
46+
awscli==1.35.10
4747
# via localstack-core
4848
awscrt==0.22.0
4949
# via localstack-core
50-
boto3==1.35.39
50+
boto3==1.35.44
5151
# via
5252
# amazon-kclpy
5353
# aws-sam-translator
5454
# localstack-core
5555
# moto-ext
56-
botocore==1.35.39
56+
botocore==1.35.44
5757
# via
5858
# aws-xray-sdk
5959
# awscli

0 commit comments

Comments
 (0)