Skip to content

Update ASF APIs #11718

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

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion localstack-core/localstack/aws/api/ec2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18089,7 +18089,7 @@ class RequestSpotLaunchSpecification(TypedDict, total=False):
ImageId: Optional[ImageId]
InstanceType: Optional[InstanceType]
KernelId: Optional[KernelId]
KeyName: Optional[KeyPairName]
KeyName: Optional[KeyPairNameWithResolver]
Monitoring: Optional[RunInstancesMonitoringEnabled]
NetworkInterfaces: Optional[InstanceNetworkInterfaceSpecificationList]
Placement: Optional[SpotPlacement]
Expand Down
156 changes: 155 additions & 1 deletion localstack-core/localstack/aws/api/redshift/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime
from enum import StrEnum
from typing import List, Optional, TypedDict
from typing import Dict, List, Optional, TypedDict

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

Expand All @@ -9,12 +9,16 @@
BooleanOptional = bool
CustomDomainCertificateArnString = str
CustomDomainNameString = str
Description = str
Double = float
DoubleOptional = float
IdcDisplayNameString = str
IdentityNamespaceString = str
Integer = int
IntegerOptional = int
IntegrationArn = str
IntegrationDescription = str
IntegrationName = str
PartnerIntegrationAccountId = str
PartnerIntegrationClusterIdentifier = str
PartnerIntegrationDatabaseName = str
Expand Down Expand Up @@ -71,6 +75,13 @@ class DataShareStatusForProducer(StrEnum):
REJECTED = "REJECTED"


class DescribeIntegrationsFilterName(StrEnum):
integration_arn = "integration-arn"
source_arn = "source-arn"
source_types = "source-types"
status = "status"


class ImpactRankingType(StrEnum):
HIGH = "HIGH"
MEDIUM = "MEDIUM"
Expand Down Expand Up @@ -545,12 +556,48 @@ class InsufficientS3BucketPolicyFault(ServiceException):
status_code: int = 400


class IntegrationAlreadyExistsFault(ServiceException):
code: str = "IntegrationAlreadyExistsFault"
sender_fault: bool = True
status_code: int = 400


class IntegrationConflictOperationFault(ServiceException):
code: str = "IntegrationConflictOperationFault"
sender_fault: bool = True
status_code: int = 400


class IntegrationConflictStateFault(ServiceException):
code: str = "IntegrationConflictStateFault"
sender_fault: bool = True
status_code: int = 400


class IntegrationNotFoundFault(ServiceException):
code: str = "IntegrationNotFoundFault"
sender_fault: bool = True
status_code: int = 404


class IntegrationQuotaExceededFault(ServiceException):
code: str = "IntegrationQuotaExceededFault"
sender_fault: bool = True
status_code: int = 400


class IntegrationSourceNotFoundFault(ServiceException):
code: str = "IntegrationSourceNotFoundFault"
sender_fault: bool = True
status_code: int = 404


class IntegrationTargetNotFoundFault(ServiceException):
code: str = "IntegrationTargetNotFoundFault"
sender_fault: bool = True
status_code: int = 404


class InvalidAuthenticationProfileRequestFault(ServiceException):
code: str = "InvalidAuthenticationProfileRequestFault"
sender_fault: bool = True
Expand Down Expand Up @@ -1910,6 +1957,19 @@ class CreateHsmConfigurationResult(TypedDict, total=False):
HsmConfiguration: Optional[HsmConfiguration]


EncryptionContextMap = Dict[String, String]


class CreateIntegrationMessage(ServiceRequest):
SourceArn: String
TargetArn: String
IntegrationName: IntegrationName
KMSKeyId: Optional[String]
TagList: Optional[TagList]
AdditionalEncryptionContext: Optional[EncryptionContextMap]
Description: Optional[IntegrationDescription]


class LakeFormationQuery(TypedDict, total=False):
Authorization: ServiceAuthorization

Expand Down Expand Up @@ -2135,6 +2195,10 @@ class DeleteHsmConfigurationMessage(ServiceRequest):
HsmConfigurationIdentifier: String


class DeleteIntegrationMessage(ServiceRequest):
IntegrationArn: IntegrationArn


class DeleteRedshiftIdcApplicationMessage(ServiceRequest):
RedshiftIdcApplicationArn: String

Expand Down Expand Up @@ -2378,6 +2442,24 @@ class DescribeInboundIntegrationsMessage(ServiceRequest):
Marker: Optional[String]


DescribeIntegrationsFilterValueList = List[String]


class DescribeIntegrationsFilter(TypedDict, total=False):
Name: DescribeIntegrationsFilterName
Values: DescribeIntegrationsFilterValueList


DescribeIntegrationsFilterList = List[DescribeIntegrationsFilter]


class DescribeIntegrationsMessage(ServiceRequest):
IntegrationArn: Optional[IntegrationArn]
MaxRecords: Optional[IntegerOptional]
Marker: Optional[String]
Filters: Optional[DescribeIntegrationsFilterList]


class DescribeLoggingStatusMessage(ServiceRequest):
ClusterIdentifier: String

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


class Integration(TypedDict, total=False):
IntegrationArn: Optional[String]
IntegrationName: Optional[IntegrationName]
SourceArn: Optional[String]
TargetArn: Optional[String]
Status: Optional[ZeroETLIntegrationStatus]
Errors: Optional[IntegrationErrorList]
CreateTime: Optional[TStamp]
Description: Optional[Description]
KMSKeyId: Optional[String]
AdditionalEncryptionContext: Optional[EncryptionContextMap]
Tags: Optional[TagList]


IntegrationList = List[Integration]


class IntegrationsMessage(TypedDict, total=False):
Marker: Optional[String]
Integrations: Optional[IntegrationList]


class ListRecommendationsMessage(ServiceRequest):
ClusterIdentifier: Optional[String]
NamespaceArn: Optional[String]
Expand Down Expand Up @@ -3051,6 +3155,12 @@ class ModifyEventSubscriptionResult(TypedDict, total=False):
EventSubscription: Optional[EventSubscription]


class ModifyIntegrationMessage(ServiceRequest):
IntegrationArn: IntegrationArn
Description: Optional[IntegrationDescription]
IntegrationName: Optional[IntegrationName]


class ModifyRedshiftIdcApplicationMessage(ServiceRequest):
RedshiftIdcApplicationArn: String
IdentityNamespace: Optional[IdentityNamespaceString]
Expand Down Expand Up @@ -3718,6 +3828,21 @@ def create_hsm_configuration(
) -> CreateHsmConfigurationResult:
raise NotImplementedError

@handler("CreateIntegration")
def create_integration(
self,
context: RequestContext,
source_arn: String,
target_arn: String,
integration_name: IntegrationName,
kms_key_id: String = None,
tag_list: TagList = None,
additional_encryption_context: EncryptionContextMap = None,
description: IntegrationDescription = None,
**kwargs,
) -> Integration:
raise NotImplementedError

@handler("CreateRedshiftIdcApplication")
def create_redshift_idc_application(
self,
Expand Down Expand Up @@ -3884,6 +4009,12 @@ def delete_hsm_configuration(
) -> None:
raise NotImplementedError

@handler("DeleteIntegration")
def delete_integration(
self, context: RequestContext, integration_arn: IntegrationArn, **kwargs
) -> Integration:
raise NotImplementedError

@handler("DeletePartner")
def delete_partner(
self,
Expand Down Expand Up @@ -4227,6 +4358,18 @@ def describe_inbound_integrations(
) -> InboundIntegrationsMessage:
raise NotImplementedError

@handler("DescribeIntegrations")
def describe_integrations(
self,
context: RequestContext,
integration_arn: IntegrationArn = None,
max_records: IntegerOptional = None,
marker: String = None,
filters: DescribeIntegrationsFilterList = None,
**kwargs,
) -> IntegrationsMessage:
raise NotImplementedError

@handler("DescribeLoggingStatus")
def describe_logging_status(
self, context: RequestContext, cluster_identifier: String, **kwargs
Expand Down Expand Up @@ -4705,6 +4848,17 @@ def modify_event_subscription(
) -> ModifyEventSubscriptionResult:
raise NotImplementedError

@handler("ModifyIntegration")
def modify_integration(
self,
context: RequestContext,
integration_arn: IntegrationArn,
description: IntegrationDescription = None,
integration_name: IntegrationName = None,
**kwargs,
) -> Integration:
raise NotImplementedError

@handler("ModifyRedshiftIdcApplication")
def modify_redshift_idc_application(
self,
Expand Down
8 changes: 7 additions & 1 deletion localstack-core/localstack/aws/api/s3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
BucketKeyEnabled = bool
BucketLocationName = str
BucketName = str
BucketRegion = str
BypassGovernanceRetention = bool
CacheControl = str
ChecksumCRC32 = str
Expand Down Expand Up @@ -166,7 +167,6 @@
VersionIdMarker = str
WebsiteRedirectLocation = str
Years = int
BucketRegion = str
BucketContentType = str
IfCondition = str
RestoreObjectOutputStatusCode = int
Expand Down Expand Up @@ -1085,6 +1085,7 @@ class AnalyticsConfiguration(TypedDict, total=False):
class Bucket(TypedDict, total=False):
Name: Optional[BucketName]
CreationDate: Optional[CreationDate]
BucketRegion: Optional[BucketRegion]


class BucketInfo(TypedDict, total=False):
Expand Down Expand Up @@ -2554,12 +2555,15 @@ class ListBucketMetricsConfigurationsRequest(ServiceRequest):
class ListBucketsOutput(TypedDict, total=False):
Owner: Optional[Owner]
ContinuationToken: Optional[NextToken]
Prefix: Optional[Prefix]
Buckets: Optional[Buckets]


class ListBucketsRequest(ServiceRequest):
MaxBuckets: Optional[MaxBuckets]
ContinuationToken: Optional[Token]
Prefix: Optional[Prefix]
BucketRegion: Optional[BucketRegion]


class ListDirectoryBucketsOutput(TypedDict, total=False):
Expand Down Expand Up @@ -4207,6 +4211,8 @@ def list_buckets(
context: RequestContext,
max_buckets: MaxBuckets = None,
continuation_token: Token = None,
prefix: Prefix = None,
bucket_region: BucketRegion = None,
**kwargs,
) -> ListBucketsOutput:
raise NotImplementedError
Expand Down
5 changes: 4 additions & 1 deletion localstack-core/localstack/services/s3/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
BucketLoggingStatus,
BucketName,
BucketNotEmpty,
BucketRegion,
BucketVersioningStatus,
BypassGovernanceRetention,
ChecksumAlgorithm,
Expand Down Expand Up @@ -549,9 +550,11 @@ def list_buckets(
context: RequestContext,
max_buckets: MaxBuckets = None,
continuation_token: Token = None,
prefix: Prefix = None,
bucket_region: BucketRegion = None,
**kwargs,
) -> ListBucketsOutput:
# TODO add support for max_buckets and continuation_token
# TODO add support for max_buckets, continuation_token, prefix, and bucket_region
owner = get_owner_for_account_id(context.account_id)
store = self.get_store(context.account_id, context.region)
buckets = [
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Issues = "https://github.com/localstack/localstack/issues"
# minimal required to actually run localstack on the host for services natively implemented in python
base-runtime = [
# pinned / updated by ASF update action
"boto3==1.35.39",
"boto3==1.35.44",
# pinned / updated by ASF update action
"botocore==1.35.39",
"botocore==1.35.44",
"awscrt>=0.13.14",
"cbor2>=5.2.0",
"dnspython>=1.16.0",
Expand Down
4 changes: 2 additions & 2 deletions requirements-base-runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ attrs==24.2.0
# referencing
awscrt==0.22.0
# via localstack-core (pyproject.toml)
boto3==1.35.39
boto3==1.35.44
# via localstack-core (pyproject.toml)
botocore==1.35.39
botocore==1.35.44
# via
# boto3
# localstack-core (pyproject.toml)
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ aws-sam-translator==1.91.0
# localstack-core
aws-xray-sdk==2.14.0
# via moto-ext
awscli==1.35.5
awscli==1.35.10
# via localstack-core
awscrt==0.22.0
# via localstack-core
boto3==1.35.39
boto3==1.35.44
# via
# amazon-kclpy
# aws-sam-translator
# localstack-core
# moto-ext
botocore==1.35.39
botocore==1.35.44
# via
# aws-xray-sdk
# awscli
Expand Down
Loading
Loading