Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion tableauserverclient/models/connection_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,27 @@


class ConnectionCredentials:
"""Connection Credentials for Workbooks and Datasources publish request.
"""
Connection Credentials for Workbooks and Datasources publish request.

Consider removing this object and other variables holding secrets
as soon as possible after use to avoid them hanging around in memory.

Parameters
----------
name: str
The username for the connection.

password: str
The password used for the connection.

embed: bool, default True
Determines whether to embed the password (True) for the workbook or data source connection or not (False).

oauth: bool, default False
Determines whether to use OAuth for the connection (True) or not (False).
For more information see: https://help.tableau.com/current/server/en-us/protected_auth.htm

"""

def __init__(self, name, password, embed=True, oauth=False):
Expand Down
38 changes: 38 additions & 0 deletions tableauserverclient/models/connection_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@


class ConnectionItem:
"""
Corresponds to workbook and data source connections.

Attributes
----------
datasource_id: str
The identifier of the data source.

datasource_name: str
The name of the data source.

id: str
The identifier of the connection.

connection_type: str
The type of connection.

username: str
The username for the connection. (see ConnectionCredentials)

password: str
The password used for the connection. (see ConnectionCredentials)

embed_password: bool
Determines whether to embed the password (True) for the workbook or data source connection or not (False). (see ConnectionCredentials)

server_address: str
The server address for the connection.

server_port: str
The port used for the connection.

connection_credentials: ConnectionCredentials
The Connection Credentials object containing authentication details for
the connection. Replaces username/password/embed_password when
publishing a flow, document or workbook file in the request body.
"""

def __init__(self):
self._datasource_id: Optional[str] = None
self._datasource_name: Optional[str] = None
Expand Down
Loading