本文整理汇总了Python中moto.mock_sts方法的典型用法代码示例。如果您正苦于以下问题:Python moto.mock_sts方法的具体用法?Python moto.mock_sts怎么用?Python moto.mock_sts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类moto
的用法示例。
在下文中一共展示了moto.mock_sts方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sh
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def sh(self):
with moto.mock_s3(), moto.mock_sts():
sh = security_hub_rules.SecurityHubRules(logging)
yield sh
示例2: sh
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def sh(self):
with moto.mock_kms(), moto.mock_sts():
sh = security_hub_rules.SecurityHubRules(logging)
yield sh
示例3: sh
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def sh(self):
with moto.mock_ec2(), moto.mock_sts():
sh = security_hub_rules.SecurityHubRules(logging)
yield sh
示例4: setup
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def setup(self):
with moto.mock_cloudformation(), moto.mock_dynamodb2(), moto.mock_sts():
setup = lambda_handler.Setup(logging)
yield setup
示例5: moto_sts
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def moto_sts():
with moto.mock_sts():
yield True
示例6: boto3_client
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def boto3_client():
with mock_sts():
yield Boto3Client("123456789", "eu-west-1", "stack-id")
示例7: sts
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def sts(aws_credentials, conn_dict):
with mock_sts():
yield boto3.client("sts", region_name="us-east-1")
示例8: sts
# 需要导入模块: import moto [as 别名]
# 或者: from moto import mock_sts [as 别名]
def sts():
with mock_sts():
yield boto3.client("sts", region_name="us-east-1")