List of usage examples for com.amazonaws.services.simpleworkflow AmazonSimpleWorkflowClient setRegion
@Deprecated public void setRegion(Region region) throws IllegalArgumentException
From source file:com.netflix.amazoncomponents.security.AmazonClientProvider.java
License:Apache License
public AmazonSimpleWorkflow getAmazonSimpleWorkflow(AWSCredentialsProviderChain providerChain, String region) { if (providerChain == null) { throw new IllegalArgumentException("Provider chain cannot be null"); }/* w w w. j a v a 2 s. c o m*/ AmazonSimpleWorkflowClient client = new AmazonSimpleWorkflowClient(providerChain); if (region != null && region.length() > 0) { client.setRegion(Region.getRegion(Regions.fromName(region))); } return client; }