|
1 | 1 | import logging |
2 | | -from abc import ABC, abstractmethod |
3 | | -from typing import Any, Dict, List, Optional, TypedDict, Union |
| 2 | +from typing import Dict, List, TypedDict, Union |
4 | 3 |
|
5 | 4 | LOG = logging.getLogger(__name__) |
6 | 5 |
|
7 | 6 |
|
8 | | -class ReplicateStateRequest(TypedDict): |
9 | | - """ |
10 | | - Represents a request sent from the CLI to the extension request |
11 | | - handler to inject additional resource state properties. |
12 | | - Using upper-case property names, to stay in line with CloudFormation/CloudControl resource models. |
13 | | - """ |
14 | | - |
15 | | - # resource type name (e.g., "AWS::S3::Bucket") |
16 | | - Type: str |
17 | | - # identifier of the resource |
18 | | - PhysicalResourceId: Optional[str] |
19 | | - # resource properties |
20 | | - Properties: Dict[str, Any] |
21 | | - |
22 | | - |
23 | | -class ResourceReplicator(ABC): |
24 | | - """ |
25 | | - Interface for resource replicator, to effect the creation of a cloned resource inside LocalStack. |
26 | | - This interface has a client-side and a server-side implementation. |
27 | | - """ |
28 | | - |
29 | | - @abstractmethod |
30 | | - def create(self, resource: Dict): |
31 | | - """Create the resource specified via the given resource dict.""" |
32 | | - |
33 | | - @abstractmethod |
34 | | - def create_all(self): |
35 | | - """Scrape and replicate all resources from the source AWS account into LocalStack.""" |
36 | | - |
37 | | - |
38 | 7 | class ProxyServiceConfig(TypedDict, total=False): |
39 | 8 | # list of regexes identifying resources to be proxied requests to |
40 | 9 | resources: Union[str, List[str]] |
|
0 commit comments