@@ -628,6 +628,121 @@ class FunctionService {
628
628
LayerVersion : version
629
629
} ) ;
630
630
}
631
+ /**
632
+ * 设置预置并发
633
+ * @private
634
+ * @param {IProvisionedConcurrencyConfig } concurrencyConfig
635
+ * @returns
636
+ * @memberof FunctionService
637
+ */
638
+ async setProvisionedConcurrencyConfig ( concurrencyConfig ) {
639
+ const { namespace } = this . getFunctionConfig ( ) ;
640
+ const { functionName : FunctionName , qualifier : Qualifier , versionProvisionedConcurrencyNum : VersionProvisionedConcurrencyNum } = concurrencyConfig ;
641
+ return this . scfService . request ( 'PutProvisionedConcurrencyConfig' , {
642
+ FunctionName,
643
+ Qualifier,
644
+ VersionProvisionedConcurrencyNum,
645
+ Namespace : namespace
646
+ } ) ;
647
+ }
648
+ /**
649
+ * 获取函数预置并发详情
650
+ * @private
651
+ * @param {IGetProvisionedConcurrencyConfig } concurrencyConfig
652
+ * @returns {Promise<IGetProvisionedConcurrencyRes> }
653
+ * @memberof FunctionService
654
+ */
655
+ async getProvisionedConcurrencyConfig ( concurrencyConfig ) {
656
+ const { namespace } = this . getFunctionConfig ( ) ;
657
+ const { functionName : FunctionName , qualifier : Qualifier } = concurrencyConfig ;
658
+ return this . scfService . request ( 'GetProvisionedConcurrencyConfig' , {
659
+ FunctionName,
660
+ Qualifier,
661
+ Namespace : namespace
662
+ } ) ;
663
+ }
664
+ /**
665
+ * 删除预置并发
666
+ * @private
667
+ * @param {IGetProvisionedConcurrencyConfig } concurrencyConfig
668
+ * @returns {Promise<IResponseInfo> }
669
+ * @memberof FunctionService
670
+ */
671
+ async deleteProvisionedConcurrencyConfig ( concurrencyConfig ) {
672
+ const { namespace } = this . getFunctionConfig ( ) ;
673
+ const { functionName : FunctionName , qualifier : Qualifier } = concurrencyConfig ;
674
+ return this . scfService . request ( 'DeleteProvisionedConcurrencyConfig' , {
675
+ FunctionName,
676
+ Qualifier,
677
+ Namespace : namespace
678
+ } ) ;
679
+ }
680
+ /**
681
+ * 发布新版本
682
+ * @param {IPublishVersionParams } publishParams
683
+ * @returns {Promise<IPublishVersionRes> }
684
+ * @memberof FunctionService
685
+ */
686
+ async publishVersion ( publishParams ) {
687
+ const { namespace } = this . getFunctionConfig ( ) ;
688
+ const { functionName : FunctionName , description : Description } = publishParams ;
689
+ return this . scfService . request ( 'PublishVersion' , {
690
+ FunctionName,
691
+ Description,
692
+ Namespace : namespace
693
+ } ) ;
694
+ }
695
+ /**
696
+ * 查询函数版本详情
697
+ * @param {IListFunctionVersionParams } listVersionParams
698
+ * @returns {Promise<IFunctionVersionsRes> }
699
+ * @memberof FunctionService
700
+ */
701
+ async listVersionByFunction ( listVersionParams ) {
702
+ const { namespace } = this . getFunctionConfig ( ) ;
703
+ const { functionName : FunctionName , offset : Offset , limit : Limit , order : Order , orderBy : OrderBy } = listVersionParams ;
704
+ return this . scfService . request ( 'ListVersionByFunction' , {
705
+ FunctionName,
706
+ Namespace : namespace ,
707
+ Offset,
708
+ Limit,
709
+ Order,
710
+ OrderBy
711
+ } ) ;
712
+ }
713
+ /**
714
+ *
715
+ * @param {IUpdateFunctionAliasConfig } updateVersionConfigParams
716
+ * @returns {Promise<IResponseInfo> }
717
+ * @memberof FunctionService
718
+ */
719
+ async updateFunctionAliasConfig ( updateVersionConfigParams ) {
720
+ const { namespace } = this . getFunctionConfig ( ) ;
721
+ const { functionName : FunctionName , name : Name , functionVersion : FunctionVersion , routingConfig : RoutingConfig , description : Description } = updateVersionConfigParams ;
722
+ return this . scfService . request ( 'UpdateAlias' , {
723
+ FunctionName,
724
+ Name,
725
+ Namespace : namespace ,
726
+ FunctionVersion,
727
+ RoutingConfig,
728
+ Description
729
+ } ) ;
730
+ }
731
+ /**
732
+ * 查询函数别名详情
733
+ * @param {IGetFunctionAlias } params
734
+ * @returns {Promise<IGetFunctionAliasRes> }
735
+ * @memberof FunctionService
736
+ */
737
+ async getFunctionAlias ( params ) {
738
+ const { namespace } = this . getFunctionConfig ( ) ;
739
+ const { functionName : FunctionName , name : Name } = params ;
740
+ return this . scfService . request ( 'GetAlias' , {
741
+ FunctionName,
742
+ Name,
743
+ Namespace : namespace
744
+ } ) ;
745
+ }
631
746
async createAccessPath ( name , path ) {
632
747
const access = this . environment . getAccessService ( ) ;
633
748
try {
@@ -856,6 +971,27 @@ __decorate([
856
971
__decorate ( [
857
972
utils_1 . preLazy ( )
858
973
] , FunctionService . prototype , "getLayerVersion" , null ) ;
974
+ __decorate ( [
975
+ utils_1 . preLazy ( )
976
+ ] , FunctionService . prototype , "setProvisionedConcurrencyConfig" , null ) ;
977
+ __decorate ( [
978
+ utils_1 . preLazy ( )
979
+ ] , FunctionService . prototype , "getProvisionedConcurrencyConfig" , null ) ;
980
+ __decorate ( [
981
+ utils_1 . preLazy ( )
982
+ ] , FunctionService . prototype , "deleteProvisionedConcurrencyConfig" , null ) ;
983
+ __decorate ( [
984
+ utils_1 . preLazy ( )
985
+ ] , FunctionService . prototype , "publishVersion" , null ) ;
986
+ __decorate ( [
987
+ utils_1 . preLazy ( )
988
+ ] , FunctionService . prototype , "listVersionByFunction" , null ) ;
989
+ __decorate ( [
990
+ utils_1 . preLazy ( )
991
+ ] , FunctionService . prototype , "updateFunctionAliasConfig" , null ) ;
992
+ __decorate ( [
993
+ utils_1 . preLazy ( )
994
+ ] , FunctionService . prototype , "getFunctionAlias" , null ) ;
859
995
__decorate ( [
860
996
utils_1 . preLazy ( )
861
997
] , FunctionService . prototype , "createAccessPath" , null ) ;
0 commit comments