SearchField.set( name="Retention Hours", key="data.retention_period_hours", data_type="Integer", ), SearchField.set( name="Retention Days", key="data.retention_period_days", data_type="Integer" ), SearchField.set( name="Number of Open Shards", key="instance_size", data_type="Integer", ), SearchField.set( name="Number of Closed Shards", key="data.closed_shards_num", data_type="Integer", ), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(open_shard_total_count_conf)), ChartWidget.set(**get_data_from_yaml(stream_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(stream_count_by_account_conf)), ] ) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({"resource": cst_kds}), ]
SearchField.set(name='Avaiilability Zone', key='data.availability_zones'), SearchField.set(name='Security Group ID', key='data.vpc_security_groups.vpc_security_group_id'), SearchField.set(name='Instance', key='data.instances.db_instance_identifier'), SearchField.set(name='Instance Type', key='data.instances.db_instance_class'), SearchField.set(name='VPC ID', key='data.instances.db_subnet_group.vpc_id'), ], widget=[ CardWidget.set(**get_data_from_yaml(cluster_total_count_conf)), CardWidget.set(**get_data_from_yaml(instance_total_count_conf)), CardWidget.set(**get_data_from_yaml(snapshot_total_count_conf)), ChartWidget.set( **get_data_from_yaml(cluster_count_by_region_widget_conf)), ChartWidget.set( **get_data_from_yaml(cluster_count_by_account_widget_conf)), ChartWidget.set( **get_data_from_yaml(instance_count_by_az_widget_conf)), ChartWidget.set( **get_data_from_yaml(instance_count_by_instance_type_widget_conf)) ]) cst_subnet_group = CloudServiceTypeResource() cst_subnet_group.name = 'SubnetGroup' cst_subnet_group.provider = 'aws' cst_subnet_group.group = 'DocumentDB' cst_subnet_group.labels = ['Database'] cst_subnet_group.service_code = 'AmazonDocDB' cst_subnet_group.tags = {
'is_optional': True }), TextDyField.data_source('Dead Letter Target ARN', 'data.redrive_policy.dead_letter_target_arn', options={ 'is_optional': True }), TextDyField.data_source('Max Recieve Count', 'data.redrive_policy.max_receive_count', options={ 'is_optional': True }) ], search=[ SearchField.set(name='ARN', key='data.arn'), SearchField.set(name='URL', key='data.url'), SearchField.set(name='Maximum Message Size (Bytes)', key='data.maximum_message_size', data_type='integer'), SearchField.set(name='Approximate Number of Messages', key='data.approximate_number_of_messages', data_type='integer'), SearchField.set(name='Last Modified Time', key='data.last_modified_timestamp', data_type='datetime'), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(queue_max_message_total_size_conf)), ChartWidget.set(**get_data_from_yaml(count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(queue_max_message_total_size_by_account_conf)), ] ) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_que}), ]
key='data.hardware.ram_size_in_gb', data_type='float'), SearchField.set(name='Availability Zone', key='data.location.availability_zone'), SearchField.set(name='Public IP', key='data.public_ip_address'), SearchField.set(name='Private IP', key='data.private_ip_address'), SearchField.set(name='Support Code', key='data.support_code'), SearchField.set(name='Is Static IP', key='data.is_static_ip', data_type='Boolean'), SearchField.set(name='Username', key='data.username'), SearchField.set(name='SSH Key name', key='data.ssh_key_name'), ], widget=[ CardWidget.set(**get_data_from_yaml(instance_total_count_conf)), ChartWidget.set(**get_data_from_yaml(instance_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(instance_count_by_region_conf)), ChartWidget.set( **get_data_from_yaml(instance_count_by_blueprint_conf)), ChartWidget.set( **get_data_from_yaml(instance_count_by_bundle_id_conf)), ]) ''' Disk ''' disk_total_count_conf = os.path.join(current_dir, 'widget/disk_total_count.yaml') disk_total_size_conf = os.path.join(current_dir, 'widget/disk_total_size.yaml') disk_size_by_account_conf = os.path.join( current_dir, 'widget/disk_total_size_by_account.yaml') disk_size_by_region_conf = os.path.join(
}, }), SearchField.set(name='Keyspaces Created Time ', key='data.cassandra_credential.create_date', data_type='datetime'), SearchField.set(name='Creation Time', key='data.create_date', data_type='datetime'), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(access_key_total_count_conf)), CardWidget.set(**get_data_from_yaml(mfa_used_status_conf)), CardWidget.set( **get_data_from_yaml(access_key_age_30_total_count_conf)), ChartWidget.set(**get_data_from_yaml(access_key_age_ratio_conf)) ]) """ ROLE """ cst_role = CloudServiceTypeResource() cst_role.name = 'Role' cst_role.provider = 'aws' cst_role.group = 'IAM' cst_role.labels = ['Security'] cst_role.tags = { 'spaceone:icon': 'https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/aws/AWS-Identity-and-Access-Management_IAM.svg', }
key='data.ip_permissions.port_display'), SearchField.set(name='Inbound Source', key='data.ip_permissions.source_display'), SearchField.set(name='Outbound Protocol', key='data.ip_permissions_egress.protocol_display'), SearchField.set(name='Outbound Port Rage', key='data.ip_permissions_egress.port_display'), SearchField.set(name='Outbound Source', key='data.ip_permissions_egress.source_display'), ], widget=[ CardWidget.set(**get_data_from_yaml(sg_total_count_conf)), CardWidget.set(**get_data_from_yaml(inbound_rule_total_count_conf)), CardWidget.set(**get_data_from_yaml(outbound_rule_total_count_conf)), CardWidget.set(**get_data_from_yaml(instance_total_count_conf)), ChartWidget.set(**get_data_from_yaml(sg_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(sg_count_by_account_conf)) ]) """ AMI """ ami_total_count_conf = os.path.join(current_dir, 'widget/ami_total_count.yaml') ami_count_by_region_conf = os.path.join(current_dir, 'widget/ami_count_by_region.yaml') ami_count_by_account_conf = os.path.join(current_dir, 'widget/ami_count_by_account.yaml') cst_ami = CloudServiceTypeResource() cst_ami.name = 'AMI' cst_ami.provider = 'aws' cst_ami.group = 'EC2'
}), ListDyField.data_source('Record Set TTLs', 'data.record_sets', options={ 'sub_key': 'ttl', 'delimiter': '<br>', 'is_optional': True }) ], search=[ SearchField.set(name='ARN', key='data.arn'), SearchField.set(name='Type', key='instance_type'), SearchField.set(name='Host Zone ID', key='data.hosted_zone_id'), SearchField.set(name='Record Set Count', key='data.resource_record_set_count', data_type='integer'), SearchField.set(name='Record Name', key='data.record_sets.name') ], widget=[ CardWidget.set(**get_data_from_yaml(hosted_zone_total_count_conf)), CardWidget.set(**get_data_from_yaml(record_set_total_count_conf)), ChartWidget.set( **get_data_from_yaml(hosted_zone_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(hosted_zone_count_by_type_conf)), ChartWidget.set(**get_data_from_yaml(record_set_by_account_conf)) ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_hostedzone}), ]
'REPLICA': { 'label': 'REPLICA' }, 'DAEMON': { 'label': 'DAEMON' }, }), SearchField.set(name='Task Name', key='data.tasks.task'), SearchField.set(name='Task Definition', key='data.tasks.task_definition'), SearchField.set(name='Task Definition ARN', key='data.tasks.task_definition_arn'), SearchField.set(name='Container Instance ID', key='data.container_instances.ec2_instance_id'), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(active_service_total_count_conf)), CardWidget.set(**get_data_from_yaml(running_task_total_count_conf)), ChartWidget.set(**get_data_from_yaml(cluster_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(cluster_count_by_account_conf)), ChartWidget.set( **get_data_from_yaml(active_service_count_by_cluster_conf)), ChartWidget.set( **get_data_from_yaml(running_task_count_by_cluster_conf)) ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_ecs_cluster}), ]
'label': 'Provisioned' }, }), SearchField.set(name='Mount Target ID', key='data.mount_targets.mount_target_id'), SearchField.set(name='Mount Target Counts', key='data.number_of_mount_targets', data_type='integer'), SearchField.set(name='IP Address', key='data.mount_targets.ip_address'), SearchField.set(name='Availability Zone', key='data.mount_targets.availability_zone_name'), SearchField.set(name='Subnet ID', key='data.mount_targets.subnet_id'), SearchField.set(name='Security Group ID', key='data.mount_targets.security_groups') ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(filesystem_total_size_conf)), CardWidget.set(**get_data_from_yaml(mount_target_total_count_conf)), ChartWidget.set(**get_data_from_yaml(filesystem_count_by_region_conf)), ChartWidget.set( **get_data_from_yaml(filesystem_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(mount_target_count_by_az_conf)), ChartWidget.set(**get_data_from_yaml(size_by_filesystem_conf)), ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_filesystem}), ]
key='data.cluster.reader_endpoint'), SearchField.set(name='Cluster Custom Endpoint', key='data.cluster.custom_endpoints'), SearchField.set(name='Cluster Port', key='data.cluster.port', data_type='integer'), SearchField.set(name='Instance Endpoint', key='data.instance.endpoint.address'), SearchField.set(name='Instance Port', key='data.instance.endpoint.port', data_type='integer'), SearchField.set(name='AWS Account ID', key='data.account_id'), ], widget=[ CardWidget.set(**get_data_from_yaml(database_total_count_conf)), ChartWidget.set(**get_data_from_yaml(database_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(database_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(database_count_by_engine_conf)) ]) ''' Instance ''' instance_total_count_conf = os.path.join(current_dir, 'widget/instance_total_count.yaml') instance_storage_total_size_conf = os.path.join( current_dir, 'widget/instance_storage_total_size.yaml') instance_count_by_region_conf = os.path.join( current_dir, 'widget/instance_count_by_region.yaml') instance_count_by_account_conf = os.path.join( current_dir, 'widget/instance_count_by_account.yaml') instance_storage_total_size_by_account_conf = os.path.join(
'icon': { 'color': 'gray.400' } } }), SearchField.set(name='Location', key='data.location'), SearchField.set(name='Vlan', key='data.vlan'), SearchField.set(name='Partner Name', key='data.partner_name'), SearchField.set(name='Lag ID', key='data.lag_id'), SearchField.set(name='AWS Device', key='data.aws_device'), SearchField.set(name='Provider Name', key='data.provider_name') ], widget=[ CardWidget.set(**get_data_from_yaml(connection_total_count_conf)), # CardWidget.set(**get_data_from_yaml(connection_bandwidth_total_sum_conf)), ChartWidget.set( **get_data_from_yaml(connection_count_by_region_widget_conf)), ChartWidget.set( **get_data_from_yaml(connection_count_by_account_widget_conf)) ]) cst_connection._metadata = cst_connection_meta ''' DIRECT CONNECT GATEWAY ''' dcgw_total_count_widget_conf = os.path.join(current_dir, 'widget/dcgw_total_count.yaml') dcgw_count_by_region_widget_conf = os.path.join( current_dir, 'widget/dcgw_count_by_region.yaml') dcgw_count_by_account_widget_conf = os.path.join( current_dir, 'widget/dcgw_count_by_account.yaml') cst_dc_gw = CloudServiceTypeResource()
options={'is_optional': True}), TextDyField.data_source('KMS ID', 'data.kms.kms_id', options={'is_optional': True}), TextDyField.data_source('KMS ARN', 'data.kms.arn', options={'is_optional': True}), TextDyField.data_source('KMS Alias', 'data.kms.alias', options={'is_optional': True}) ], search=[ SearchField.set(name='Topic ARN', key='data.topic_arn'), SearchField.set(name='Subscription ARN', key='data.subscriptions.subscription_arn'), SearchField.set(name='Endpoint', key='data.subscriptions.endpoint'), SearchField.set(name='Protocol', key='data.subscriptions.protocol') ], widget=[ CardWidget.set(**get_data_from_yaml(topic_total_count_conf)), CardWidget.set(**get_data_from_yaml(subscription_total_count_conf)), ChartWidget.set(**get_data_from_yaml(topic_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(topic_count_by_account_conf)), ChartWidget.set( **get_data_from_yaml(subscription_count_by_account_conf)), ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_topic}), ]
data_type='integer'), SearchField.set(name='Timeout', key='data.time_out', data_type='integer'), SearchField.set(name='VPC ID', key='data.vpc_config.vpc.id'), SearchField.set(name='VPC Name', key='data.vpc_config.vpc.name'), SearchField.set(name='Subnet Id', key='data.vpc_config.subnets.id'), SearchField.set(name='Last Modified Time', key='data.last_modified', data_type='datetime'), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(code_total_size_conf)), CardWidget.set(**get_data_from_yaml(memory_total_size_conf)), ChartWidget.set(**get_data_from_yaml(count_by_runtime_conf)), ChartWidget.set(**get_data_from_yaml(count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(code_total_size_by_account_conf)), ChartWidget.set( **get_data_from_yaml(memory_total_size_by_account_conf)), ]) cst_layer = CloudServiceTypeResource() cst_layer.name = 'Layer' cst_layer.provider = 'aws' cst_layer.group = 'Lambda' cst_layer.labels = ['Compute'] cst_layer.service_code = 'AWSLambda' cst_layer.tags = { 'spaceone:icon':
'data.allocation_id', options={'is_optional': True}) ], search=[ SearchField.set(name='IP Address', key='data.public_ip'), SearchField.set(name='Associated Instance ID', key='data.instance_id'), SearchField.set(name='Public DNS', key='data.public_dns'), SearchField.set(name='Private IP', key='data.private_ip_address'), SearchField.set(name='NAT Gateway ID', key='data.nat_gateway_id'), SearchField.set(name='Scope', key='data.domain', enums={ 'vpc': { 'label': 'VPC' }, 'standard': { 'label': 'Standard' }, }) ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), ChartWidget.set(**get_data_from_yaml(count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(use_count_by_status_conf)) ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_eip}), ]
'data.repository_arn', options={'is_optional': True}), TextDyField.data_source('Image Tag Mutability ', 'data.image_tag_mutability', options={'is_optional': True}), TextDyField.data_source( 'Image Scanning on Push ', 'data.image_scanning_configuration.scan_on_push', options={'is_optional': True}) ], search=[ SearchField.set(name='Repository ID', key='data.registry_id'), SearchField.set(name='ARN', key='data.repository_arn'), SearchField.set(name='URI', key='data.repository_uri'), SearchField.set(name='Image URI', key='data.images.image_uri') ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_conf)), CardWidget.set(**get_data_from_yaml(image_total_count_conf)), CardWidget.set(**get_data_from_yaml(image_total_size_conf)), ChartWidget.set(**get_data_from_yaml(repository_count_by_region_conf)), ChartWidget.set( **get_data_from_yaml(repository_count_by_account_conf)), ChartWidget.set( **get_data_from_yaml(image_total_size_by_repository_conf)), ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_ecr_repo}), ]
enums={ 'gp2': {'label': 'General Purpose SSD (gp2)'}, 'gp3': {'label': 'General Purpose SSD (gp3)'}, 'io1': {'label': 'Provisioned IOPS SSD (io1)'}, 'sc1': {'label': 'Cold HDD (sc1)'}, 'st1': {'label': 'Throughput Optimized HDD (st1)'}, 'standard': {'label': 'Magnetic (standard)'}, }), SearchField.set(name='Availability Zone', key='data.availability_zone'), SearchField.set(name='IOPS', key='data.iops', data_type='integer'), SearchField.set(name='Attached Instance ID', key='data.attachments.instance_id'), ], widget=[ CardWidget.set(**get_data_from_yaml(vol_total_count_conf)), CardWidget.set(**get_data_from_yaml(vol_total_size_conf)), ChartWidget.set(**get_data_from_yaml(vol_total_size_by_region_conf)), ChartWidget.set(**get_data_from_yaml(vol_total_size_by_account_conf)), ChartWidget.set(**get_data_from_yaml(vol_total_size_by_az_conf)), ChartWidget.set(**get_data_from_yaml(vol_total_size_by_type_conf)), ChartWidget.set(**get_data_from_yaml(vol_total_size_by_state_conf)) ] ) """ SNAPSHOT """ snapshot_total_count_conf = os.path.join(current_dir, 'widget/snapshot_total_count.yaml') snapshot_total_size_conf = os.path.join(current_dir, 'widget/snapshot_total_size.yaml') snapshot_total_count_by_region_conf = os.path.join(current_dir, 'widget/snapshot_total_count_by_region.yaml') snapshot_total_count_by_account_conf = os.path.join(current_dir, 'widget/snapshot_total_count_by_account.yaml') snapshot_total_size_by_region_conf = os.path.join(current_dir, 'widget/snapshot_total_size_by_region.yaml')
'delimiter': '<br>', 'is_optional': True }) ], search=[ SearchField.set(name='ARN', key='data.arn'), SearchField.set(name='Object Counts', key='data.object_count', data_type='integer'), SearchField.set(name='Object Total Size (Bytes)', key='instance_size', data_type='integer') ], widget=[ CardWidget.set(**get_data_from_yaml(bucket_total_count_conf)), CardWidget.set(**get_data_from_yaml(object_total_count_conf)), CardWidget.set(**get_data_from_yaml(object_total_size_conf)), ChartWidget.set(**get_data_from_yaml(bucket_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(object_count_by_region_conf)), ChartWidget.set( **get_data_from_yaml(object_total_size_by_region_conf)), ChartWidget.set(**get_data_from_yaml(bucket_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(object_count_by_account_conf)), ChartWidget.set( **get_data_from_yaml(object_total_size_by_account_conf)), ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_bucket}), ]
data_type='integer'), SearchField.set(name='Security Group ID', key='data.vpc_security_groups.vpc_security_group_id'), SearchField.set( name='Parameter Group Name', key='data.cluster_parameter_groups.parameter_group_name'), SearchField.set(name='Subnet Group ID', key='data.cluster_subnet_group_name'), SearchField.set(name='VPC ID', key='data.vpc_id'), SearchField.set(name='Availability Zone', key='data.availability_zone'), SearchField.set(name='Node Counts', key='data.number_of_nodes', data_type='integer'), ], widget=[ CardWidget.set(**get_data_from_yaml(cluster_total_count_conf)), CardWidget.set(**get_data_from_yaml(node_total_count_conf)), CardWidget.set(**get_data_from_yaml(snapshot_total_count_conf)), ChartWidget.set(**get_data_from_yaml(cluster_count_by_region_conf)), ChartWidget.set(**get_data_from_yaml(cluster_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(node_count_by_account_conf)), ChartWidget.set(**get_data_from_yaml(snapshot_count_by_account_conf)), ChartWidget.set( **get_data_from_yaml(snapshot_total_size_by_account_conf)), ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_redshift_cluster}), ]
'data.http_version', options={'is_optional': True}) ], search=[ SearchField.set(name='Distribution ID', key='data.id'), SearchField.set(name='ARN', key='data.arn'), SearchField.set(name='Status', key='data.status', enums={ 'Deployed': { 'label': 'Deployed', 'icon': { 'color': 'green.500' } } }), SearchField.set(name='CNAME', key='data.alias_icp_recordals.cname'), ], widget=[ CardWidget.set(**get_data_from_yaml(total_count_widget_conf)), CardWidget.set(**get_data_from_yaml(origin_total_widget_conf)), ChartWidget.set(**get_data_from_yaml(count_by_account_widget_conf)), ChartWidget.set( **get_data_from_yaml(count_by_distribution_status_widget_conf)), ChartWidget.set(**get_data_from_yaml(count_by_region_widget_conf)) ]) CLOUD_SERVICE_TYPES = [ CloudServiceTypeResponse({'resource': cst_distribution}), ]