def set_cloudwatch(self, region_code): dimensions = [] if self.role == 'cluster': dimensions.append(CloudWatchDimensionModel({"Name": "DBClusterIdentifier", "Value": self.db_identifier})) elif self.role == 'instance': dimensions.append(CloudWatchDimensionModel({"Name": "DBInstanceIdentifier", "Value": self.db_identifier})) return { "namespace": "AWS/RDS", "dimensions": dimensions, "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/AutoScaling", "dimensions": [ CloudWatchDimensionModel({'Name': 'AutoScalingGroupName', 'Value': self.auto_scaling_group_name})], "region_name": region_code }
def set_cloudwatch(self, region_code='us-east-1'): return { "namespace": "AWS/CloudFront", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'DistributionId', 'Value': self.id }), CloudWatchDimensionModel({ 'Name': 'Region', 'Value': 'Global' }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/DocDB", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'DBClusterIdentifier', 'Value': self.db_cluster_identifier }) ], "region_name": region_code }
def set_cloudwatch(self): return { "namespace": "AWS/S3", "dimensions": [ CloudWatchDimensionModel({ "Name": "BucketName", "Value": self.name }) ], "region_name": self.region_name }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/EBS", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'SnapshotId', 'Value': self.snapshot_id }) ], "region_name": region_code }
def set_cloudwatch(self, region_name='us-east-1'): return { "namespace": "AWS/Route53", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'HostedZoneId', 'Value': self.hosted_zone_id }) ], "region_name": region_name }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/NATGateway", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'NatGatewayId', 'Value': self.nat_gateway_id }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "ContainerInsights", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'ClusterName', 'Value': self.name }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/DX", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'ConnectionId', 'Value': self.connection_id }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/ECS", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'ClusterName', 'Value': self.cluster_name }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/SQS", "dimensions": [ CloudWatchDimensionModel({ "Name": "QueueName", "Value": self.name }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/DX", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'VirtualInterfaceId', 'Value': self.virtual_interface_id }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/Redshift", "dimensions": [ CloudWatchDimensionModel({ "Name": "ClusterIdentifier", "Value": self.cluster_identifier }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/EFS", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'FileSystemId', 'Value': self.file_system_id }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/DynamoDB", "dimensions": [ CloudWatchDimensionModel({ 'Name': 'TableName', 'Value': self.table_name }) ], "region_name": region_code }
def set_cloudwatch(self, region_code): namespace = '' _arn = arnparse(self.load_balancer_arn) dimensions = [ CloudWatchDimensionModel({ 'Name': 'LoadBalancer', 'Value': _arn.resource }) ] if self.type == 'application': namespace = 'AWS/ApplicationELB' elif self.type == 'network': namespace = 'AWS/NetworkELB' return { "namespace": namespace, "dimensions": dimensions, "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/ApiGateway", "dimensions": [CloudWatchDimensionModel({'Name': 'ApiId', 'Value': self.id})], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/SNS", "dimensions": [CloudWatchDimensionModel({'Name': 'TopicName', 'Value': self.name})], "region_name": region_code }
def set_cloudwatch(self, region_code): return { "namespace": "AWS/RDS", "dimensions": [CloudWatchDimensionModel({"Name": "DBInstanceIdentifier", "Value": self.db_instance_identifier})], "region_name": region_code }