1// +build codegen 2 3package api 4 5// ServiceName returns the SDK's naming of the service. Has 6// backwards compatibility built in for services that were 7// incorrectly named with the service's endpoint prefix. 8func ServiceName(a *API) string { 9 if oldName, ok := oldServiceNames[a.PackageName()]; ok { 10 return oldName 11 } 12 13 return ServiceID(a) 14} 15 16var oldServiceNames = map[string]string{ 17 "migrationhub": "mgh", 18 "acmpca": "acm-pca", 19 "acm": "acm", 20 "alexaforbusiness": "a4b", 21 "apigateway": "apigateway", 22 "applicationautoscaling": "autoscaling", 23 "appstream": "appstream2", 24 "appsync": "appsync", 25 "athena": "athena", 26 "autoscalingplans": "autoscaling", 27 "autoscaling": "autoscaling", 28 "batch": "batch", 29 "budgets": "budgets", 30 "costexplorer": "ce", 31 "cloud9": "cloud9", 32 "clouddirectory": "clouddirectory", 33 "cloudformation": "cloudformation", 34 "cloudfront": "cloudfront", 35 "cloudhsm": "cloudhsm", 36 "cloudhsmv2": "cloudhsmv2", 37 "cloudsearch": "cloudsearch", 38 "cloudsearchdomain": "cloudsearchdomain", 39 "cloudtrail": "cloudtrail", 40 "codebuild": "codebuild", 41 "codecommit": "codecommit", 42 "codedeploy": "codedeploy", 43 "codepipeline": "codepipeline", 44 "codestar": "codestar", 45 "cognitoidentity": "cognito-identity", 46 "cognitoidentityprovider": "cognito-idp", 47 "cognitosync": "cognito-sync", 48 "comprehend": "comprehend", 49 "configservice": "config", 50 "connect": "connect", 51 "costandusagereportservice": "cur", 52 "datapipeline": "datapipeline", 53 "dax": "dax", 54 "devicefarm": "devicefarm", 55 "directconnect": "directconnect", 56 "applicationdiscoveryservice": "discovery", 57 "databasemigrationservice": "dms", 58 "directoryservice": "ds", 59 "dynamodb": "dynamodb", 60 "ec2": "ec2", 61 "ecr": "ecr", 62 "ecs": "ecs", 63 "eks": "eks", 64 "elasticache": "elasticache", 65 "elasticbeanstalk": "elasticbeanstalk", 66 "efs": "elasticfilesystem", 67 "elb": "elasticloadbalancing", 68 "elbv2": "elasticloadbalancing", 69 "emr": "elasticmapreduce", 70 "elastictranscoder": "elastictranscoder", 71 "ses": "email", 72 "marketplaceentitlementservice": "entitlement.marketplace", 73 "elasticsearchservice": "es", 74 "cloudwatchevents": "events", 75 "firehose": "firehose", 76 "fms": "fms", 77 "gamelift": "gamelift", 78 "glacier": "glacier", 79 "glue": "glue", 80 "greengrass": "greengrass", 81 "guardduty": "guardduty", 82 "health": "health", 83 "iam": "iam", 84 "inspector": "inspector", 85 "iotdataplane": "data.iot", 86 "iotjobsdataplane": "data.jobs.iot", 87 "iot": "iot", 88 "iot1clickdevicesservice": "devices.iot1click", 89 "iot1clickprojects": "projects.iot1click", 90 "iotanalytics": "iotanalytics", 91 "kinesisvideoarchivedmedia": "kinesisvideo", 92 "kinesisvideomedia": "kinesisvideo", 93 "kinesis": "kinesis", 94 "kinesisanalytics": "kinesisanalytics", 95 "kinesisvideo": "kinesisvideo", 96 "kms": "kms", 97 "lambda": "lambda", 98 "lexmodelbuildingservice": "models.lex", 99 "lightsail": "lightsail", 100 "cloudwatchlogs": "logs", 101 "machinelearning": "machinelearning", 102 "marketplacecommerceanalytics": "marketplacecommerceanalytics", 103 "mediaconvert": "mediaconvert", 104 "medialive": "medialive", 105 "mediapackage": "mediapackage", 106 "mediastoredata": "data.mediastore", 107 "mediastore": "mediastore", 108 "mediatailor": "api.mediatailor", 109 "marketplacemetering": "metering.marketplace", 110 "mobile": "mobile", 111 "mobileanalytics": "mobileanalytics", 112 "cloudwatch": "monitoring", 113 "mq": "mq", 114 "mturk": "mturk-requester", 115 "neptune": "rds", 116 "opsworks": "opsworks", 117 "opsworkscm": "opsworks-cm", 118 "organizations": "organizations", 119 "pi": "pi", 120 "pinpoint": "pinpoint", 121 "polly": "polly", 122 "pricing": "api.pricing", 123 "rds": "rds", 124 "redshift": "redshift", 125 "rekognition": "rekognition", 126 "resourcegroups": "resource-groups", 127 "resourcegroupstaggingapi": "tagging", 128 "route53": "route53", 129 "route53domains": "route53domains", 130 "lexruntimeservice": "runtime.lex", 131 "sagemakerruntime": "runtime.sagemaker", 132 "s3": "s3", 133 "sagemaker": "sagemaker", 134 "simpledb": "sdb", 135 "secretsmanager": "secretsmanager", 136 "serverlessapplicationrepository": "serverlessrepo", 137 "servicecatalog": "servicecatalog", 138 "servicediscovery": "servicediscovery", 139 "shield": "shield", 140 "sms": "sms", 141 "snowball": "snowball", 142 "sns": "sns", 143 "sqs": "sqs", 144 "ssm": "ssm", 145 "sfn": "states", 146 "storagegateway": "storagegateway", 147 "dynamodbstreams": "streams.dynamodb", 148 "sts": "sts", 149 "support": "support", 150 "swf": "swf", 151 "transcribeservice": "transcribe", 152 "translate": "translate", 153 "wafregional": "waf-regional", 154 "waf": "waf", 155 "workdocs": "workdocs", 156 "workmail": "workmail", 157 "workspaces": "workspaces", 158 "xray": "xray", 159} 160