本文整理汇总了Python中chalice.awsclient.TypedAWSClient.download_sdk方法的典型用法代码示例。如果您正苦于以下问题:Python TypedAWSClient.download_sdk方法的具体用法?Python TypedAWSClient.download_sdk怎么用?Python TypedAWSClient.download_sdk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chalice.awsclient.TypedAWSClient
的用法示例。
在下文中一共展示了TypedAWSClient.download_sdk方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_sdk
# 需要导入模块: from chalice.awsclient import TypedAWSClient [as 别名]
# 或者: from chalice.awsclient.TypedAWSClient import download_sdk [as 别名]
def generate_sdk(ctx, sdk_type, stage, outdir):
# type: (click.Context, str, str, str) -> None
factory = ctx.obj['factory'] # type: CLIFactory
config = factory.create_config_obj(stage)
session = factory.create_botocore_session()
client = TypedAWSClient(session)
deployed = config.deployed_resources(stage)
if deployed is not None and 'rest_api' in deployed.resource_names():
rest_api_id = deployed.resource_values('rest_api')['rest_api_id']
api_gateway_stage = config.api_gateway_stage
client.download_sdk(rest_api_id, outdir,
api_gateway_stage=api_gateway_stage,
sdk_type=sdk_type)
else:
click.echo("Could not find API ID, has this application "
"been deployed?", err=True)
raise click.Abort()