Updated the get_policy API in the index_management plugin to allow the policy_id argument as optional (#633)
Signed-off-by: saimedhi <[email protected]>
This commit is contained in:
@@ -55,14 +55,14 @@ class IndexManagementClient(NamespacedClient):
|
||||
)
|
||||
|
||||
@query_params()
|
||||
def get_policy(self, policy: Any, params: Any = None, headers: Any = None) -> Any:
|
||||
def get_policy(
|
||||
self, policy: Any = None, params: Any = None, headers: Any = None
|
||||
) -> Any:
|
||||
"""
|
||||
Gets the policy by `policy_id`.
|
||||
Gets the policy by `policy_id`; returns all policies if no policy_id is provided.
|
||||
|
||||
:arg policy: The name of the policy
|
||||
"""
|
||||
if policy in SKIP_IN_PATH:
|
||||
raise ValueError("Empty value passed for a required argument 'policy'.")
|
||||
|
||||
return self.transport.perform_request(
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user