Skip to content

Commit ab2aff9

Browse files
author
Shakeel Mohamed
committed
Add cookie parmeter to Service constructor docs
1 parent 076adf3 commit ab2aff9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

splunklib/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ class Service(_BaseService):
345345
:param `token`: The current session token (optional). Session tokens can be
346346
shared across multiple service instances.
347347
:type token: ``string``
348+
:param cookie: A session cookie. When provided, you don't need to call :meth:`login`.
349+
This parameter is only supported for Splunk 6.2+.
350+
:type cookie: ``string``
348351
:param `username`: The Splunk account username, which is used to
349352
authenticate the Splunk instance.
350353
:type username: ``string``
@@ -362,6 +365,8 @@ class Service(_BaseService):
362365
s = client.connect(username="boris", password="natasha")
363366
# Or if you already have a session token
364367
s = client.Service(token="atg232342aa34324a")
368+
# Or if you already have a valid cookie
369+
s = client.Service(cookie="splunkd_8089=...")
365370
"""
366371
def __init__(self, **kwargs):
367372
super(Service, self).__init__(**kwargs)

0 commit comments

Comments
 (0)