{"action":"opened","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-net/issues/685","repository_url":"https://api.github.com/repos/aws/aws-sdk-net","labels_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/685/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/685/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-net/issues/685/events","html_url":"https://github.com/aws/aws-sdk-net/issues/685","id":239968706,"number":685,"title":"AWSPowershell—Get-ECSClusters : A WebException with status NameResolutionFailure was thrown.","user":{"login":"bgshacklett","id":583359,"avatar_url":"https://avatars0.githubusercontent.com/u/583359?v=3","gravatar_id":"","url":"https://api.github.com/users/bgshacklett","html_url":"https://github.com/bgshacklett","followers_url":"https://api.github.com/users/bgshacklett/followers","following_url":"https://api.github.com/users/bgshacklett/following{/other_user}","gists_url":"https://api.github.com/users/bgshacklett/gists{/gist_id}","starred_url":"https://api.github.com/users/bgshacklett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgshacklett/subscriptions","organizations_url":"https://api.github.com/users/bgshacklett/orgs","repos_url":"https://api.github.com/users/bgshacklett/repos","events_url":"https://api.github.com/users/bgshacklett/events{/privacy}","received_events_url":"https://api.github.com/users/bgshacklett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-01T19:46:09Z","updated_at":"2017-07-01T19:46:09Z","closed_at":null,"body":"When calling Get-ECSClusters for all regions, I get a number of errors stating: \"Get-ECSClusters : A WebException with status NameResolutionFailure was thrown.\" On the surface, this is very confusing and it's easy to think that the issue could be the local DNS servers or configuration.\r\n\r\n## Expected Behavior\r\nA more reasonable error should be thrown, perhaps something stating that there is no support for the service in the specified region.\r\n\r\n## Current Behavior\r\nSome regions show the clusters as expected. For others, there is an uncaught exception:\r\n```\r\nGet-ECSClusters : A WebException with status NameResolutionFailure was thrown.\r\nAt line:1 char:34\r\n+ Get-AWSRegion | ForEach-Object { Get-ECSClusters -Region $_ }\r\n+                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (Amazon.PowerShe...SClustersCmdlet:GetECSClustersCmdlet) [Get-ECSClusters], InvalidOperationException\r\n    + FullyQualifiedErrorId : Amazon.Runtime.AmazonServiceException,Amazon.PowerShell.Cmdlets.ECS.GetECSClustersCmdlet\r\n```\r\n\r\n## Possible Solution\r\nIs there an API that could be queried to say if a service is supported in a specific region? If so, catching the exception, then checking the api to see if it should be available might be a good start. If not, perhaps the mechanism for generating the matrix at https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/ would be of some use to automate a hard coded structure like `Get-AWSRegion` uses.\r\n\r\n## Steps to Reproduce (for bugs)\r\n    Get-AWSRegion | ForEach-Object { Get-ECSClusters -Region $_ }\r\n\r\n## Context\r\n<!--- How has this issue affected you? What are you trying to accomplish? -->\r\n<!--- Providing context helps us come up with a solution that is most useful in the real world -->\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment where the bug was discovered -->\r\n* AWSPowershell Version: `3.3.84.0`\r\n* Operating System and version: Windows `10.0.14393.0`\r\n* Visual Studio version: n/a\r\n* Targeted .NET platform: \r\n```\r\n$PSVersionTable\r\n\r\nName                           Value\r\n----                           -----\r\nPSVersion                      5.1.14393.1066\r\nPSEdition                      Desktop\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.1066}\r\nBuildVersion                   10.0.14393.1066\r\nCLRVersion                     4.0.30319.42000\r\nWSManStackVersion              3.0\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\n```"}}
{"actor":{"display_login":"bgshacklett"}}