Tableau Server Client (TSC)
中UserItem
的用法。
用法
UserItem(name, site_role, auth_setting=None)
UserItem
類包含 Tableau Server 上視圖資源的成員或屬性。 UserItem
類定義您可以從 Tableau Server 請求或查詢的信息。類成員對應於服務器請求或響應負載的屬性。
屬性
名字 | 說明 |
---|---|
auth_setting |
(可選)此屬性僅適用於 Tableau Online。用戶的新身份驗證類型。您可以為此屬性分配以下值:SAML (用戶使用 SAML 登錄)或ServerDefault (用戶使用為服務器設置的身份驗證方法登錄)。這些值出現在驗證選項卡上設置Tableau Online 中的頁麵 -SAML 屬性值對應單sign-on, 和ServerDefault 值對應TableauID. |
domain_name |
站點的名稱。 |
external_auth_user_id |
表示存儲在 Tableau 的單個 sign-on (SSO) 係統中的 ID。為 Tableau Online 返回 externalAuthUserId 值。對於其他服務器配置,此字段包含 null。 |
id |
站點上用戶的 ID。 |
last_login |
用戶上次登錄的日期和時間。 |
workbooks |
用戶擁有的工作簿。您必須運行 populate_workbooks 方法才能將工作簿添加到 UserItem 。 |
email |
用戶的電子郵件地址。 |
fullname |
用戶的全名。 |
name |
用戶的名稱。創建UserItem 實例時需要此屬性。 |
site_role |
用戶在站點上的角色。如果您要創建UserItem 實例,則此屬性是必需的。有關詳細信息,請參閱下麵的User Roles 。 |
groups |
用戶所屬的組。您必須運行 populate_groups 方法將組添加到 UserItem 。 |
用戶角色
site_role
屬性的可能用戶角色如下:
Creator
Explorer
ExplorerCanPublish
ServerAdministrator
SiteAdministratorExplorer
SiteAdministratorCreator
Unlicensed
ReadOnly
Viewer
注意:如果有任何與用戶相關的操作site_role
導致 400 錯誤響應(例如:Invalid site role: 'Explorer' is malformed or is not a supported user role in this version of Tableau
),確保你是為您的服務器使用最新的 REST API 版本.
示例
# import tableauserverclient as TSC
# server = TSC.Server('server')
# create a new UserItem object.
newU = TSC.UserItem('Monty', 'Publisher')
print(newU.name, newU.site_role)
源文件:models/user_item.py
相關用法
- Python MongoDB Update_one()用法及代碼示例
- Python Unicode轉ASCII用法及代碼示例
- Python PIL UnsahrpMask()用法及代碼示例
- Python Union()用法及代碼示例
- Python cudf.core.column.string.StringMethods.is_vowel用法及代碼示例
- Python torch.distributed.rpc.rpc_async用法及代碼示例
- Python torch.nn.InstanceNorm3d用法及代碼示例
- Python sklearn.cluster.MiniBatchKMeans用法及代碼示例
- Python pandas.arrays.IntervalArray.is_empty用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
- Python numpy.less()用法及代碼示例
- Python Matplotlib.figure.Figure.add_gridspec()用法及代碼示例
- Python tf.compat.v1.distribute.MirroredStrategy.experimental_distribute_dataset用法及代碼示例
- Python Sympy Permutation.list()用法及代碼示例
- Python dask.dataframe.Series.apply用法及代碼示例
- Python networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_path用法及代碼示例
- Python scipy.ndimage.binary_opening用法及代碼示例
- Python pyspark.pandas.Series.dropna用法及代碼示例
- Python torchaudio.transforms.Fade用法及代碼示例
- Python dask.dataframe.to_records用法及代碼示例
- Python arcgis.gis._impl._profile.ProfileManager.save_as用法及代碼示例
- Python pyspark.pandas.groupby.SeriesGroupBy.unique用法及代碼示例
- Python distributed.protocol.serialize.register_generic用法及代碼示例
- Python numpy.polynomial.hermite.hermmul用法及代碼示例
- Python tf.compat.v1.data.TFRecordDataset.interleave用法及代碼示例
注:本文由純淨天空篩選整理自tableau.github.io大神的英文原創作品 UserItem class。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。