当前位置: 首页>>代码示例>>Python>>正文


Python RequestParamsMapper.map_copy_object_params方法代码示例

本文整理汇总了Python中awscli.customizations.s3.utils.RequestParamsMapper.map_copy_object_params方法的典型用法代码示例。如果您正苦于以下问题:Python RequestParamsMapper.map_copy_object_params方法的具体用法?Python RequestParamsMapper.map_copy_object_params怎么用?Python RequestParamsMapper.map_copy_object_params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在awscli.customizations.s3.utils.RequestParamsMapper的用法示例。


在下文中一共展示了RequestParamsMapper.map_copy_object_params方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: copy

# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_copy_object_params [as 别名]
 def copy(self):
     """
     Copies a object in s3 to another location in s3.
     """
     copy_source = self.src
     bucket, key = find_bucket_key(self.dest)
     params = {'Bucket': bucket,
               'CopySource': copy_source, 'Key': key}
     self._inject_content_type(params)
     RequestParamsMapper.map_copy_object_params(params, self.parameters)
     response_data = self.client.copy_object(**params)
开发者ID:mtdowling,项目名称:aws-cli,代码行数:13,代码来源:fileinfo.py

示例2: test_copy_object

# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_copy_object_params [as 别名]
 def test_copy_object(self):
     params = {}
     RequestParamsMapper.map_copy_object_params(params, self.cli_params)
     self.assertEqual(
         params,
         {'CopySourceSSECustomerAlgorithm': 'AES256',
          'CopySourceSSECustomerKey': 'my-sse-c-copy-source-key',
          'SSECustomerAlgorithm': 'AES256',
          'SSECustomerKey': 'my-sse-c-key',
          'SSEKMSKeyId': 'my-kms-key',
          'ServerSideEncryption': 'AES256'}
     )
开发者ID:rnaveiras,项目名称:aws-cli,代码行数:14,代码来源:test_utils.py

示例3: test_copy_object

# 需要导入模块: from awscli.customizations.s3.utils import RequestParamsMapper [as 别名]
# 或者: from awscli.customizations.s3.utils.RequestParamsMapper import map_copy_object_params [as 别名]
 def test_copy_object(self):
     params = {}
     RequestParamsMapper.map_copy_object_params(params, self.cli_params)
     self.assertEqual(
         params,
         {
             "CopySourceSSECustomerAlgorithm": "AES256",
             "CopySourceSSECustomerKey": "my-sse-c-copy-source-key",
             "SSECustomerAlgorithm": "AES256",
             "SSECustomerKey": "my-sse-c-key",
             "SSEKMSKeyId": "my-kms-key",
             "ServerSideEncryption": "AES256",
         },
     )
开发者ID:aws,项目名称:aws-cli,代码行数:16,代码来源:test_utils.py


注:本文中的awscli.customizations.s3.utils.RequestParamsMapper.map_copy_object_params方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。