Share via


ContentModeratorClientConfiguration 類別

ContentModeratorClient 的組態 注意,用來建立此實例的所有參數都會儲存為實例屬性。

繼承
msrest.configuration.Configuration
ContentModeratorClientConfiguration

建構函式

ContentModeratorClientConfiguration(endpoint, credentials)

參數

名稱 Description
endpoint
必要
str

支援的認知服務端點 (通訊協定和主機名稱,例如: https://westus.api.cognitive.microsoft.com) 。

credentials
必要

可唯一識別用戶端訂用帳戶的訂用帳號憑證。

方法

add_user_agent

將值新增至具有空格的目前使用者代理程式。

load
save

將目前的組態儲存至檔案。

add_user_agent

將值新增至具有空格的目前使用者代理程式。

add_user_agent(value: str) -> None

參數

名稱 Description
value
必要
str

要新增至使用者代理程式的 值。

load

load(filepath)

參數

名稱 Description
filepath
必要

save

將目前的組態儲存至檔案。

save(filepath)

參數

名稱 Description
filepath
必要
str

將儲存設定的檔案路徑。

例外狀況

類型 Description
ValueError if supplied filepath cannot be written to.

屬性

enable_http_logger

user_agent

目前的使用者代理程式值。