def set_result(self,
wait_result: object
)
from tencent.cloud.core import errors
from tencent.cloud.core import waitable
from tencent.cloud.serverless import functions
def main():
client: functions.Client = functions.fetch_client()
create_operation: waitable.Waitable = client.create_layer(
region_id = 'ap-shanghai',
layer_name = 'default',
layer_description = 'default layer',
layer_content = functions.LayerContent().use_local_zip_archive(
local_file_path = './layer.zip'
),
layer_runtimes = [
functions.FunctionRuntime.Python
],
layer_license = 'default license'
)
create_operation.set_result(
wait_result = 10
)
if __name__ == '__main__':
main()
Tencent Cloud SDK for Python