Container Registries - Validate
检查容器注册表属性是否有效。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}/validate?api-version=2023-12-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
container
|
path | True |
string pattern: ^[a-z][a-z0-9-]*[a-z0-9]$ |
容器注册表的名称。 |
|
resource
|
path | True |
string |
包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
|
service
|
path | True |
string pattern: ^[a-z][a-z0-9-]*[a-z0-9]$ |
服务资源的名称。 |
|
subscription
|
path | True |
string |
获取唯一标识 azure 订阅Microsoft的订阅 ID。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| credentials | True | ContainerRegistryCredentials: |
容器注册表资源的凭据。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功。 响应描述容器注册表的验证结果。 |
|
| 202 Accepted |
接受。 响应指示容器注册表属性正在验证。 标头 Location: string |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
ContainerRegistries_Validate
示例请求
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/my-service/containerRegistries/my-container-registry/validate?api-version=2023-12-01
{
"credentials": {
"type": "BasicAuth",
"server": "myServer",
"username": "myUsername",
"password": "myPassword"
}
}
示例响应
{
"isValid": false,
"message": "Validate container registry failed. please check the properties first."
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-12-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-12-01
定义
| 名称 | 说明 |
|---|---|
|
Cloud |
服务的错误响应。 |
|
Cloud |
服务的错误响应。 |
|
Container |
容器注册表资源的基本身份验证属性。 |
|
Container |
容器注册表资源有效负载。 |
|
Container |
容器注册表的状态。 |
|
Container |
容器注册表属性的验证结果 |
CloudError
服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
服务的错误响应。 |
CloudErrorBody
服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
| details |
有关错误的其他详细信息的列表。 |
|
| message |
string |
描述错误的消息,旨在适合在用户界面中显示。 |
| target |
string |
特定错误的目标。 例如,错误属性的名称。 |
ContainerRegistryBasicCredentials
容器注册表资源的基本身份验证属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| password |
string |
容器注册表的密码。 |
| server |
string |
容器注册表的登录服务器。 |
| type |
string:
Basic |
容器注册表凭据的凭据类型。 |
| username |
string |
容器注册表的用户名。 |
ContainerRegistryProperties
容器注册表资源有效负载。
| 名称 | 类型 | 说明 |
|---|---|---|
| credentials | ContainerRegistryCredentials: |
容器注册表资源的凭据。 |
| provisioningState |
容器注册表的状态。 |
ContainerRegistryProvisioningState
容器注册表的状态。
| 值 | 说明 |
|---|---|
| Creating | |
| Updating | |
| Succeeded | |
| Failed | |
| Deleting | |
| Canceled |
ContainerRegistryValidateResult
容器注册表属性的验证结果
| 名称 | 类型 | 说明 |
|---|---|---|
| isValid |
boolean |
指示容器注册表属性是否有效 |
| message |
string |
详细的验证消息。 |