* Placeholder to test Application Autoscaling. * Wire everything together and create a first passing test without any real functionality. * Get one test working properly. * Add some TODO items. * Reformat code with black * Second passing test for describe_scalable_targets. * New test for NextToken. * Add some tests for ParamValidationError and ValidationException. * black * Ensure scalable targets are being captured in an OrderedDict() for deterministic return later. * Add validation to describe_scalable_targets and register_scalable_target. * Fix tests. * Add creation_time, refactor, add ECS backend, and add failing test for checking that ecs service exists. * Add parameter validation. * Improved documentation for CONTRIBUTING.md Adds some details to give people an idea what's involved in adding new features/services * Integrate with ECS. * black * Refactor to allow implementation of SuspendedState. * Complete support for SuspendedState. * Bump up implementation coverage percentage. * Tidy up code; add comments. * Implement suggested changes from code review. * Minor refactorings for elegance. * README update Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
11 lines
225 B
Python
11 lines
225 B
Python
from six.moves.urllib.parse import urlparse
|
|
|
|
|
|
def region_from_applicationautoscaling_url(url):
|
|
domain = urlparse(url).netloc
|
|
|
|
if "." in domain:
|
|
return domain.split(".")[1]
|
|
else:
|
|
return "us-east-1"
|