本文整理匯總了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")