aws-beam / aws-codegen

Code generator for AWS clients in Erlang and Elixir.
Other
53 stars 49 forks source link

Add hostname from aws-global for global endpoints to Elixir metadata Structs in order to support global endpoints #111

Closed onno-vos-dev closed 4 months ago

onno-vos-dev commented 4 months ago

Fixes https://github.com/aws-beam/aws-elixir/issues/189

Generated code for route53.ex would for example end up like:

  def metadata do
    %{
      api_version: "2013-04-01",
      content_type: "text/xml",
      credential_scope: "us-east-1",
      endpoint_prefix: "route53",
      global?: true,
      hostname: "route53.amazonaws.com",
      protocol: "rest-xml",
      service_id: "Route 53",
      signature_version: "v4",
      signing_name: "route53",
      target_prefix: nil
    }
  end

This will allow us to change aws-elixir request.ex module to use this hostname instead of trying to fiddle and construct it's own. We've had issues with this now in both https://github.com/aws-beam/aws-elixir/issues/189 and https://github.com/aws-beam/aws-elixir/issues/177 and this should hopefully ensure https://github.com/aws-beam/aws-elixir/issues/189 is fixed without breaking https://github.com/aws-beam/aws-elixir/issues/177