ConvertCountryCodeCountryName
Convert country name to country code or country code to country name. Only one of 'country_code' or 'country_name' can be provided. Example: Input: { "country_code": "US" } Output: { "United States" } Another Example: Input: { "country_name": "United States" } Output: { "US" }.
python · Common Scripts
Details
| ID | ConvertCountryCodeCountryName |
|---|---|
| Language | python |
| From Version | 6.5.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | transformer |
README
Convert country name to country code or country code to country name.
Only one of ‘country_code’ or ‘country_name’ can be provided.
Example:
Input: { “country_code”: “US” }
Output: { “United States” }
Another Example:
Input: { “country_name”: “United States” }
Output: { “US” }
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | transformer |
| Cortex XSOAR Version | 5.0.0 |
Inputs
| Argument Name | Description |
|---|---|
| country_code | Country Code Alpha 2 (Example: US) |
| country_name | Country Name |
Outputs
There are no outputs for this script.
commonfields: id: ConvertCountryCodeCountryName version: -1 name: ConvertCountryCodeCountryName script: '' type: python tags: - transformer comment: |- Convert country name to country code or country code to country name. Only one of 'country_code' or 'country_name' can be provided. Example: Input: { "country_code": "US" } Output: { "United States" } Another Example: Input: { "country_name": "United States" } Output: { "US" }. enabled: true args: - name: country_code description: 'Country Code Alpha 2 (Example: US).' - name: country_name description: Country Name. scripttarget: 0 subtype: python3 dockerimage: demisto/python3:3.12.13.10404775 runas: DBotWeakRole fromversion: 6.5.0 tests: - ConvertCountryCodeCountryName_Test