Skip to content

Commit

Permalink
add docstring for batch_input in the transit.sign_data
Browse files Browse the repository at this point in the history
  • Loading branch information
deidax authored and briantist committed Jun 22, 2023
1 parent 6f88ddf commit 9b1879f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hvac/api/secrets_engines/transit.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,13 @@ def sign_data(
:type salt_length: str | unicode
:param mount_point: The "path" the method/backend was mounted on.
:type mount_point: str | unicode
:param batch_input: Specifies a list of items for processing.
When this parameter is set, if the parameter 'hash_input' is also set, it will be ignored.
Responses are returned in the 'batch_results' array component of the 'data' element of the response.
Any batch output will preserve the order of the batch input.
If the input data value of an item is invalid, the corresponding item in the 'batch_results'
will have the key 'error' with a value describing the error.
:type batch_input: List[Dict[str, str]]
:return: The JSON response of the request.
:rtype: dict
"""
Expand Down Expand Up @@ -861,6 +868,9 @@ def sign_data(
allowed_types=transit_constants.ALLOWED_SALT_LENGTHS.pattern,
)
)

hash_input = None if batch_input is not None else hash_input

params = {
"input": hash_input,
}
Expand Down

0 comments on commit 9b1879f

Please sign in to comment.