# -*- coding: utf-8 -*-
# Copyright (c) 2017 CloudZero - ALL RIGHTS RESERVED - PROPRIETARY AND CONFIDENTIAL
# Unauthorized copying of this file and/or project, via any medium is strictly prohibited.
# Direct all questions to legal@cloudzero.com

"""
Contains sets of services that we know how to support in CZRNs and CZRELs.

We can't use boto3 to reliably give us a list of all the service type strings without extra work.
The set of strings that can appear in ARNs is different than what can be used with the boto API,
however there is significant overlap.  For now, we will maintain this list by hand because there's
at least *some* work that we must do in order to support new services that AWS launches.
"""

SERVICE_TRANSFORMS = {
    'execute-api': 'apigateway',  # execute-api service type is actually API Gateway
    'r53resolver': 'route53resolver'  # variant form of route53resolver that's observed in billing data
}

SERVICE_TYPES_IN_ARNS = {
    'a4b',
    'acm-pca',
    'acm',
    'airflow',
    'amplify',
    'aoss',
    'apigateway',
    'appstream',
    'appsync',
    'aps',
    'artifact',
    'athena',
    'autoscaling',
    'backup',
    'batch',
    'bedrock',
    'cassandra',
    'client-vpn',
    'cloud9',
    'clouddirectory',
    'cloudformation',
    'cloudfront',
    'cloudhsm',
    'cloudsearch',
    'cloudtrail',
    'cloudwatch',
    'codeartifact',
    'codebuild',
    'codecommit',
    'codedeploy',
    'codeguru-profiler',
    'codepipeline',
    'codestar',
    'cognito-identity',
    'cognito-idp',
    'cognito-sync',
    'comprehend',
    'config',
    'connect',
    'databrew',
    'datapipeline',
    'datasync',
    'dax',
    'deepracer',
    'detective',
    'devicefarm',
    'directconnect',
    'dms',
    'drs',
    'ds',
    'dynamodb',
    'ec2',
    'ecr-public',
    'ecr',
    'ecs',
    'eks',
    'elastic-inference',
    'elasticache',
    'elasticbeanstalk',
    'elasticfilesystem',
    'elasticloadbalancing',
    'elasticmapreduce',
    'elastictranscoder',
    'emr-containers',
    'emr-serverless',
    'es',
    'events',
    'execute-api',
    'firehose',
    'fms',
    'forecast',
    'fsx',
    'gamelift',
    'glacier',
    'globalaccelerator',
    'glue',
    'grafana',
    'guardduty',
    'health',
    'healthlake',
    'iam',
    'iot',
    'iot1click',
    'iotanalytics',
    'ivs',
    'junto',
    'kafka',
    'kafkaconnect',
    'kendra',
    'kinesis',
    'kinesisanalytics',
    'kinesisvideo',
    'kms',
    'lambda',
    'lex',
    'lightsail',
    'logs',
    'machinelearning',
    'macie',
    'macie2',
    'managedblockchain',
    'mediaconnect',
    'mediaconvert',
    'medialive',
    'mediapackage-vod',
    'mediapackage',
    'mediastore',
    'mediatailor',
    'memorydb',
    'mobilehub',
    'mobiletargeting',
    'mq',
    'network-firewall',
    'networkmanager',
    'opsworks-cm',
    'opsworks',
    'organizations',
    'osis',
    'personalize',
    'phonenumber',
    'polly',
    'qldb',
    'quicksight',
    'r53resolver',
    'rds',
    'redshift-serverless',
    'redshift',
    'rekognition',
    'robomaker',
    'route53',
    'route53resolver',
    's3',
    'sagemaker',
    'secretsmanager',
    'securityhub',
    'serverlessrepo',
    'servicediscovery',
    'ses',
    'shield',
    'snowball',
    'sns',
    'sqs',
    'ssm',
    'states',
    'storagegateway',
    'sts',
    'swf',
    'sync',
    'synthetics',
    'timestream',
    'transcribe',
    'transfer',
    'trustedadvisor',
    'unknown',
    'waf-regional',
    'waf',
    'wafv2',
    'worklink',
    'workmail',
    'workspaces',
    'workspaces-web',
    'xray'
}

CLOUDZERO_SERVICE_TYPES = {
    'cz-cloud-network',
    'cz-cloud-provider',
    'cz-contact',
    'cz-internet',
}

ALL_SERVICE_TYPES = SERVICE_TYPES_IN_ARNS.union(CLOUDZERO_SERVICE_TYPES)
