in monitor/app.py [0:0]
def put_dxgwstate ( iid, state ):
response = cwclient.put_metric_data(
Namespace='AWSx/DirectConnect',
MetricData=[
{
'MetricName': 'DirectConnectGatewayState',
'Dimensions': [
{
'Name': 'DirectConnectGatewayId',
'Value': iid
},
],
'Value': state,
'Unit': 'None'
},
],
)