文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
CreateProject
搭配 a AWS SDK 使用
下列程式碼範例示範如何使用 CreateProject
。
如需詳細資訊,請參閱建立專案。
- Python
-
- SDK for Python (Boto3)
-
注意
還有更多 on GitHub。尋找完整範例,並了解如何在 AWS 程式碼範例儲存庫
中設定和執行。 class Projects: @staticmethod def create_project(lookoutvision_client, project_name): """ Creates a new Lookout for Vision project. :param lookoutvision_client: A Boto3 Lookout for Vision client. :param project_name: The name for the new project. :return project_arn: The ARN of the new project. """ try: logger.info("Creating project: %s", project_name) response = lookoutvision_client.create_project(ProjectName=project_name) project_arn = response["ProjectMetadata"]["ProjectArn"] logger.info("project ARN: %s", project_arn) except ClientError: logger.exception("Couldn't create project %s.", project_name) raise else: return project_arn
-
如需 API 詳細資訊,請參閱 CreateProject AWS SDK for Python (Boto3) Word 參考中的 API。
-
CreateModel
DeleteDataset