Skip to content

Lambda

async_boto.clients.lambda_

logger module-attribute

logger = getLogger(__name__)

T module-attribute

T = TypeVar('T', bound=BaseModel)

AsyncLambdaClient

AsyncLambdaClient(aws_session, endpoint_url=None)

Bases: BaseClient

Source code in async_boto/clients/lambda_.py
275
276
277
278
279
280
281
282
def __init__(
    self, aws_session: boto3.Session | AsyncAWSSession, endpoint_url: str = None
):
    super().__init__(aws_session=aws_session, service_name="dynamodb")
    self._url = (
        endpoint_url
        or f"https://lambda.{self._aws_session.region_name}.amazonaws.com"
    )

add_layer_version_permission async

add_layer_version_permission(request)
Source code in async_boto/clients/lambda_.py
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
async def add_layer_version_permission(
    self, request: AddLayerVersionPermissionRequest
) -> AddLayerVersionPermissionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        f"{self._url}/2018-10-31/layers/{request.LayerName}/"
        f"versions/{request.VersionNumber}/policy"
    )
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"LayerName", "VersionNumber", "RevisionId"},
        ),
        params={"RevisionId": request.RevisionId} if request.RevisionId else {},
    )
    resp.raise_for_status()
    return AddLayerVersionPermissionResponse(**resp.json)

add_permission async

add_permission(request)
Source code in async_boto/clients/lambda_.py
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
async def add_permission(
    self, request: AddPermissionRequest
) -> AddPermissionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/policy"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName", "Qualifier"},
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return AddPermissionResponse(**resp.json)

create_alias async

create_alias(request)
Source code in async_boto/clients/lambda_.py
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
async def create_alias(self, request: CreateAliasRequest) -> CreateAliasResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/aliases"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName"},
        ),
    )
    resp.raise_for_status()
    return CreateAliasResponse(**resp.json)

create_code_signing_config async

create_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
344
345
346
347
348
349
350
351
352
353
354
355
356
357
async def create_code_signing_config(
    self, request: CreateCodeSigningConfigRequest
) -> CreateCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2020-04-22/code-signing-configs"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return CreateCodeSigningConfigResponse(**resp.json)

create_event_source_mapping async

create_event_source_mapping(request)
Source code in async_boto/clients/lambda_.py
359
360
361
362
363
364
365
366
367
368
369
370
371
372
async def create_event_source_mapping(
    self, request: CreateEventSourceMappingRequest
) -> CreateEventSourceMappingResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2015-03-31/event-source-mappings/"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return CreateEventSourceMappingResponse(**resp.json)

create_function async

create_function(request)
Source code in async_boto/clients/lambda_.py
374
375
376
377
378
379
380
381
382
383
384
385
386
387
async def create_function(
    self, request: CreateFunctionRequest
) -> CreateFunctionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2015-03-31/functions"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return CreateFunctionResponse(**resp.json)

create_function_url_config async

create_function_url_config(request)
Source code in async_boto/clients/lambda_.py
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
async def create_function_url_config(
    self, request: CreateFunctionUrlConfigRequest
) -> CreateFunctionUrlConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/url-config"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName", "Qualifier"},
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return CreateFunctionUrlConfigResponse(**resp.json)

delete_alias async

delete_alias(request)
Source code in async_boto/clients/lambda_.py
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
async def delete_alias(self, request: DeleteAliasRequest) -> DeleteAliasResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2015-03-31/functions/{request.FunctionName}/aliases/{request.Name}"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return DeleteAliasResponse(**resp.json)

delete_code_signing_config async

delete_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
async def delete_code_signing_config(
    self, request: DeleteCodeSigningConfigRequest
) -> DeleteCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-04-22/code-signing-configs/{request.CodeSigningConfigArn}"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"CodeSigningConfigArn"},
        ),
    )
    resp.raise_for_status()
    return DeleteCodeSigningConfigResponse(**resp.json)

delete_event_source_mapping async

delete_event_source_mapping(request)
Source code in async_boto/clients/lambda_.py
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
async def delete_event_source_mapping(
    self, request: DeleteEventSourceMappingRequest
) -> DeleteEventSourceMappingResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/event-source-mappings/{request.UUID}"
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True, exclude_none=True, exclude={"UUID"}
        ),
    )
    resp.raise_for_status()
    return DeleteEventSourceMappingResponse(**resp.json)

delete_function async

delete_function(request)
Source code in async_boto/clients/lambda_.py
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
async def delete_function(
    self, request: DeleteFunctionRequest
) -> DeleteFunctionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}"
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True, exclude_none=True, exclude={"FunctionName"}
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return DeleteFunctionResponse(**resp.json)

delete_function_code_signing_config async

delete_function_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
async def delete_function_code_signing_config(
    self, request: DeleteFunctionCodeSigningConfigRequest
) -> DeleteFunctionCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-06-30/functions/{request.FunctionName}/code-signing-config"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True, exclude_none=True, exclude={"FunctionName"}
        ),
    )
    resp.raise_for_status()
    return DeleteFunctionCodeSigningConfigResponse(**resp.json)

delete_function_concurrency async

delete_function_concurrency(request)
Source code in async_boto/clients/lambda_.py
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
async def delete_function_concurrency(
    self, request: DeleteFunctionConcurrencyRequest
) -> DeleteFunctionConcurrencyResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2017-10-31/functions/{request.FunctionName}/concurrency"
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True, exclude_none=True, exclude={"FunctionName"}
        ),
    )
    resp.raise_for_status()
    return DeleteFunctionConcurrencyResponse(**resp.json)

delete_function_event_invoke_config async

delete_function_event_invoke_config(request)
Source code in async_boto/clients/lambda_.py
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
async def delete_function_event_invoke_config(
    self, request: DeleteFunctionEventInvokeConfigRequest
) -> DeleteFunctionEventInvokeConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-25/functions/{request.FunctionName}/event-invoke-config"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName", "Qualifier"},
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return DeleteFunctionEventInvokeConfigResponse(**resp.json)

delete_function_url_config async

delete_function_url_config(request)
Source code in async_boto/clients/lambda_.py
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
async def delete_function_url_config(
    self, request: DeleteFunctionUrlConfigRequest
) -> DeleteFunctionUrlConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2021-10-31/functions/{request.FunctionName}/url"
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName", "Qualifier"},
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return DeleteFunctionUrlConfigResponse()

delete_layer_version async

delete_layer_version(request)
Source code in async_boto/clients/lambda_.py
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
async def delete_layer_version(
    self, request: DeleteLayerVersionRequest
) -> DeleteLayerVersionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2018-10-31/layers/{request.LayerName}/versions/{request.VersionNumber}"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"LayerName", "VersionNumber"},
        ),
    )
    resp.raise_for_status()
    return DeleteLayerVersionResponse()

delete_provisioned_concurrency_config async

delete_provisioned_concurrency_config(request)
Source code in async_boto/clients/lambda_.py
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
async def delete_provisioned_concurrency_config(
    self, request: DeleteProvisionedConcurrencyConfigRequest
) -> DeleteProvisionedConcurrencyConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-30/functions/{request.FunctionName}/provisioned-concurrency"
    )
    resp = await self._delete(
        url=url,
        headers=headers,
        json=request.model_dump(
            exclude_defaults=True,
            exclude_none=True,
            exclude={"FunctionName", "Qualifier"},
        ),
        params={"Qualifier": request.Qualifier} if request.Qualifier else {},
    )
    resp.raise_for_status()
    return DeleteProvisionedConcurrencyConfigResponse()

get_account_settings async

get_account_settings(request)
Source code in async_boto/clients/lambda_.py
607
608
609
610
611
612
613
614
615
616
617
618
619
620
async def get_account_settings(
    self, request: GetAccountSettingsRequest
) -> GetAccountSettingsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2016-08-19/account-settings/"
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetAccountSettingsResponse(**resp.json())

get_alias async

get_alias(request)
Source code in async_boto/clients/lambda_.py
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
async def get_alias(self, request: GetAliasRequest) -> GetAliasResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2015-03-31/functions/{request.FunctionName}/aliases/{request.Name}"
    )
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetAliasResponse(**resp.json())

get_code_signing_config async

get_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
async def get_code_signing_config(
    self, request: GetCodeSigningConfigRequest
) -> GetCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-04-22/code-signing-configs/{request.CodeSigningConfigArn}"
    )
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetCodeSigningConfigResponse(**resp.json())

get_event_source_mapping async

get_event_source_mapping(request)
Source code in async_boto/clients/lambda_.py
656
657
658
659
660
661
662
663
664
665
666
667
668
669
async def get_event_source_mapping(
    self, request: GetEventSourceMappingRequest
) -> GetEventSourceMappingResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/event-source-mappings/{request.UUID}"
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetEventSourceMappingResponse(**resp.json())

get_function async

get_function(request)
Source code in async_boto/clients/lambda_.py
671
672
673
674
675
676
677
678
679
680
681
682
683
async def get_function(self, request: GetFunctionRequest) -> GetFunctionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetFunctionResponse(**resp.json())

get_function_code_signing_config async

get_function_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
async def get_function_code_signing_config(
    self, request: GetFunctionCodeSigningConfigRequest
) -> GetFunctionCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-06-30/functions/{request.FunctionName}/code-signing-config"
    )
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetFunctionCodeSigningConfigResponse(**resp.json())

get_function_concurrency async

get_function_concurrency(request)
Source code in async_boto/clients/lambda_.py
703
704
705
706
707
708
709
710
711
712
713
714
715
716
async def get_function_concurrency(
    self, request: GetFunctionConcurrencyRequest
) -> GetFunctionConcurrencyResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2019-09-30/functions/{request.FunctionName}/concurrency"
    resp = await self._get(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return GetFunctionConcurrencyResponse(**resp.json())

get_function_configuration async

get_function_configuration(request)
Source code in async_boto/clients/lambda_.py
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
async def get_function_configuration(
    self, request: GetFunctionConfigurationRequest
) -> GetFunctionConfigurationResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/configuration"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetFunctionConfigurationResponse(**resp.json())

get_function_event_invoke_config async

get_function_event_invoke_config(request)
Source code in async_boto/clients/lambda_.py
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
async def get_function_event_invoke_config(
    self, request: GetFunctionEventInvokeConfigRequest
) -> GetFunctionEventInvokeConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-25/functions/{request.FunctionName}/event-invoke-config"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetFunctionEventInvokeConfigResponse(**resp.json())

get_function_recursion_config async

get_function_recursion_config(request)
Source code in async_boto/clients/lambda_.py
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
async def get_function_recursion_config(
    self, request: GetFunctionRecursionConfigRequest
) -> GetFunctionRecursionConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url + f"/2024-08-31/functions/{request.FunctionName}/recursion-config"
    )
    resp = await self._get(
        url=url,
        headers=headers,
    )
    resp.raise_for_status()
    return GetFunctionRecursionConfigResponse(**resp.json())

get_function_url_config async

get_function_url_config(request)
Source code in async_boto/clients/lambda_.py
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
async def get_function_url_config(
    self, request: GetFunctionUrlConfigRequest
) -> GetFunctionUrlConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2021-10-31/functions/{request.FunctionName}/url"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetFunctionUrlConfigResponse(**resp.json())

get_layer_version async

get_layer_version(request)
Source code in async_boto/clients/lambda_.py
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
async def get_layer_version(
    self, request: GetLayerVersionRequest
) -> GetLayerVersionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2018-10-31/layers/{request.LayerName}/versions/{request.VersionNumber}"
    )
    resp = await self._get(
        url=url,
        headers=headers,
    )
    resp.raise_for_status()
    return GetLayerVersionResponse(**resp.json())

get_layer_version_by_arn async

get_layer_version_by_arn(request)
Source code in async_boto/clients/lambda_.py
802
803
804
805
806
807
808
809
810
811
812
813
814
async def get_layer_version_by_arn(
    self, request: GetLayerVersionByArnRequest
) -> GetLayerVersionByArnResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2018-10-31/layers?find=LayerVersion&Arn={request.Arn}"
    resp = await self._get(
        url=url,
        headers=headers,
    )
    resp.raise_for_status()
    return GetLayerVersionByArnResponse(**resp.json())

get_layer_version_policy async

get_layer_version_policy(request)
Source code in async_boto/clients/lambda_.py
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
async def get_layer_version_policy(
    self, request: GetLayerVersionPolicyRequest
) -> GetLayerVersionPolicyResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2018-10-31/layers/{request.LayerName}/versions/{request.VersionNumber}/policy"  # noqa: E501
    )
    resp = await self._get(
        url=url,
        headers=headers,
    )
    resp.raise_for_status()
    return GetLayerVersionPolicyResponse(**resp.json())

get_policy async

get_policy(request)
Source code in async_boto/clients/lambda_.py
833
834
835
836
837
838
839
840
841
842
843
844
845
async def get_policy(self, request: GetPolicyRequest) -> GetPolicyResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/policy"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetPolicyResponse(**resp.json())

get_provisioned_concurrency_config async

get_provisioned_concurrency_config(request)
Source code in async_boto/clients/lambda_.py
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
async def get_provisioned_concurrency_config(
    self, request: GetProvisionedConcurrencyConfigRequest
) -> GetProvisionedConcurrencyConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-30/functions/{request.FunctionName}/provisioned-concurrency"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetProvisionedConcurrencyConfigResponse(**resp.json())

get_runtime_management_config async

get_runtime_management_config(request)
Source code in async_boto/clients/lambda_.py
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
async def get_runtime_management_config(
    self, request: GetRuntimeManagementConfigRequest
) -> GetRuntimeManagementConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2021-07-20/functions/{request.FunctionName}/runtime-management-config"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return GetRuntimeManagementConfigResponse(**resp.json())

invoke async

invoke(request)
Source code in async_boto/clients/lambda_.py
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
async def invoke(self, request: InvokeRequest) -> InvokeResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
        "X-Amz-Invocation-Type": request.InvocationType,
        "X-Amz-Log-Type": request.LogType,
    }
    if request.ClientContext:
        headers["X-Amz-Client-Context"] = request.ClientContext

    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/invocations"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.Payload,
        params=params,
    )
    resp.raise_for_status()
    return InvokeResponse(
        StatusCode=resp.status_code,
        FunctionError=resp.headers.get("X-Amz-Function-Error"),
        LogResult=resp.headers.get("X-Amz-Log-Result"),
        ExecutedVersion=resp.headers.get("X-Amz-Executed-Version"),
        Payload=resp.json() if resp.content else None,
    )

invoke_async async

invoke_async(request)
Source code in async_boto/clients/lambda_.py
911
912
913
914
915
916
917
918
919
920
921
922
async def invoke_async(self, request: InvokeAsyncRequest) -> InvokeAsyncResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2014-11-13/functions/{request.FunctionName}/invoke-async/"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.InvokeArgs,
    )
    resp.raise_for_status()
    return InvokeAsyncResponse(Status=resp.status_code)

invoke_with_response_stream async

invoke_with_response_stream(request)
Source code in async_boto/clients/lambda_.py
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
async def invoke_with_response_stream(
    self, request: InvokeWithResponseStreamRequest
) -> InvokeWithResponseStreamResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
        "X-Amz-Invocation-Type": request.InvocationType,
        "X-Amz-Log-Type": request.LogType,
    }
    if request.ClientContext:
        headers["X-Amz-Client-Context"] = request.ClientContext

    url = (
        self._url
        + f"/2021-11-15/functions/{request.FunctionName}/response-streaming-invocations"  # noqa: E501
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.Payload,
        params=params,
    )
    resp.raise_for_status()
    return InvokeWithResponseStreamResponse(
        StatusCode=resp.status_code,
        ExecutedVersion=resp.headers.get("X-Amz-Executed-Version"),
        ResponseStreamContentType=resp.headers.get("Content-Type"),
        **resp.json() if resp.content else None,
    )

list_aliases async

list_aliases(request)
Source code in async_boto/clients/lambda_.py
954
955
956
957
958
959
960
961
962
963
964
965
966
async def list_aliases(self, request: ListAliasesRequest) -> ListAliasesResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/aliases"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListAliasesResponse(**resp.json())

list_code_signing_configs async

list_code_signing_configs(request)
Source code in async_boto/clients/lambda_.py
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
async def list_code_signing_configs(
    self, request: ListCodeSigningConfigsRequest
) -> ListCodeSigningConfigsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2020-04-22/code-signing-configs/"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListCodeSigningConfigsResponse(**resp.json())

list_event_source_mappings async

list_event_source_mappings(request)
Source code in async_boto/clients/lambda_.py
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
async def list_event_source_mappings(
    self, request: ListEventSourceMappingsRequest
) -> ListEventSourceMappingsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2015-03-31/event-source-mappings/"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListEventSourceMappingsResponse(**resp.json())

list_function_event_invoke_configs async

list_function_event_invoke_configs(request)
Source code in async_boto/clients/lambda_.py
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
async def list_function_event_invoke_configs(
    self, request: ListFunctionEventInvokeConfigsRequest
) -> ListFunctionEventInvokeConfigsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-25/functions/{request.FunctionName}/event-invoke-config/list"
    )
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListFunctionEventInvokeConfigsResponse(**resp.json())

list_functions async

list_functions(request)
Source code in async_boto/clients/lambda_.py
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
async def list_functions(
    self, request: ListFunctionsRequest
) -> ListFunctionsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2015-03-31/functions/"
    resp = await self._get(
        url=url,
        headers=headers,
        json={},
        params=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    print(resp.json)
    resp.raise_for_status()
    return ListFunctionsResponse(**resp.json)

list_functions_by_code_signing_config async

list_functions_by_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
async def list_functions_by_code_signing_config(
    self, request: ListFunctionsByCodeSigningConfigRequest
) -> ListFunctionsByCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-04-22/code-signing-configs/{request.CodeSigningConfigArn}/functions"  # noqa: E501
    )
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListFunctionsByCodeSigningConfigResponse(**resp.json())

list_function_url_configs async

list_function_url_configs(request)
Source code in async_boto/clients/lambda_.py
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
async def list_function_url_configs(
    self, request: ListFunctionUrlConfigsRequest
) -> ListFunctionUrlConfigsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2021-10-31/functions/{request.FunctionName}/urls"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListFunctionUrlConfigsResponse(**resp.json())

list_layers async

list_layers(request)
Source code in async_boto/clients/lambda_.py
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
async def list_layers(self, request: ListLayersRequest) -> ListLayersResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + "/2018-10-31/layers"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListLayersResponse(**resp.json())

list_layer_versions async

list_layer_versions(request)
Source code in async_boto/clients/lambda_.py
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
async def list_layer_versions(
    self, request: ListLayerVersionsRequest
) -> ListLayerVersionsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2018-10-31/layers/{request.LayerName}/versions"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListLayerVersionsResponse(**resp.json())

list_provisioned_concurrency_configs async

list_provisioned_concurrency_configs(request)
Source code in async_boto/clients/lambda_.py
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
async def list_provisioned_concurrency_configs(
    self, request: ListProvisionedConcurrencyConfigsRequest
) -> ListProvisionedConcurrencyConfigsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-30/functions/{request.FunctionName}/provisioned-concurrency"
    )
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListProvisionedConcurrencyConfigsResponse(**resp.json())

list_tags async

list_tags(request)
Source code in async_boto/clients/lambda_.py
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
async def list_tags(self, request: ListTagsRequest) -> ListTagsResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2017-03-31/tags/{request.ARN}"
    resp = await self._get(
        url=url,
        headers=headers,
    )
    resp.raise_for_status()
    return ListTagsResponse(**resp.json())

list_versions_by_function async

list_versions_by_function(request)
Source code in async_boto/clients/lambda_.py
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
async def list_versions_by_function(
    self, request: ListVersionsByFunctionRequest
) -> ListVersionsByFunctionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/versions"
    params = request.model_dump(exclude_defaults=True, exclude_none=True)
    resp = await self._get(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return ListVersionsByFunctionResponse(**resp.json())

publish_version async

publish_version(request)
Source code in async_boto/clients/lambda_.py
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
async def publish_version(
    self, request: PublishVersionRequest
) -> PublishVersionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/versions"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return PublishVersionResponse(**resp.json())

put_function_code_signing_config async

put_function_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
async def put_function_code_signing_config(
    self, request: PutFunctionCodeSigningConfigRequest
) -> PutFunctionCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-06-30/functions/{request.FunctionName}/code-signing-config"
    )
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return PutFunctionCodeSigningConfigResponse(**resp.json())

put_function_concurrency async

put_function_concurrency(request)
Source code in async_boto/clients/lambda_.py
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
async def put_function_concurrency(
    self, request: PutFunctionConcurrencyRequest
) -> PutFunctionConcurrencyResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2017-10-31/functions/{request.FunctionName}/concurrency"
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return PutFunctionConcurrencyResponse(**resp.json())

put_function_event_invoke_config async

put_function_event_invoke_config(request)
Source code in async_boto/clients/lambda_.py
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
async def put_function_event_invoke_config(
    self, request: PutFunctionEventInvokeConfigRequest
) -> PutFunctionEventInvokeConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-25/functions/{request.FunctionName}/event-invoke-config"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
        params=params,
    )
    resp.raise_for_status()
    return PutFunctionEventInvokeConfigResponse(**resp.json())

put_function_recursion_config async

put_function_recursion_config(request)
Source code in async_boto/clients/lambda_.py
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
async def put_function_recursion_config(
    self, request: PutFunctionRecursionConfigRequest
) -> PutFunctionRecursionConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url + f"/2024-08-31/functions/{request.FunctionName}/recursion-config"
    )
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return PutFunctionRecursionConfigResponse(**resp.json())

put_provisioned_concurrency_config async

put_provisioned_concurrency_config(request)
Source code in async_boto/clients/lambda_.py
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
async def put_provisioned_concurrency_config(
    self, request: PutProvisionedConcurrencyConfigRequest
) -> PutProvisionedConcurrencyConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2019-09-30/functions/{request.FunctionName}/provisioned-concurrency"
    )
    params = {"Qualifier": request.Qualifier}
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
        params=params,
    )
    resp.raise_for_status()
    return PutProvisionedConcurrencyConfigResponse(**resp.json())

put_runtime_management_config async

put_runtime_management_config(request)
Source code in async_boto/clients/lambda_.py
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
async def put_runtime_management_config(
    self, request: PutRuntimeManagementConfigRequest
) -> PutRuntimeManagementConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2021-07-20/functions/{request.FunctionName}/runtime-management-config"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
        params=params,
    )
    resp.raise_for_status()
    return PutRuntimeManagementConfigResponse(**resp.json())

remove_layer_version_permission async

remove_layer_version_permission(request)
Source code in async_boto/clients/lambda_.py
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
async def remove_layer_version_permission(
    self, request: RemoveLayerVersionPermissionRequest
) -> RemoveLayerVersionPermissionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2018-10-31/layers/{request.LayerName}/versions/{request.VersionNumber}/policy/{request.StatementId}"  # noqa: E501
    )
    params = {"RevisionId": request.RevisionId} if request.RevisionId else {}
    resp = await self._delete(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return RemoveLayerVersionPermissionResponse()

remove_permission async

remove_permission(request)
Source code in async_boto/clients/lambda_.py
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
async def remove_permission(
    self, request: RemovePermissionRequest
) -> RemovePermissionResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2015-03-31/functions/{request.FunctionName}/policy/{request.StatementId}"  # noqa: E501
    )
    params = {}
    if request.Qualifier:
        params["Qualifier"] = request.Qualifier
    if request.RevisionId:
        params["RevisionId"] = request.RevisionId
    resp = await self._delete(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return RemovePermissionResponse()

tag_resource async

tag_resource(request)
Source code in async_boto/clients/lambda_.py
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
async def tag_resource(self, request: TagResourceRequest) -> TagResourceResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2017-03-31/tags/{request.ARN}"
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return TagResourceResponse()

untag_resource async

untag_resource(request)
Source code in async_boto/clients/lambda_.py
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
async def untag_resource(
    self, request: UntagResourceRequest
) -> UntagResourceResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2017-03-31/tags/{request.ARN}"
    params = {"tagKeys": request.TagKeys}
    resp = await self._delete(
        url=url,
        headers=headers,
        params=params,
    )
    resp.raise_for_status()
    return UntagResourceResponse()

update_alias async

update_alias(request)
Source code in async_boto/clients/lambda_.py
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
async def update_alias(self, request: UpdateAliasRequest) -> UpdateAliasResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2015-03-31/functions/{request.FunctionName}/aliases/{request.Name}"
    )
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return UpdateAliasResponse(**resp.json())

update_code_signing_config async

update_code_signing_config(request)
Source code in async_boto/clients/lambda_.py
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
async def update_code_signing_config(
    self, request: UpdateCodeSigningConfigRequest
) -> UpdateCodeSigningConfigResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = (
        self._url
        + f"/2020-04-22/code-signing-configs/{request.CodeSigningConfigArn}"
    )
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return UpdateCodeSigningConfigResponse(**resp.json())

update_event_source_mapping async

update_event_source_mapping(request)
Source code in async_boto/clients/lambda_.py
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
async def update_event_source_mapping(
    self, request: UpdateEventSourceMappingRequest
) -> UpdateEventSourceMappingResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/event-source-mappings/{request.UUID}"
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return UpdateEventSourceMappingResponse(**resp.json())

update_function_code async

update_function_code(request)
Source code in async_boto/clients/lambda_.py
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
async def update_function_code(
    self, request: UpdateFunctionCodeRequest
) -> UpdateFunctionCodeResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/code"
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return UpdateFunctionCodeResponse(**resp.json())

update_function_configuration async

update_function_configuration(request)
Source code in async_boto/clients/lambda_.py
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
async def update_function_configuration(
    self, request: UpdateFunctionConfigurationRequest
) -> UpdateFunctionConfigurationResponse:
    headers = {
        "Content-Type": "application/x-amz-json-1.0",
    }
    url = self._url + f"/2015-03-31/functions/{request.FunctionName}/configuration"
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
    )
    resp.raise_for_status()
    return UpdateFunctionConfigurationResponse(**resp.json())

update_function_event_invoke_config async

update_function_event_invoke_config(request)

Updates the configuration for asynchronous invocation for a function, version, or alias.

Source code in async_boto/clients/lambda_.py
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
async def update_function_event_invoke_config(
    self, request: UpdateFunctionEventInvokeConfigRequest
) -> UpdateFunctionEventInvokeConfigResponse:
    """
    Updates the configuration for asynchronous invocation for a function, version,
    or alias.
    """
    headers = {
        "Content-Type": "application/json",
    }
    url = (
        self._url
        + f"/2019-09-25/functions/{request.FunctionName}/event-invoke-config"
    )
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._post(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
        params=params,
    )
    resp.raise_for_status()
    return UpdateFunctionEventInvokeConfigResponse(**resp.json())

update_function_url_config async

update_function_url_config(request)

Updates the configuration for a Lambda function URL.

PARAMETER DESCRIPTION
request

The request model containing the parameters for updating the function URL configuration.

TYPE: UpdateFunctionUrlConfigRequest

RETURNS DESCRIPTION
UpdateFunctionUrlConfigResponse

The response model containing the updated function URL configuration.

Source code in async_boto/clients/lambda_.py
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
async def update_function_url_config(
    self, request: UpdateFunctionUrlConfigRequest
) -> UpdateFunctionUrlConfigResponse:
    """
    Updates the configuration for a Lambda function URL.

    Parameters
    ----------
    request : UpdateFunctionUrlConfigRequest
        The request model containing the parameters for updating the function URL
        configuration.

    Returns
    -------
    UpdateFunctionUrlConfigResponse
        The response model containing the updated function URL configuration.
    """
    headers = {
        "Content-Type": "application/json",
    }
    url = self._url + f"/2021-10-31/functions/{request.FunctionName}/url"
    params = {"Qualifier": request.Qualifier} if request.Qualifier else {}
    resp = await self._put(
        url=url,
        headers=headers,
        json=request.model_dump(exclude_defaults=True, exclude_none=True),
        params=params,
    )
    resp.raise_for_status()
    return UpdateFunctionUrlConfigResponse(**resp.json())

paginate async

paginate(method_name, request)
Source code in async_boto/core/base_client.py
255
256
257
258
259
260
261
262
263
async def paginate(self, method_name, request: BaseModel):
    if method_name not in self._paginators:
        raise ValueError(
            f"Method {method_name} is not paginatable. "
            f"Available methods: {list(self._paginators.keys())}"
        )
    paginator = paginate(self, request=request, **self._paginators[method_name])
    async for page in paginator:
        yield page