首页 > 解决方案 > 在 Google Cloud Talent Solution (python) 中创建公司时如何使用默认租户?

问题描述

我可以通过以下方式创建公司:

client = talent_v4beta1.CompanyServiceClient()
company = {'display_name': ..., 'external_id: ...}
response = client.create_company('projects/my-project-id', company)

我没有指定 atenant并且 Google 会创建并使用默认租户。

我怎么打电话get_company()

client = talent_v4beta1.CompanyServiceClient()
name = ?
response = client.get_company(name)

我能找到的唯一要填充的 APInametentant_path()需要tenant传递的我没有值的 API。如果我project_path()改为打电话,那么这不包括任何租户并且get_company()无法匹配任何公司。

标签: pythongoogle-cloud-talent-solution

解决方案


推荐阅读