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


Python CloudWatchConnection.build_dimension_param方法代码示例

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


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

示例1: test_build_get_params_multiple_parameter_dimension1

# 需要导入模块: from boto.ec2.cloudwatch import CloudWatchConnection [as 别名]
# 或者: from boto.ec2.cloudwatch.CloudWatchConnection import build_dimension_param [as 别名]
 def test_build_get_params_multiple_parameter_dimension1(self):
     self.maxDiff = None
     c = CloudWatchConnection()
     params = {}
     dimensions = OrderedDict((("D1", "V"), ("D2", "W")))
     c.build_dimension_param(dimensions, params)
     expected_params = {
         'Dimensions.member.1.Name': 'D1',
         'Dimensions.member.1.Value': 'V',
         'Dimensions.member.2.Name': 'D2',
         'Dimensions.member.2.Value': 'W',
     }
     self.assertEqual(params, expected_params)
开发者ID:10sr,项目名称:hue,代码行数:15,代码来源:test_connection.py

示例2: test_build_get_params_multiple_parameter_dimension2

# 需要导入模块: from boto.ec2.cloudwatch import CloudWatchConnection [as 别名]
# 或者: from boto.ec2.cloudwatch.CloudWatchConnection import build_dimension_param [as 别名]
 def test_build_get_params_multiple_parameter_dimension2(self):
     from collections import OrderedDict
     self.maxDiff = None
     c = CloudWatchConnection()
     params = {}
     dimensions = OrderedDict((("D1", ["V1", "V2"]), ("D2", "W"), ("D3", None)))
     c.build_dimension_param(dimensions, params)
     expected_params = {
         'Dimensions.member.1.Name': 'D1',
         'Dimensions.member.1.Value': 'V1',
         'Dimensions.member.2.Name': 'D1',
         'Dimensions.member.2.Value': 'V2',
         'Dimensions.member.3.Name': 'D2',
         'Dimensions.member.3.Value': 'W',
         'Dimensions.member.4.Name': 'D3',
         }
     self.assertEqual(params, expected_params)
开发者ID:0t3dWCE,项目名称:boto,代码行数:19,代码来源:test_connection.py


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