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

S3 url fix #71

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ endpoints:
aws-ec2:
dune exec aws-gen -- --is-ec2 -i input/ec2/latest/service-2.json -r input/ec2/overrides.json -e input/errors.json -o libraries

aws-s3:
dune exec aws-gen -- --is-s3 -i input/s3/latest/service-2.json -r input/s3/overrides.json -e input/errors.json -o libraries

# NOTE: This does not include aws-ec2, which is special-cased.
LIBRARIES := \
aws-autoscaling \
Expand All @@ -39,15 +42,14 @@ LIBRARIES := \
aws-sdb \
aws-ssm \
aws-sts \
aws-s3 \
aws-route53 \
aws-sqs \

.PHONY: $(LIBRARIES)
$(LIBRARIES): aws-%:
dune exec aws-gen -- -i input/$*/latest/service-2.json -r input/$*/overrides.json -e input/errors.json -o libraries

gen: build aws-ec2 $(LIBRARIES)
gen: build aws-ec2 aws-s3 $(LIBRARIES)

update-version: VERSION=$(shell cat CHANGES.md | grep -E '^[0-9]' | head -n 1 | cut -f1 -d':' )
update-version:
Expand Down
6 changes: 6 additions & 0 deletions lib/endpoints.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1925,3 +1925,9 @@ let url_of svc_name region =
match endpoint_of svc_name region with
| Some var -> Some ("https://" ^ var)
| None -> None

(* Create a URL for *)
let url_with_prefix prefix svc_name region =
match endpoint_of svc_name region with
| Some var -> Some ("https://" ^ prefix ^ "." ^ var)
| None -> None
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/attachInstances.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "AttachInstances" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/attachLoadBalancers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "AttachLoadBalancers" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/completeLifecycleAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "CompleteLifecycleAction" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/createAutoScalingGroup.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "CreateAutoScalingGroup" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/createLaunchConfiguration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "CreateLaunchConfiguration" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/createOrUpdateTags.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "CreateOrUpdateTags" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteAutoScalingGroup.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteAutoScalingGroup" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteLaunchConfiguration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteLaunchConfiguration" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteLifecycleHook.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteLifecycleHook" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteNotificationConfiguration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteNotificationConfiguration" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deletePolicy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeletePolicy" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteScheduledAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteScheduledAction" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/deleteTags.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DeleteTags" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeAccountLimits.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeAccountLimits" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeAdjustmentTypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeAdjustmentTypes" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeAutoScalingGroups.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeAutoScalingGroups" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeAutoScalingInstances.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeAutoScalingInstances" ] ]
(Util.drop_empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]
; "Action", [ "DescribeAutoScalingNotificationTypes" ]
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeLaunchConfigurations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeLaunchConfigurations" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeLifecycleHookTypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeLifecycleHookTypes" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeLifecycleHooks.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeLifecycleHooks" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeLoadBalancers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeLoadBalancers" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeMetricCollectionTypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeMetricCollectionTypes" ] ]
(Util.drop_empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]
; "Action", [ "DescribeNotificationConfigurations" ]
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describePolicies.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribePolicies" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeScalingActivities.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeScalingActivities" ] ]
(Util.drop_empty
Expand Down
4 changes: 2 additions & 2 deletions libraries/autoscaling/lib/describeScalingProcessTypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type error = Errors_internal.t

let service = "autoscaling"

let to_http service region req =
let to_http service region (req : input) =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(Uri.of_string @@ Aws.Util.of_option_exn (Endpoints.url_of service region))
(List.append
[ "Version", [ "2011-01-01" ]; "Action", [ "DescribeScalingProcessTypes" ] ]
(Util.drop_empty
Expand Down
Loading