Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functions, fixes for various parameters, and contributing more generally? #14

Open
kenny-evitt opened this issue Oct 8, 2021 · 0 comments

Comments

@kenny-evitt
Copy link

There are some nice new functions in the two open PRs – any chance that those could be merged sometime soonish?

I have also written a few others that, after being cleaned-up a little, would make nice additions too.

I also ran into an issue like #8 but for ExAws.RDS.modify_db_instance/2:

iex(29)> with instance_id     = "some-instance-id",
...(29)>      new_instance_id = "#{instance_id}-new" do
...(29)> 
...(29)>   ExAws.RDS.modify_db_instance(
...(29)>     instance_id,
...(29)>     new_db_instance_identifier: new_instance_id
...(29)>   )
...(29)> 
...(29)> end
%ExAws.Operation.RestQuery{
  action: nil,
  body: "",
  http_method: :patch,
  params: %{
    "Action" => "ModifyDBInstance",
    "DBInstanceIdentifier" => "some-instance-id",
    "NewDbInstanceIdentifier" => "some-instance-id-new",
    "Version" => "2014-10-31"
  },
  parser: &ExAws.Utils.identity/2,
  path: "/",
  service: :rds
}

Per the AWS RDS API docs, the parameter should be named "NewDBInstanceIdentifier".

That seems to be a somewhat common issue with parameter names that include an acronym, e.g. "DB", or "AZ".

I also had some trouble with the "VpcSecurityGroupIds.*" parameter(s) for the AWS RDS API action "RestoreDBInstanceFromDBSnapshot". Those are also used by create_db_instance/7 but normalize_opts doesn't seem to handle them correctly. Some code I wrote for those parameters:

          vpc_security_group_ids
          |> Enum.with_index(
            fn group_id, index ->
              {
                "VpcSecurityGroupIds.VpcSecurityGroupId.#{index + 1}",
                group_id
              }
            end
          )
          |> Enum.into(%{})

That also seems like a possibly somewhat common pattern for the various 'collection' parameters for different functions, and probably in any other AWS API with 'AWS API Query' actions/endpoints.

I'm currently working with this library pretty heavily and this would be a good time – for me – to contribute, if you're open to contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant