Container Apps - Get Auth Token
取得容器應用程式的驗證令牌
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken?api-version=2023-08-01-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
container
|
path | True |
string |
容器應用程式的名稱。 |
resource
|
path | True |
string |
資源群組的名稱。 名稱不區分大小寫。 |
subscription
|
path | True |
string |
目標訂用帳戶的標識碼。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
|
404 Not Found |
找不到。 |
|
Other Status Codes |
常見的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Get Container App Auth Token
範例要求
POST https://management.azure.com/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerapp0/getAuthtoken?api-version=2023-08-01-preview
範例回覆
{
"id": "/subscriptions/651f8027-33e8-4ec4-97b4-f6e9f3dc8744/resourceGroups/rg/providers/Microsoft.App/containerApps/testcontainerapp0",
"name": "testcontainerapp0",
"type": "Microsoft.App/containerApps/accesstoken",
"location": "East US",
"properties": {
"token": "testToken",
"expires": "2022-07-14T19:22:50.3080223Z"
}
}
定義
名稱 | Description |
---|---|
Container |
容器應用程式驗證令牌。 |
created |
建立資源的身分識別類型。 |
Default |
App Service 錯誤回應。 |
Details |
詳細數據或錯誤 |
Error |
錯誤模型。 |
system |
與建立和上次修改資源相關的元數據。 |
ContainerAppAuthToken
容器應用程式驗證令牌。
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
location |
string |
資源所在的地理位置 |
name |
string |
資源的名稱 |
properties.expires |
string |
令牌到期日。 |
properties.token |
string |
驗證令牌值。 |
systemData |
Azure Resource Manager 包含 createdBy 和 modifiedBy 資訊的中繼資料。 |
|
tags |
object |
資源標籤。 |
type |
string |
資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
createdByType
建立資源的身分識別類型。
名稱 | 類型 | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DefaultErrorResponse
App Service 錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤模型。 |
Details
詳細數據或錯誤
名稱 | 類型 | Description |
---|---|---|
code |
string |
標準化字串,以程序設計方式識別錯誤。 |
message |
string |
詳細的錯誤描述和偵錯資訊。 |
target |
string |
詳細的錯誤描述和偵錯資訊。 |
Error
錯誤模型。
名稱 | 類型 | Description |
---|---|---|
code |
string |
標準化字串,以程序設計方式識別錯誤。 |
details |
Details[] |
詳細數據或錯誤 |
innererror |
string |
偵錯錯誤的詳細資訊。 |
message |
string |
詳細的錯誤描述和偵錯資訊。 |
target |
string |
詳細的錯誤描述和偵錯資訊。 |
systemData
與建立和上次修改資源相關的元數據。
名稱 | 類型 | Description |
---|---|---|
createdAt |
string |
資源建立的時間戳 (UTC) 。 |
createdBy |
string |
建立資源的身分識別。 |
createdByType |
建立資源的身分識別類型。 |
|
lastModifiedAt |
string |
上次修改的資源時間戳 (UTC) |
lastModifiedBy |
string |
上次修改資源的身分識別。 |
lastModifiedByType |
上次修改資源的身分識別類型。 |