命名空间和模块:tencent.cloud.serverless.functions.client.FunctionCode
def use_git_repository(self,
git_url: str,
git_branch_name: str = None,
git_directory_name: str = None,
git_commit_id: str = None,
git_username: str = None,
git_password: str = None
)否
Git 仓库中包含用于无服务器云函数源代码的目录名称。
git_commit_id
str
否
Git 仓库中包含用于无服务器云函数源代码的提交 ID。
git_username
str
否
拥有给定 Git 仓库访问权限的用户名。
git_password
str
否
拥有给定 Git 仓库访问权限用户的密码。
参数
类型
必选
描述
git_url
str
是
Git 仓库 URL 字符串。
git_branch_name
str
否
Git 仓库中已创建的分支名称。
git_directory_name
str
functions.FunctionCode.use_git_repository(
git_url = 'https://github.com/tencentyun/scf-demo-repo.git',
git_directory_name = 'Python3.6-helloworld'
)def get_code_source(self) -> intfunctions.FunctionCode().get_code_source()命名空间和模块:tencent.cloud.serverless.functions.client.FunctionCode
def get_code_context(self) -> dictfunctions.FunctionCode().get_code_context()def __init__(self)from tencent.cloud.serverless import functions
# The method will return itself.
functions.FunctionCode().use_object_storage_bucket(
region_id = 'ap-shanghai-1',
bucket_name = 'scf-code',
object_name = 'source.zip'
)命名空间和模块:tencent.cloud.serverless.functions.client.FunctionCode
命名空间和模块:tencent.cloud.serverless.functions.client.FunctionCode
def use_local_zip_archive(self,
local_file_path: str
)def use_object_storage_bucket(self,
region_id: str,
bucket_name: str,
object_name: str
)参数
类型
必选
描述
local_file_path
str
是
本机硬盘上的 ZIP 压缩档案文件路径。
是
对象存储桶中用于作为无服务器云函数源代码 ZIP 档案文件的对象名称。
参数
类型
必选
描述
region_id
str
是
对象存储桶所在数据中心园区的可用区唯一标识符。
bucket_name
str
是
对象存储桶的完全名称,例如 scf-code-1000000000。
object_name
str
functions.FunctionCode.use_local_zip_archive(
local_file_path = './source.zip'
)functions.FunctionCode.use_object_storage_bucket(
region_id = 'ap-shanghai',
bucket_name = 'scf-code-1000000000',
object_name = 'source.zip'
)