TextDyField.data_source('Association ID', 'data.association_id'), TextDyField.data_source('Network Interface ID', 'data.network_interface_id'), BadgeDyField.data_source('Address Pool', 'data.public_ipv4_pool'), EnumDyField.data_source('Scope', 'data.domain', default_outline_badge=['vpc', 'standard']), TextDyField.data_source('Network Interface Owner Account ID', 'data.network_interface_owner_id'), TextDyField.data_source('Customer owned IP Address', 'data.customer_owned_ip'), TextDyField.data_source('Customer owned IP Address Pool', 'data.customer_owned_ipv4_pool'), ]) eip_tags = SimpleTableDynamicLayout.set_tags() metadata = CloudServiceMeta.set_layouts(layouts=[base, eip_tags]) class EC2Resource(CloudServiceResource): cloud_service_group = StringType(default='EIP') class EIPResource(EC2Resource): cloud_service_type = StringType(default='EIP') data = ModelType(ElasticIPAddress) _metadata = ModelType(CloudServiceMeta, default=metadata, serialized_name='metadata')
EnumDyField.data_source('IPv6 Support', 'data.is_ipv6_enabled', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), DateTimeDyField.data_source('Last Modified', 'data.last_modified_time') ]) alias_icp_recordals = SimpleTableDynamicLayout.set_fields( 'Alias ICP Recordals', 'data.alias_icp_recordals', fields=[ TextDyField.data_source('CNAME', 'cname'), EnumDyField.data_source('Status', 'icp_recordal_status', default_state={ 'safe': ['APPROVED'], 'alert': ['SUSPENDED'], 'warning': ['PENDING'] }), ]) origin = TableDynamicLayout.set_fields( 'Origins', 'data.origins.items', fields=[ TextDyField.data_source('Id', 'id'), TextDyField.data_source('DomainName', 'domain_name'), TextDyField.data_source('OriginPath', 'origin_path'), TextDyField.data_source('Origin Shield Region',
sign_in_credentials = ItemDynamicLayout.set_fields('Sign-in Credentials', root_path='data.sign_in_credential', fields=[ ListDyField.data_source('Summary', 'summary'), EnumDyField.data_source('Console Password', 'console_password', default_badge={ 'indigo.500': ['Enabled'], 'coral.600': ['Disabled'], }), TextDyField.data_source('Assigned MFA device', 'assigned_mfa_device'), ]) access_key = SimpleTableDynamicLayout.set_fields('Access Keys', root_path='data.access_key', fields=[ TextDyField.data_source('Access Key ID', 'key_id'), DateTimeDyField.data_source('Created At', 'create_date'), TextDyField.data_source('Last Used', 'last_update_date_display'), ]) ssh_codecommit = SimpleTableDynamicLayout.set_fields('SSH Keys for AWS CodeCommit', root_path='data.ssh_public_key' , fields=[ TextDyField.data_source('SSH Key ID', 'key_id'), DateTimeDyField.data_source('Uploaded At', 'upload_date'), EnumDyField.data_source('Status', 'status', default_badge={'indigo.500': ['Active'], 'coral.600': ['Inactive']}), ]) https_codecommit = SimpleTableDynamicLayout.set_fields('HTTPS Git Credentials for AWS CodeCommit', root_path='data.code_commit_credential', fields=[ TextDyField.data_source('User Name', 'service_user_name'),
fields=[ TextDyField.data_source('Automated Backup (Period Day)', 'data.instance.backup_retention_period'), EnumDyField.data_source('Copy tags to snapshots', 'data.instance.copy_tags_to_snapshot', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), DateTimeDyField.data_source('Latest Restore Time', 'data.instance.latest_restorable_time'), TextDyField.data_source('Backup Window', 'data.instance.preferred_backup_window'), ]) instance_tags = SimpleTableDynamicLayout.set_tags() instance_metadata = CloudServiceMeta.set_layouts(layouts=[ summary, instance_conn, instance_sec, instance_conf, instance_storage, instance_maintenance, instance_backup, instance_tags ]) cluster_endpoint = ItemDynamicLayout.set_fields( 'Endpoints', fields=[ TextDyField.data_source('Endpoint', 'data.cluster.endpoint'), TextDyField.data_source('Port', 'data.cluster.port'), TextDyField.data_source('Reader Endpoint', 'data.cluster.reader_endpoint'), ]) cluster_conf = ItemDynamicLayout.set_fields(
fields=[ EnumDyField.data_source('Enabled', 'enabled', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'], }), TextDyField.data_source('Bucket', 'bucket'), TextDyField.data_source('Prefix', 'prefix'), ]) cluster_logging_meta = ListDynamicLayout.set_layouts('Cluster Logging', [cluster_broker_cloudwatchlogs, cluster_broker_firehose, cluster_broker_s3]) cluster_tag = SimpleTableDynamicLayout.set_fields('Tags', root_path='data.tags', fields=[ TextDyField.data_source('Key', 'key'), TextDyField.data_source('Value', 'value'), ]) cluster_operations = \ TableDynamicLayout.set_fields('Operations', root_path='data.cluster_operation_info', fields=[ TextDyField.data_source('Operation ARN', 'operation_arn'), TextDyField.data_source('Cluster ARN', 'cluster_arn'), TextDyField.data_source('Operation Type', 'operation_type'), TextDyField.data_source('Error Code', 'error_info.error_code'), TextDyField.data_source('Error', 'error_info.error_string'), DateTimeDyField.data_source('Creation Time', 'Creation Time'), DateTimeDyField.data_source('End Time', 'end_time'), ]) cluster_metadata = CloudServiceMeta.set_layouts([ cluster_base,
TextDyField.data_source( 'Association route table ID', 'data.transit_gateway.options.association_default_route_table_id'), EnumDyField.data_source( 'Default propagation route table', 'data.transit_gateway.options.default_route_table_propagation', default_badge={ 'indigo.500': ['enable'], 'coral.600': ['disable'] }), TextDyField.data_source( 'Propagation route table ID', 'data.transit_gateway.options.propagation_default_route_table_id'), ]) vpc_tags = SimpleTableDynamicLayout.set_tags() vpc_metadata = CloudServiceMeta.set_layouts(layouts=[ vpc, vpc_subnet, vpc_route, vpc_igw, vpc_natgw, vpc_endpoints, vpc_peercon, vpc_egress_gw, vpn_gw, vpc_transit_gw, vpc_tags ]) # SUBNET subnet = ItemDynamicLayout.set_fields( 'Subnet', fields=[ TextDyField.data_source('Subnet ID', 'data.subnet_id'), EnumDyField.data_source('State', 'data.state', default_state={ 'safe': ['available'], 'warning': ['pending']
TextDyField.data_source('RAM Disk ID', 'data.ramdisk_id'), EnumDyField.data_source('EBS Optimized', 'data.ebs_optimized', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), DateTimeDyField.data_source('Creation Time', 'data.created_time'), ]) # TAB - BASE - Block Devices lc_meta_base_bd = SimpleTableDynamicLayout.set_fields('Block Devices', 'data.block_device_mappings', fields=[ TextDyField.data_source('Device Name', 'device_name'), EnumDyField.data_source('Type', 'ebs.volume_type', default_outline_badge=['standard', 'io1', 'gp2', 'gp3', 'st1', 'sc1']), SizeField.data_source('Size', 'ebs.volume_size', options={ 'source_unit': 'GB', 'display_unit': 'GB' }), TextDyField.data_source('IOPS', 'ebs.iops'), EnumDyField.data_source('Delete on Termination', 'data.delete_on_termination', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), EnumDyField.data_source('Encrypted', 'data.encrypted', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), ]) lc_meta = CloudServiceMeta.set_layouts([lc_meta_base_lc, lc_meta_base_bd, ]) ''' LAUNCH TEMPLATE ''' # TAB - BASE - Launch Template
EnumDyField.data_source('Status', 'status', default_state={ 'safe': ['available'], }), TextDyField.data_source('Port', 'port'), TextDyField.data_source('Endpoint', 'endpoint'), EnumDyField.data_source('Parameter Group Status', 'parameter_group_status', default_state={ 'safe': ['in-sync'], }), DateTimeDyField.data_source('Created On', 'created_on') ]) memcached_tags = SimpleTableDynamicLayout.set_tags() memcached_metadata = CloudServiceMeta.set_layouts( layouts=[memcached_base, memcached_node, memcached_tags]) ''' Redis ''' redis_base = ItemDynamicLayout.set_fields( 'Description', fields=[ TextDyField.data_source('Name', 'data.replication_group_id'), TextDyField.data_source('ARN', 'data.arn'), TextDyField.data_source('Mode', 'data.mode'), EnumDyField.data_source( 'Status', 'data.status', default_state={
'warning': ['ordering', 'pending', 'deleting'], 'disable': ['unknown', 'deleted'] }), TextDyField.data_source('Region', 'data.region'), TextDyField.data_source('Location', 'data.location'), TextDyField.data_source('Bandwidth', 'data.bandwidth'), TextDyField.data_source('Vlan', 'data.vlan'), TextDyField.data_source('Partner Name', 'data.partner_name'), TextDyField.data_source('Lag ID', 'data.lag_id'), TextDyField.data_source('AWS Device', 'data.aws_device'), TextDyField.data_source('Provider name', 'data.provider_name'), TextDyField.data_source('Owner Account', 'data.owner_account'), ]) connection_tags = SimpleTableDynamicLayout.set_tags() connection_metadata = CloudServiceMeta.set_layouts( layouts=[connection, connection_tags]) dcgw = ItemDynamicLayout.set_fields( 'Direct Connect Gateway', fields=[ TextDyField.data_source('ID', 'data.direct_connect_gateway_id'), TextDyField.data_source('Name', 'data.direct_connect_gateway_name'), EnumDyField.data_source('State', 'data.direct_connect_gateway_state', default_state={ 'safe': ['available'], 'disable': ['deleted'], 'warning': ['pending', 'deleting'] }),
cluster_update = TableDynamicLayout.set_fields('Updates', 'data.updates', fields=[ TextDyField.data_source('Update ID', 'id'), EnumDyField.data_source('Status', 'status', default_state={ 'safe': ['Successful'], 'warning': ['InProgress'], 'alert': ['Failed'], 'disable': ['Cancelled'] }), TextDyField.data_source('Type', 'type'), DateTimeDyField.data_source('Submission Time', 'created_at'), ListDyField.data_source('Error', 'errors.error_code', options={ 'delimiter': '<br>' }) ]) cluster_tags = SimpleTableDynamicLayout.set_tags() cluster_metadata = CloudServiceMeta.set_layouts( layouts=[cluster_base, cluster_node_groups, cluster_logging, cluster_tags]) node_group_base = ItemDynamicLayout.set_fields('Node Group', fields=[ TextDyField.data_source('Node Group Name', 'data.nodegroup_name'), TextDyField.data_source('Node Group ARN', 'data.nodegroup_arn'), EnumDyField.data_source('Status', 'data.status', default_state={ 'safe': ['ACTIVE'], 'warning': ['CREATING', 'UPDATING', 'DELETING'], 'alert': ['CREATE_FAILED', 'DELETE_FAILED', 'DEGRADED'], }), TextDyField.data_source('EKS Cluster Name', 'data.cluster_name'), TextDyField.data_source('EKS Cluster ARN', 'data.cluster_arn'), TextDyField.data_source('Version', 'data.version'), TextDyField.data_source('Release Version', 'data.release_version'),
'indigo.500': ['true'], 'coral.600': ['false'] }), ListDyField.data_source('Attachment information', 'data.attachments', default_badge={ 'type': 'outline', 'sub_key': 'instance_id', }), TextDyField.data_source('KMS Key ID', 'data.kms_key_id'), TextDyField.data_source('KMS Key ARN', 'data.kms_key_arn'), TextDyField.data_source('IOPS', 'data.iops'), EnumDyField.data_source('Multi-Attach Enabled', 'data.multi_attach_enabled', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }), DateTimeDyField.data_source('Created', 'data.create_time'), ]) vol_tags = SimpleTableDynamicLayout.set_tags() vol_metadata = CloudServiceMeta.set_layouts(layouts=[vol_base, vol_tags]) # SNAPSHOT ss_base = ItemDynamicLayout.set_fields('Snapshots', fields=[ TextDyField.data_source('Snapshot ID', 'data.snapshot_id'), TextDyField.data_source('ARN', 'data.arn'), EnumDyField.data_source('Status', 'data.state', default_state={ 'safe': ['completed'], 'warning': ['pending'], 'alert': ['error'] }), TextDyField.data_source('Description', 'data.description'), TextDyField.data_source('Progress', 'data.progress'), SizeField.data_source('Size', 'data.volume_size', options={
fields=[ TextDyField.data_source('VPC Id', 'data.vpc_config.vpc_id'), ListDyField.data_source('Subnet IDs', 'data.vpc_config.subnet_ids', options={'delimiter': '<br>'}), ListDyField.data_source('Security Group IDs', 'data.vpc_config.security_group_ids', options={ 'delimiter': '<br>', }) ]) function_env = SimpleTableDynamicLayout.set_fields( 'Environment Variables', 'data.environment.variables', fields=[ TextDyField.data_source('Key', 'key'), TextDyField.data_source('Value', 'value'), ]) function_layers = TableDynamicLayout.set_fields( 'Layers', 'data.layers', fields=[ TextDyField.data_source('ARN', 'arn'), TextDyField.data_source('Name', 'name'), TextDyField.data_source('Code Size', 'code_size'), ]) function_metadata = CloudServiceMeta.set_layouts( layouts=[function, function_vpc, function_env, function_layers])
'subnets', options={ 'sub_key': 'subnet_identifier', }) ]) cluster_parameter = TableDynamicLayout.set_fields( 'Parameters', 'data.parameter_group.parameters', fields=[ TextDyField.data_source('Name', 'parameter_name'), TextDyField.data_source('Value', 'parameter_value'), TextDyField.data_source('Description', 'description'), ]) cluster_tags = SimpleTableDynamicLayout.set_tags() cluster_metadata = CloudServiceMeta.set_layouts(layouts=[ meta_base, cluster_sg, instances, snapshots, cluster_subnet_groups, cluster_parameter, cluster_tags ]) # SUBNET GROUP subnet_group_base = ItemDynamicLayout.set_fields( 'Subnet Groups', fields=[ TextDyField.data_source('Name', 'data.db_subnet_group_name'), TextDyField.data_source('ARN', 'data.db_subnet_group_arn'), EnumDyField.data_source('Status', 'data.subnet_group_status', default_state={'safe': ['Complete']}), TextDyField.data_source('Description',
instance_networking = TableDynamicLayout.set_fields( 'Networking', root_path='data.networking', fields=[ TextDyField.data_source('Monthly Transfer', 'monthly_transfer.gb_per_month_allocated'), ListDyField.data_source('Ports', 'ports', default_badge={ 'type': 'outline', 'sub_key': 'common_name' }) ]) instance_tags = SimpleTableDynamicLayout.set_tags() instance_metadata = CloudServiceMeta.set_layouts(layouts=[ instance, instance_addon, instance_hardware, instance_networking, instance_tags ]) class InstanceResource(LightsailResource): cloud_service_type = StringType(default='Instance') data = ModelType(Instance) _metadata = ModelType(CloudServiceMeta, default=instance_metadata, serialized_name='metadata')
insight_table = ItemDynamicLayout.set_fields( 'Insight Selectors', fields=[ TextDyField.data_source('Insight Events', 'data.insight_selectors.insight_type') ]) event_selector_table = SimpleTableDynamicLayout.set_fields( 'Event Selectors', 'data.event_selectors', fields=[ EnumDyField.data_source( 'Read/Write Type', 'read_write_type', default_outline_badge=['ReadOnly', 'WriteOnly', 'All']), EnumDyField.data_source('Include Management Events', 'include_management_events', default_badge={ 'indigo.500': ['true'], 'coral.600': ['false'] }) ]) tags = SimpleTableDynamicLayout.set_tags() metadata = CloudServiceMeta.set_layouts( [meta_base, insight_table, event_selector_table, tags]) class CloudTrailResource(CloudServiceResource): cloud_service_group = StringType(default='CloudTrail')