localstack-core 4.11.2.dev14__py3-none-any.whl → 4.12.1.dev25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. localstack/aws/api/ec2/__init__.py +13 -0
  2. localstack/aws/api/iam/__init__.py +1 -0
  3. localstack/aws/api/lambda_/__init__.py +616 -0
  4. localstack/aws/api/logs/__init__.py +188 -0
  5. localstack/aws/api/opensearch/__init__.py +11 -0
  6. localstack/aws/api/route53/__init__.py +3 -0
  7. localstack/aws/api/s3/__init__.py +2 -0
  8. localstack/aws/api/s3control/__init__.py +19 -0
  9. localstack/aws/api/secretsmanager/__init__.py +9 -0
  10. localstack/aws/connect.py +35 -15
  11. localstack/aws/protocol/parser.py +6 -1
  12. localstack/aws/spec-patches.json +0 -38
  13. localstack/config.py +8 -0
  14. localstack/constants.py +3 -0
  15. localstack/dev/kubernetes/__main__.py +39 -14
  16. localstack/runtime/analytics.py +11 -0
  17. localstack/services/acm/provider.py +13 -1
  18. localstack/services/apigateway/legacy/provider.py +25 -4
  19. localstack/services/cloudformation/engine/v2/change_set_model.py +9 -0
  20. localstack/services/cloudformation/engine/v2/change_set_model_preproc.py +3 -1
  21. localstack/services/cloudformation/engine/v2/change_set_resource_support_checker.py +114 -0
  22. localstack/services/cloudformation/provider.py +26 -1
  23. localstack/services/cloudformation/provider_utils.py +20 -0
  24. localstack/services/cloudformation/resource_provider.py +5 -4
  25. localstack/services/cloudformation/scaffolding/__main__.py +94 -22
  26. localstack/services/cloudformation/v2/provider.py +41 -0
  27. localstack/services/cloudwatch/models.py +10 -2
  28. localstack/services/cloudwatch/provider_v2.py +15 -20
  29. localstack/services/kinesis/packages.py +1 -1
  30. localstack/services/kms/models.py +6 -2
  31. localstack/services/lambda_/analytics.py +11 -2
  32. localstack/services/lambda_/invocation/event_manager.py +15 -11
  33. localstack/services/lambda_/invocation/lambda_models.py +4 -0
  34. localstack/services/lambda_/invocation/lambda_service.py +11 -0
  35. localstack/services/lambda_/provider.py +70 -13
  36. localstack/services/opensearch/packages.py +34 -20
  37. localstack/services/route53/provider.py +7 -0
  38. localstack/services/route53resolver/provider.py +5 -0
  39. localstack/services/s3/constants.py +5 -0
  40. localstack/services/s3/exceptions.py +9 -0
  41. localstack/services/s3/models.py +9 -1
  42. localstack/services/s3/provider.py +25 -30
  43. localstack/services/s3/utils.py +46 -1
  44. localstack/services/s3control/provider.py +6 -0
  45. localstack/services/scheduler/provider.py +4 -2
  46. localstack/services/secretsmanager/provider.py +4 -0
  47. localstack/services/ses/provider.py +4 -0
  48. localstack/services/sns/constants.py +13 -0
  49. localstack/services/sns/provider.py +5 -0
  50. localstack/services/sns/v2/models.py +4 -0
  51. localstack/services/sns/v2/provider.py +145 -0
  52. localstack/services/sqs/constants.py +6 -0
  53. localstack/services/sqs/provider.py +9 -1
  54. localstack/services/sqs/resource_providers/aws_sqs_queue.py +61 -46
  55. localstack/services/ssm/provider.py +6 -0
  56. localstack/services/stepfunctions/asl/static_analyser/test_state/test_state_analyser.py +193 -107
  57. localstack/services/stepfunctions/backend/execution.py +4 -5
  58. localstack/services/stepfunctions/provider.py +21 -14
  59. localstack/services/sts/provider.py +7 -0
  60. localstack/services/support/provider.py +5 -1
  61. localstack/services/swf/provider.py +5 -1
  62. localstack/services/transcribe/provider.py +7 -0
  63. localstack/testing/aws/lambda_utils.py +1 -1
  64. localstack/testing/aws/util.py +2 -1
  65. localstack/testing/config.py +1 -0
  66. localstack/utils/aws/client_types.py +2 -4
  67. localstack/utils/bootstrap.py +2 -2
  68. localstack/utils/catalog/catalog.py +3 -2
  69. localstack/utils/container_utils/container_client.py +22 -13
  70. localstack/utils/container_utils/docker_cmd_client.py +6 -6
  71. localstack/version.py +2 -2
  72. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/METADATA +6 -6
  73. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/RECORD +81 -80
  74. localstack_core-4.12.1.dev25.dist-info/plux.json +1 -0
  75. localstack_core-4.11.2.dev14.dist-info/plux.json +0 -1
  76. {localstack_core-4.11.2.dev14.data → localstack_core-4.12.1.dev25.data}/scripts/localstack +0 -0
  77. {localstack_core-4.11.2.dev14.data → localstack_core-4.12.1.dev25.data}/scripts/localstack-supervisor +0 -0
  78. {localstack_core-4.11.2.dev14.data → localstack_core-4.12.1.dev25.data}/scripts/localstack.bat +0 -0
  79. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/WHEEL +0 -0
  80. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/entry_points.txt +0 -0
  81. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/licenses/LICENSE.txt +0 -0
  82. {localstack_core-4.11.2.dev14.dist-info → localstack_core-4.12.1.dev25.dist-info}/top_level.txt +0 -0
@@ -15,6 +15,7 @@ from typing import (
15
15
  Literal,
16
16
  NamedTuple,
17
17
  Protocol,
18
+ TypeAlias,
18
19
  TypedDict,
19
20
  )
20
21
 
@@ -357,7 +358,13 @@ SimpleVolumeBind = tuple[str, str]
357
358
 
358
359
 
359
360
  @dataclasses.dataclass
360
- class BindMount:
361
+ class Mount:
362
+ def to_str(self) -> str:
363
+ return str(self)
364
+
365
+
366
+ @dataclasses.dataclass
367
+ class BindMount(Mount):
361
368
  """Represents a --volume argument run/create command. When using VolumeBind to bind-mount a file or directory
362
369
  that does not yet exist on the Docker host, -v creates the endpoint for you. It is always created as a directory.
363
370
  """
@@ -402,7 +409,7 @@ class BindMount:
402
409
 
403
410
 
404
411
  @dataclasses.dataclass
405
- class VolumeDirMount:
412
+ class VolumeDirMount(Mount):
406
413
  volume_path: str
407
414
  """
408
415
  Absolute path inside /var/lib/localstack to mount into the container
@@ -439,24 +446,25 @@ class VolumeDirMount:
439
446
  }
440
447
 
441
448
 
449
+ VolumeMappingSpecification: TypeAlias = SimpleVolumeBind | Mount
450
+
451
+
442
452
  class VolumeMappings:
443
- mappings: list[SimpleVolumeBind | BindMount]
453
+ mappings: list[VolumeMappingSpecification]
444
454
 
445
- def __init__(self, mappings: list[SimpleVolumeBind | BindMount | VolumeDirMount] = None):
455
+ def __init__(
456
+ self,
457
+ mappings: list[VolumeMappingSpecification] = None,
458
+ ):
446
459
  self.mappings = mappings if mappings is not None else []
447
460
 
448
- def add(self, mapping: SimpleVolumeBind | BindMount | VolumeDirMount):
461
+ def add(self, mapping: VolumeMappingSpecification):
449
462
  self.append(mapping)
450
463
 
451
- def append(
452
- self,
453
- mapping: SimpleVolumeBind | BindMount | VolumeDirMount,
454
- ):
464
+ def append(self, mapping: VolumeMappingSpecification):
455
465
  self.mappings.append(mapping)
456
466
 
457
- def find_target_mapping(
458
- self, container_dir: str
459
- ) -> SimpleVolumeBind | BindMount | VolumeDirMount | None:
467
+ def find_target_mapping(self, container_dir: str) -> VolumeMappingSpecification | None:
460
468
  """
461
469
  Looks through the volumes and returns the one where the container dir matches ``container_dir``.
462
470
  Returns None if there is no volume mapping to the given container directory.
@@ -1510,7 +1518,8 @@ class Util:
1510
1518
  ) -> dict[str, dict[str, str]]:
1511
1519
  """Converts a List of (host_path, container_path) tuples to a Dict suitable as volume argument for docker sdk"""
1512
1520
 
1513
- def _map_to_dict(paths: SimpleVolumeBind | BindMount | VolumeDirMount):
1521
+ def _map_to_dict(paths: VolumeMappingSpecification):
1522
+ # TODO: move this logic to the `Mount` base class
1514
1523
  if isinstance(paths, (BindMount, VolumeDirMount)):
1515
1524
  return paths.to_docker_sdk_parameters()
1516
1525
  else:
@@ -12,7 +12,6 @@ from localstack import config
12
12
  from localstack.utils.collections import ensure_list
13
13
  from localstack.utils.container_utils.container_client import (
14
14
  AccessDenied,
15
- BindMount,
16
15
  CancellableStream,
17
16
  ContainerClient,
18
17
  ContainerException,
@@ -21,16 +20,16 @@ from localstack.utils.container_utils.container_client import (
21
20
  DockerNotAvailable,
22
21
  DockerPlatform,
23
22
  LogConfig,
23
+ Mount,
24
24
  NoSuchContainer,
25
25
  NoSuchImage,
26
26
  NoSuchNetwork,
27
27
  NoSuchObject,
28
28
  PortMappings,
29
29
  RegistryConnectionError,
30
- SimpleVolumeBind,
31
30
  Ulimit,
32
31
  Util,
33
- VolumeDirMount,
32
+ VolumeMappingSpecification,
34
33
  )
35
34
  from localstack.utils.run import run
36
35
  from localstack.utils.strings import first_char_to_upper, to_str
@@ -810,7 +809,7 @@ class CmdDockerClient(ContainerClient):
810
809
  tty: bool = False,
811
810
  detach: bool = False,
812
811
  command: list[str] | str | None = None,
813
- volumes: list[SimpleVolumeBind] | None = None,
812
+ volumes: list[VolumeMappingSpecification] | None = None,
814
813
  ports: PortMappings | None = None,
815
814
  exposed_ports: list[str] | None = None,
816
815
  env_vars: dict[str, str] | None = None,
@@ -900,7 +899,7 @@ class CmdDockerClient(ContainerClient):
900
899
  return cmd, env_file
901
900
 
902
901
  @staticmethod
903
- def _map_to_volume_param(volume: SimpleVolumeBind | BindMount | VolumeDirMount) -> str:
902
+ def _map_to_volume_param(volume: VolumeMappingSpecification) -> str:
904
903
  """
905
904
  Maps the mount volume, to a parameter for the -v docker cli argument.
906
905
 
@@ -911,7 +910,8 @@ class CmdDockerClient(ContainerClient):
911
910
  :param volume: Either a SimpleVolumeBind, in essence a tuple (host_dir, container_dir), or a VolumeBind object
912
911
  :return: String which is passable as parameter to the docker cli -v option
913
912
  """
914
- if isinstance(volume, (BindMount, VolumeDirMount)):
913
+ # TODO: move this logic to the VolumeMappingSpecification type
914
+ if isinstance(volume, Mount):
915
915
  return volume.to_str()
916
916
  else:
917
917
  return f"{volume[0]}:{volume[1]}"
localstack/version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '4.11.2.dev14'
32
- __version_tuple__ = version_tuple = (4, 11, 2, 'dev14')
31
+ __version__ = version = '4.12.1.dev25'
32
+ __version_tuple__ = version_tuple = (4, 12, 1, 'dev25')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: localstack-core
3
- Version: 4.11.2.dev14
3
+ Version: 4.12.1.dev25
4
4
  Summary: The core library and runtime of LocalStack
5
5
  Author-email: LocalStack Contributors <info@localstack.cloud>
6
6
  License-Expression: Apache-2.0
@@ -30,8 +30,8 @@ Requires-Dist: rich>=12.3.0
30
30
  Requires-Dist: requests>=2.20.0
31
31
  Requires-Dist: semver>=2.10
32
32
  Provides-Extra: base-runtime
33
- Requires-Dist: boto3==1.42.0; extra == "base-runtime"
34
- Requires-Dist: botocore==1.41.6; extra == "base-runtime"
33
+ Requires-Dist: boto3==1.42.9; extra == "base-runtime"
34
+ Requires-Dist: botocore==1.42.9; extra == "base-runtime"
35
35
  Requires-Dist: awscrt!=0.27.1,>=0.13.14; extra == "base-runtime"
36
36
  Requires-Dist: cbor2>=5.5.0; extra == "base-runtime"
37
37
  Requires-Dist: dnspython>=1.16.0; extra == "base-runtime"
@@ -53,11 +53,11 @@ Requires-Dist: xmltodict>=0.13.0; extra == "base-runtime"
53
53
  Requires-Dist: rolo>=0.7; extra == "base-runtime"
54
54
  Provides-Extra: runtime
55
55
  Requires-Dist: localstack-core[base-runtime]; extra == "runtime"
56
- Requires-Dist: awscli==1.43.6; extra == "runtime"
56
+ Requires-Dist: awscli==1.43.15; extra == "runtime"
57
57
  Requires-Dist: airspeed-ext>=0.6.3; extra == "runtime"
58
58
  Requires-Dist: antlr4-python3-runtime==4.13.2; extra == "runtime"
59
59
  Requires-Dist: apispec>=5.1.1; extra == "runtime"
60
- Requires-Dist: aws-sam-translator>=1.15.1; extra == "runtime"
60
+ Requires-Dist: aws-sam-translator>=1.105.0; extra == "runtime"
61
61
  Requires-Dist: crontab>=0.22.6; extra == "runtime"
62
62
  Requires-Dist: cryptography>=41.0.5; extra == "runtime"
63
63
  Requires-Dist: jinja2>=3.1.6; extra == "runtime"
@@ -100,5 +100,5 @@ Requires-Dist: rstr>=3.2.0; extra == "dev"
100
100
  Requires-Dist: mypy; extra == "dev"
101
101
  Provides-Extra: typehint
102
102
  Requires-Dist: localstack-core[dev]; extra == "typehint"
103
- Requires-Dist: boto3-stubs[acm,acm-pca,amplify,apigateway,apigatewayv2,appconfig,appconfigdata,application-autoscaling,appsync,athena,autoscaling,backup,batch,ce,cloudcontrol,cloudformation,cloudfront,cloudtrail,cloudwatch,codebuild,codecommit,codeconnections,codedeploy,codepipeline,codestar-connections,cognito-identity,cognito-idp,dms,docdb,dynamodb,dynamodbstreams,ec2,ecr,ecs,efs,eks,elasticache,elasticbeanstalk,elbv2,emr,emr-serverless,es,events,firehose,fis,glacier,glue,iam,identitystore,iot,iot-data,iotanalytics,iotwireless,kafka,kinesis,kinesisanalyticsv2,kms,lakeformation,lambda,logs,managedblockchain,mediaconvert,mediastore,mq,mwaa,neptune,opensearch,organizations,pi,pinpoint,pipes,rds,rds-data,redshift,redshift-data,resource-groups,resourcegroupstaggingapi,route53,route53resolver,s3,s3control,sagemaker,sagemaker-runtime,secretsmanager,serverlessrepo,servicediscovery,ses,sesv2,sns,sqs,ssm,sso-admin,stepfunctions,sts,timestream-query,timestream-write,transcribe,verifiedpermissions,wafv2,xray]; extra == "typehint"
103
+ Requires-Dist: boto3-stubs[acm,acm-pca,amplify,apigateway,apigatewayv2,appconfig,appconfigdata,application-autoscaling,appsync,athena,autoscaling,backup,batch,ce,cloudcontrol,cloudformation,cloudfront,cloudtrail,cloudwatch,codebuild,codecommit,codeconnections,codedeploy,codepipeline,codestar-connections,cognito-identity,cognito-idp,dms,docdb,dynamodb,dynamodbstreams,ec2,ecr,ecs,efs,eks,elasticache,elasticbeanstalk,elbv2,emr,emr-serverless,es,events,firehose,fis,glacier,glue,iam,identitystore,iot,iot-data,iotwireless,kafka,kinesis,kinesisanalyticsv2,kms,lakeformation,lambda,logs,managedblockchain,mediaconvert,mq,mwaa,neptune,opensearch,organizations,pi,pinpoint,pipes,rds,rds-data,redshift,redshift-data,resource-groups,resourcegroupstaggingapi,route53,route53resolver,s3,s3control,sagemaker,sagemaker-runtime,secretsmanager,serverlessrepo,servicediscovery,ses,sesv2,sns,sqs,ssm,sso-admin,stepfunctions,sts,timestream-query,timestream-write,transcribe,verifiedpermissions,wafv2,xray]; extra == "typehint"
104
104
  Dynamic: license-file