コード例 #1
0
 def test_update(self):
     client = boto3.client('kinesis', region_name=aws_region)
     current_stream = {
         'OpenShardsCount': 5,
         'ClosedShardsCount': 0,
         'ShardsCount': 1,
         'HasMoreShards': True,
         'RetentionPeriodHours': 24,
         'StreamName': 'test',
         'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test',
         'StreamStatus': 'ACTIVE',
         'EncryptionType': 'NONE'
     }
     tags = {
         'env': 'development',
         'service': 'web'
     }
     success, changed, err_msg = (
         kinesis_stream.update(
             client, current_stream, 'test', number_of_shards=2, retention_period=48,
             tags=tags, check_mode=True
         )
     )
     self.assertTrue(success)
     self.assertTrue(changed)
     self.assertEqual(err_msg, 'Kinesis Stream test updated successfully.')
コード例 #2
0
 def test_update(self):
     client = boto3.client('kinesis', region_name=aws_region)
     current_stream = {
         'OpenShardsCount': 5,
         'ClosedShardsCount': 0,
         'ShardsCount': 1,
         'HasMoreShards': True,
         'RetentionPeriodHours': 24,
         'StreamName': 'test',
         'StreamARN': 'arn:aws:kinesis:east-side:123456789:stream/test',
         'StreamStatus': 'ACTIVE'
     }
     tags = {
         'env': 'development',
         'service': 'web'
     }
     success, changed, err_msg = (
         kinesis_stream.update(
             client, current_stream, 'test', number_of_shards=2, retention_period=48,
             tags=tags, check_mode=True
         )
     )
     self.assertTrue(success)
     self.assertTrue(changed)
     self.assertEqual(err_msg, 'Kinesis Stream test updated successfully.')