本文整理汇总了Python中awscli.customizations.s3.utils.RequestParamsMapper.map_put_object_params方法的典型用法代码示例。如果您正苦于以下问题:Python RequestParamsMapper.map_put_object_params方法的具体用法?Python RequestParamsMapper.map_put_object_params怎么用?Python RequestParamsMapper.map_put_object_params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类awscli.customizations.s3.utils.RequestParamsMapper
的用法示例。
在下文中一共展示了RequestParamsMapper.map_put_object_params方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _handle_upload
# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_put_object_params [as 别名]
def _handle_upload(self, body):
bucket, key = find_bucket_key(self.dest)
params = {
'Bucket': bucket,
'Key': key,
'Body': body,
}
self._inject_content_type(params)
RequestParamsMapper.map_put_object_params(params, self.parameters)
response_data = self.client.put_object(**params)
示例2: test_put_object
# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_put_object_params [as 别名]
def test_put_object(self):
params = {}
RequestParamsMapper.map_put_object_params(params, self.cli_params)
self.assertEqual(
params,
{'SSECustomerAlgorithm': 'AES256',
'SSECustomerKey': 'my-sse-c-key',
'SSEKMSKeyId': 'my-kms-key',
'ServerSideEncryption': 'AES256'}
)
示例3: test_put_object
# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_put_object_params [as 别名]
def test_put_object(self):
params = {}
RequestParamsMapper.map_put_object_params(params, self.cli_params)
self.assertEqual(
params,
{
"SSECustomerAlgorithm": "AES256",
"SSECustomerKey": "my-sse-c-key",
"SSEKMSKeyId": "my-kms-key",
"ServerSideEncryption": "AES256",
},
)