|
1 | 1 | from datetime import datetime
|
2 | 2 | from enum import StrEnum
|
3 |
| -from typing import List, Optional, TypedDict |
| 3 | +from typing import Dict, List, Optional, TypedDict |
4 | 4 |
|
5 | 5 | from localstack.aws.api import RequestContext, ServiceException, ServiceRequest, handler
|
6 | 6 |
|
|
9 | 9 | BooleanOptional = bool
|
10 | 10 | CustomDomainCertificateArnString = str
|
11 | 11 | CustomDomainNameString = str
|
| 12 | +Description = str |
12 | 13 | Double = float
|
13 | 14 | DoubleOptional = float
|
14 | 15 | IdcDisplayNameString = str
|
15 | 16 | IdentityNamespaceString = str
|
16 | 17 | Integer = int
|
17 | 18 | IntegerOptional = int
|
| 19 | +IntegrationArn = str |
| 20 | +IntegrationDescription = str |
| 21 | +IntegrationName = str |
18 | 22 | PartnerIntegrationAccountId = str
|
19 | 23 | PartnerIntegrationClusterIdentifier = str
|
20 | 24 | PartnerIntegrationDatabaseName = str
|
@@ -71,6 +75,13 @@ class DataShareStatusForProducer(StrEnum):
|
71 | 75 | REJECTED = "REJECTED"
|
72 | 76 |
|
73 | 77 |
|
| 78 | +class DescribeIntegrationsFilterName(StrEnum): |
| 79 | + integration_arn = "integration-arn" |
| 80 | + source_arn = "source-arn" |
| 81 | + source_types = "source-types" |
| 82 | + status = "status" |
| 83 | + |
| 84 | + |
74 | 85 | class ImpactRankingType(StrEnum):
|
75 | 86 | HIGH = "HIGH"
|
76 | 87 | MEDIUM = "MEDIUM"
|
@@ -545,12 +556,48 @@ class InsufficientS3BucketPolicyFault(ServiceException):
|
545 | 556 | status_code: int = 400
|
546 | 557 |
|
547 | 558 |
|
| 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 | + |
548 | 577 | class IntegrationNotFoundFault(ServiceException):
|
549 | 578 | code: str = "IntegrationNotFoundFault"
|
550 | 579 | sender_fault: bool = True
|
551 | 580 | status_code: int = 404
|
552 | 581 |
|
553 | 582 |
|
| 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 | + |
554 | 601 | class InvalidAuthenticationProfileRequestFault(ServiceException):
|
555 | 602 | code: str = "InvalidAuthenticationProfileRequestFault"
|
556 | 603 | sender_fault: bool = True
|
@@ -1910,6 +1957,19 @@ class CreateHsmConfigurationResult(TypedDict, total=False):
|
1910 | 1957 | HsmConfiguration: Optional[HsmConfiguration]
|
1911 | 1958 |
|
1912 | 1959 |
|
| 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 | + |
1913 | 1973 | class LakeFormationQuery(TypedDict, total=False):
|
1914 | 1974 | Authorization: ServiceAuthorization
|
1915 | 1975 |
|
@@ -2135,6 +2195,10 @@ class DeleteHsmConfigurationMessage(ServiceRequest):
|
2135 | 2195 | HsmConfigurationIdentifier: String
|
2136 | 2196 |
|
2137 | 2197 |
|
| 2198 | +class DeleteIntegrationMessage(ServiceRequest): |
| 2199 | + IntegrationArn: IntegrationArn |
| 2200 | + |
| 2201 | + |
2138 | 2202 | class DeleteRedshiftIdcApplicationMessage(ServiceRequest):
|
2139 | 2203 | RedshiftIdcApplicationArn: String
|
2140 | 2204 |
|
@@ -2378,6 +2442,24 @@ class DescribeInboundIntegrationsMessage(ServiceRequest):
|
2378 | 2442 | Marker: Optional[String]
|
2379 | 2443 |
|
2380 | 2444 |
|
| 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 | + |
2381 | 2463 | class DescribeLoggingStatusMessage(ServiceRequest):
|
2382 | 2464 | ClusterIdentifier: String
|
2383 | 2465 |
|
@@ -2835,6 +2917,28 @@ class InboundIntegrationsMessage(TypedDict, total=False):
|
2835 | 2917 | InboundIntegrations: Optional[InboundIntegrationList]
|
2836 | 2918 |
|
2837 | 2919 |
|
| 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 | + |
2838 | 2942 | class ListRecommendationsMessage(ServiceRequest):
|
2839 | 2943 | ClusterIdentifier: Optional[String]
|
2840 | 2944 | NamespaceArn: Optional[String]
|
@@ -3051,6 +3155,12 @@ class ModifyEventSubscriptionResult(TypedDict, total=False):
|
3051 | 3155 | EventSubscription: Optional[EventSubscription]
|
3052 | 3156 |
|
3053 | 3157 |
|
| 3158 | +class ModifyIntegrationMessage(ServiceRequest): |
| 3159 | + IntegrationArn: IntegrationArn |
| 3160 | + Description: Optional[IntegrationDescription] |
| 3161 | + IntegrationName: Optional[IntegrationName] |
| 3162 | + |
| 3163 | + |
3054 | 3164 | class ModifyRedshiftIdcApplicationMessage(ServiceRequest):
|
3055 | 3165 | RedshiftIdcApplicationArn: String
|
3056 | 3166 | IdentityNamespace: Optional[IdentityNamespaceString]
|
@@ -3718,6 +3828,21 @@ def create_hsm_configuration(
|
3718 | 3828 | ) -> CreateHsmConfigurationResult:
|
3719 | 3829 | raise NotImplementedError
|
3720 | 3830 |
|
| 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 | + |
3721 | 3846 | @handler("CreateRedshiftIdcApplication")
|
3722 | 3847 | def create_redshift_idc_application(
|
3723 | 3848 | self,
|
@@ -3884,6 +4009,12 @@ def delete_hsm_configuration(
|
3884 | 4009 | ) -> None:
|
3885 | 4010 | raise NotImplementedError
|
3886 | 4011 |
|
| 4012 | + @handler("DeleteIntegration") |
| 4013 | + def delete_integration( |
| 4014 | + self, context: RequestContext, integration_arn: IntegrationArn, **kwargs |
| 4015 | + ) -> Integration: |
| 4016 | + raise NotImplementedError |
| 4017 | + |
3887 | 4018 | @handler("DeletePartner")
|
3888 | 4019 | def delete_partner(
|
3889 | 4020 | self,
|
@@ -4227,6 +4358,18 @@ def describe_inbound_integrations(
|
4227 | 4358 | ) -> InboundIntegrationsMessage:
|
4228 | 4359 | raise NotImplementedError
|
4229 | 4360 |
|
| 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 | + |
4230 | 4373 | @handler("DescribeLoggingStatus")
|
4231 | 4374 | def describe_logging_status(
|
4232 | 4375 | self, context: RequestContext, cluster_identifier: String, **kwargs
|
@@ -4705,6 +4848,17 @@ def modify_event_subscription(
|
4705 | 4848 | ) -> ModifyEventSubscriptionResult:
|
4706 | 4849 | raise NotImplementedError
|
4707 | 4850 |
|
| 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 | + |
4708 | 4862 | @handler("ModifyRedshiftIdcApplication")
|
4709 | 4863 | def modify_redshift_idc_application(
|
4710 | 4864 | self,
|
|
0 commit comments