Skip to content

Commit

Permalink
KMS: update botocore JSON and overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
zbaylin authored and tmcgilchrist committed Apr 3, 2022
1 parent 7d28c9f commit 4022306
Show file tree
Hide file tree
Showing 108 changed files with 11,717 additions and 1,572 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ LIBRARIES := \
aws-cloudwatch \
aws-elasticache \
aws-elasticloadbalancing \
aws-kms \
aws-rds \
aws-sdb \
aws-ssm \
Expand Down
31 changes: 31 additions & 0 deletions aws-kms.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
opam-version: "2.0"
version: "1.2"
synopsis: "Amazon Web Services SDK bindings to AWS Key Management Service"
description: "Amazon Web Services SDK bindings to AWS Key Management Service"
maintainer: "Tim McGilchrist <[email protected]>"
authors: [
"Spiros Eliopoulos <[email protected]>"
"Daniel Patterson <[email protected]>"
"Tim McGilchrist <[email protected]>"
]
license: "BSD-3-clause"
homepage: "https://github.com/inhabitedtype/ocaml-aws"
bug-reports: "https://github.com/inhabitedtype/ocaml-aws/issues"
doc: "https://github.com/inhabitedtype/ocaml-aws"
dev-repo: "git+https://github.com/inhabitedtype/ocaml-aws.git"
depends: [
"ocaml" {>= "4.08"}
"aws" {= version}
"dune" {>= "2.7"}
"ounit2" {with-test & >= "2.2.4"}
"async" {with-test & >= "v0.14.0"}
"cohttp-async" {with-test & >= "2.4.0"}
"cohttp-lwt" {with-test & >= "2.4.0"}
"cohttp-lwt-unix" {with-test & >= "2.4.0"}
"lwt" {with-test & >= "4.0.0"}
"yojson" {with-test & >= "1.7.0"}
]
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
3,737 changes: 2,165 additions & 1,572 deletions input/kms/2014-11-01/service-2.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions input/kms/latest
52 changes: 52 additions & 0 deletions input/kms/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,57 @@
"CiphertextBlob"
]
}
},
"additionalValues": {
"operations": {
"CancelKeyDeletion": { "output": { "resultWrapper": "CancelKeyDeletionResult" } },
"ConnectCustomKeyStore": { "output": { "resultWrapper": "ConnectCustomKeyStoreResult" } },
"CreateAlias": { "output": { "resultWrapper": "CreateAliasResult" } },
"CreateCustomKeyStore": { "output": { "resultWrapper": "CreateCustomKeyStoreResult" } },
"CreateGrant": { "output": { "resultWrapper": "CreateGrantResult" } },
"CreateKey": { "output": { "resultWrapper": "CreateKeyResult" } },
"Decrypt": { "output": { "resultWrapper": "DecryptResult" } },
"DeleteAlias": { "output": { "resultWrapper": "DeleteAliasResult" } },
"DeleteCustomKeyStore": { "output": { "resultWrapper": "DeleteCustomKeyStoreResult" } },
"DeleteImportedKeyMaterial": { "output": { "resultWrapper": "DeleteImportedKeyMaterialResult" } },
"DescribeCustomKeyStores": { "output": { "resultWrapper": "DescribeCustomKeyStoresResult" } },
"DescribeKey": { "output": { "resultWrapper": "DescribeKeyResult" } },
"DisableKey": { "output": { "resultWrapper": "DisableKeyResult" } },
"DisableKeyRotation": { "output": { "resultWrapper": "DisableKeyRotationResult" } },
"DisconnectCustomKeyStore": { "output": { "resultWrapper": "DisconnectCustomKeyStoreResult" } },
"EnableKey": { "output": { "resultWrapper": "EnableKeyResult" } },
"EnableKeyRotation": { "output": { "resultWrapper": "EnableKeyRotationResult" } },
"Encrypt": { "output": { "resultWrapper": "EncryptResult" } },
"GenerateDataKey": { "output": { "resultWrapper": "GenerateDataKeyResult" } },
"GenerateDataKeyPair": { "output": { "resultWrapper": "GenerateDataKeyPairResult" } },
"GenerateDataKeyPairWithoutPlaintext": { "output": { "resultWrapper": "GenerateDataKeyPairWithoutPlaintextResult" } },
"GenerateDataKeyWithoutPlaintext": { "output": { "resultWrapper": "GenerateDataKeyWithoutPlaintextResult" } },
"GenerateRandom": { "output": { "resultWrapper": "GenerateRandomResult" } },
"GetKeyPolicy": { "output": { "resultWrapper": "GetKeyPolicyResult" } },
"GetKeyRotationStatus": { "output": { "resultWrapper": "GetKeyRotationStatusResult" } },
"GetParametersForImport": { "output": { "resultWrapper": "GetParametersForImportResult" } },
"GetPublicKey": { "output": { "resultWrapper": "GetPublicKeyResult" } },
"ImportKeyMaterial": { "output": { "resultWrapper": "ImportKeyMaterialResult" } },
"ListAliases": { "output": { "resultWrapper": "ListAliasesResult" } },
"ListGrants": { "output": { "resultWrapper": "ListGrantsResult" } },
"ListKeyPolicies": { "output": { "resultWrapper": "ListKeyPoliciesResult" } },
"ListKeys": { "output": { "resultWrapper": "ListKeysResult" } },
"ListResourceTags": { "output": { "resultWrapper": "ListResourceTagsResult" } },
"ListRetirableGrants": { "output": { "resultWrapper": "ListRetirableGrantsResult" } },
"PutKeyPolicy": { "output": { "resultWrapper": "PutKeyPolicyResult" } },
"ReEncrypt": { "output": { "resultWrapper": "ReEncryptResult" } },
"ReplicateKey": { "output": { "resultWrapper": "ReplicateKeyResult" } },
"RetireGrant": { "output": { "resultWrapper": "RetireGrantResult" } },
"RevokeGrant": { "output": { "resultWrapper": "RevokeGrantResult" } },
"ScheduleKeyDeletion": { "output": { "resultWrapper": "ScheduleKeyDeletionResult" } },
"Sign": { "output": { "resultWrapper": "SignResult" } },
"TagResource": { "output": { "resultWrapper": "TagResourceResult" } },
"UntagResource": { "output": { "resultWrapper": "UntagResourceResult" } },
"UpdateAlias": { "output": { "resultWrapper": "UpdateAliasResult" } },
"UpdateCustomKeyStore": { "output": { "resultWrapper": "UpdateCustomKeyStoreResult" } },
"UpdateKeyDescription": { "output": { "resultWrapper": "UpdateKeyDescriptionResult" } },
"UpdatePrimaryRegion": { "output": { "resultWrapper": "UpdatePrimaryRegionResult" } },
"Verify": { "output": { "resultWrapper": "VerifyResult" } }
}
}
}
65 changes: 65 additions & 0 deletions libraries/kms/lib/cancelKeyDeletion.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
open Types
open Aws

type input = CancelKeyDeletionRequest.t

type output = CancelKeyDeletionResponse.t

type error = Errors_internal.t

let service = "kms"

let signature_version = Request.V4

let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[ "Version", [ "2014-11-01" ]; "Action", [ "CancelKeyDeletion" ] ]
(Util.drop_empty
(Uri.query_of_encoded (Query.render (CancelKeyDeletionRequest.to_query req)))))
in
`POST, uri, []

let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp =
Util.option_bind
(Xml.member "CancelKeyDeletionResponse" (snd xml))
(Xml.member "CancelKeyDeletionResult")
in
try
Util.or_error
(Util.option_bind resp CancelKeyDeletionResponse.parse)
(let open Error in
BadResponse
{ body; message = "Could not find well formed CancelKeyDeletionResponse." })
with Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{ body
; message =
"Error parsing CancelKeyDeletionResponse - missing field in body or \
children: "
^ msg
})
with Failure msg ->
`Error
(let open Error in
BadResponse { body; message = "Error parsing xml: " ^ msg })

let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if List.mem var errors
&&
match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true
then Some var
else None
| None -> None
10 changes: 10 additions & 0 deletions libraries/kms/lib/cancelKeyDeletion.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open Types

type input = CancelKeyDeletionRequest.t

type output = CancelKeyDeletionResponse.t

type error = Errors_internal.t

include
Aws.Call with type input := input and type output := output and type error := error
39 changes: 39 additions & 0 deletions libraries/kms/lib/connectCustomKeyStore.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
open Types
open Aws

type input = ConnectCustomKeyStoreRequest.t

type output = unit

type error = Errors_internal.t

let service = "kms"

let signature_version = Request.V4

let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[ "Version", [ "2014-11-01" ]; "Action", [ "ConnectCustomKeyStore" ] ]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (ConnectCustomKeyStoreRequest.to_query req)))))
in
`POST, uri, []

let of_http body = `Ok ()

let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if List.mem var errors
&&
match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true
then Some var
else None
| None -> None
10 changes: 10 additions & 0 deletions libraries/kms/lib/connectCustomKeyStore.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open Types

type input = ConnectCustomKeyStoreRequest.t

type output = unit

type error = Errors_internal.t

include
Aws.Call with type input := input and type output := output and type error := error
38 changes: 38 additions & 0 deletions libraries/kms/lib/createAlias.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
open Types
open Aws

type input = CreateAliasRequest.t

type output = unit

type error = Errors_internal.t

let service = "kms"

let signature_version = Request.V4

let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[ "Version", [ "2014-11-01" ]; "Action", [ "CreateAlias" ] ]
(Util.drop_empty
(Uri.query_of_encoded (Query.render (CreateAliasRequest.to_query req)))))
in
`POST, uri, []

let of_http body = `Ok ()

let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if List.mem var errors
&&
match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true
then Some var
else None
| None -> None
10 changes: 10 additions & 0 deletions libraries/kms/lib/createAlias.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open Types

type input = CreateAliasRequest.t

type output = unit

type error = Errors_internal.t

include
Aws.Call with type input := input and type output := output and type error := error
66 changes: 66 additions & 0 deletions libraries/kms/lib/createCustomKeyStore.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
open Types
open Aws

type input = CreateCustomKeyStoreRequest.t

type output = CreateCustomKeyStoreResponse.t

type error = Errors_internal.t

let service = "kms"

let signature_version = Request.V4

let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service region)))
(List.append
[ "Version", [ "2014-11-01" ]; "Action", [ "CreateCustomKeyStore" ] ]
(Util.drop_empty
(Uri.query_of_encoded
(Query.render (CreateCustomKeyStoreRequest.to_query req)))))
in
`POST, uri, []

let of_http body =
try
let xml = Ezxmlm.from_string body in
let resp =
Util.option_bind
(Xml.member "CreateCustomKeyStoreResponse" (snd xml))
(Xml.member "CreateCustomKeyStoreResult")
in
try
Util.or_error
(Util.option_bind resp CreateCustomKeyStoreResponse.parse)
(let open Error in
BadResponse
{ body; message = "Could not find well formed CreateCustomKeyStoreResponse." })
with Xml.RequiredFieldMissing msg ->
let open Error in
`Error
(BadResponse
{ body
; message =
"Error parsing CreateCustomKeyStoreResponse - missing field in body or \
children: "
^ msg
})
with Failure msg ->
`Error
(let open Error in
BadResponse { body; message = "Error parsing xml: " ^ msg })

let parse_error code err =
let errors = [] @ Errors_internal.common in
match Errors_internal.of_string err with
| Some var ->
if List.mem var errors
&&
match Errors_internal.to_http_code var with
| Some var -> var = code
| None -> true
then Some var
else None
| None -> None
10 changes: 10 additions & 0 deletions libraries/kms/lib/createCustomKeyStore.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open Types

type input = CreateCustomKeyStoreRequest.t

type output = CreateCustomKeyStoreResponse.t

type error = Errors_internal.t

include
Aws.Call with type input := input and type output := output and type error := error
Loading

0 comments on commit 4022306

Please sign in to comment.