code: @Deprecated
      public void setRegion(Region region) throws IllegalArgumentException {
          checkMutability();
          if (region == null) {
              throw new IllegalArgumentException("No region provided");
          }
          final String serviceNameForEndpoint = getEndpointPrefix();
          final String serviceNameForSigner = getServiceNameIntern();
          URI uri = new DefaultServiceEndpointBuilder(serviceNameForEndpoint, clientConfiguration.getProtocol()
                  .toString()).withRegion(region).getServiceEndpoint();
          Signer signer = computeSignerByServiceRegion(serviceNameForSigner, region.getName(), signerRegionOverride, false);
          synchronized (this) {
              this.endpoint = uri;
              this.signerProvider = createSignerProvider(signer);
              this.signingRegion = AwsHostNameUtils.parseRegion(endpoint.toString(), getEndpointPrefix());
          }
      }
docs: An alternative to {@link AmazonWebServiceClient#setEndpoint(String)}, sets the regional
  endpoint for this client's service calls. Callers can use this method to control which AWS
  region they want to work with.
  <p>
  <b>This method is not threadsafe. A region should be configured when the client is created
  and before any service requests are made. Changing it afterwards creates inevitable race
  conditions for any service requests in transit or retrying.</b>
  <p>
  By default, all service endpoints in all regions use the https protocol. To use http instead,
  specify it in the {@link ClientConfiguration} supplied at construction.
  
  @param region
  The region this client will communicate with. See
  {@link Region#getRegion(com.amazonaws.regions.Regions)} for accessing a given
  region.
  @throws java.lang.IllegalArgumentException
  If the given region is null, or if this service isn't available in the given
  region. See {@link Region#isServiceSupported(String)}
  @see Region#getRegion(com.amazonaws.regions.Regions)
  @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider,
  ClientConfiguration)
  @deprecated use {@link AwsClientBuilder#setRegion(String)}