Gallery Applications - Create Or Update
创建或更新库应用程序定义。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}?api-version=2024-03-03
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
gallery
|
path | True |
string |
要检索的库应用程序定义的名称。 |
|
gallery
|
path | True |
string |
共享映像库的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| location | True |
string |
资源所在的地理位置 |
| properties.supportedOSType | True |
此属性允许指定应用程序为其构建的 OS 支持的类型。 可能的值包括:Windows、Linux。 |
|
| properties.customActions |
可以使用此库应用程序中的所有库应用程序版本执行的自定义操作列表。 |
||
| properties.description |
string |
此库应用程序定义资源的说明。 此属性可更新。 |
|
| properties.endOfLifeDate |
string (date-time) |
库应用程序定义的生命周期结束日期。 此属性可用于解除授权目的。 此属性可更新。 |
|
| properties.eula |
string |
库应用程序定义的 Eula 协议。 |
|
| properties.privacyStatementUri |
string |
隐私声明 URI。 |
|
| properties.releaseNoteUri |
string |
发行说明 URI。 |
|
| tags |
object |
资源标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
资源“GalleryApplication”更新作成功 |
|
| 201 Created |
资源“GalleryApplication”创建作成功 标头
|
|
| 202 Accepted |
已接受请求进行处理,但尚未完成处理。 标头
|
|
| Other Status Codes |
意外错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Create or update a simple gallery Application.
示例请求
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName?api-version=2024-03-03
{
"location": "West US",
"properties": {
"description": "This is the gallery application description.",
"eula": "This is the gallery application EULA.",
"privacyStatementUri": "myPrivacyStatementUri}",
"releaseNoteUri": "myReleaseNoteUri",
"supportedOSType": "Windows",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
}
}
示例响应
{
"properties": {
"description": "This is the gallery application description.",
"eula": "This is the gallery application EULA.",
"privacyStatementUri": "myPrivacyStatementUri}",
"releaseNoteUri": "myReleaseNoteUri",
"supportedOSType": "Windows",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"location": "West US",
"name": "myGalleryApplicationName",
"type": "Microsoft.Compute/galleries",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName"
}
{
"properties": {
"description": "This is the gallery application description.",
"eula": "This is the gallery application EULA.",
"privacyStatementUri": "myPrivacyStatementUri}",
"releaseNoteUri": "myReleaseNoteUri",
"supportedOSType": "Windows",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"location": "West US",
"name": "myGalleryApplicationName",
"type": "Microsoft.Compute/galleries",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName"
}
{
"properties": {
"description": "This is the gallery application description.",
"eula": "This is the gallery application EULA.",
"privacyStatementUri": "myPrivacyStatementUri}",
"releaseNoteUri": "myReleaseNoteUri",
"supportedOSType": "Windows",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"location": "West US",
"name": "myGalleryApplicationName",
"type": "Microsoft.Compute/galleries",
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName"
}
定义
| 名称 | 说明 |
|---|---|
|
Api |
API 错误。 |
|
Api |
Api 错误库。 |
|
Cloud |
来自计算服务的错误响应。 |
|
created |
创建资源的标识的类型。 |
|
Gallery |
指定有关要创建或更新的库应用程序定义的信息。 |
|
Gallery |
可以使用库应用程序版本执行的自定义作。 |
|
Gallery |
可以传递给库应用程序版本的自定义作的参数的定义。 |
|
Gallery |
指定自定义操作参数的类型。 可能的值包括:String、ConfigurationDataBlob 或 LogOutputBlob |
|
Inner |
内部错误详细信息。 |
|
Operating |
此属性允许指定应用程序为其构建的 OS 支持的类型。 可能的值包括:Windows、Linux。 |
|
system |
与创建和上次修改资源相关的元数据。 |
ApiError
API 错误。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| details |
Api 错误详细信息 |
|
| innererror |
Api 内部错误 |
|
| message |
string |
错误消息。 |
| target |
string |
特定错误的目标。 |
ApiErrorBase
Api 错误库。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| message |
string |
错误消息。 |
| target |
string |
特定错误的目标。 |
CloudError
来自计算服务的错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
API 错误。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
GalleryApplication
指定有关要创建或更新的库应用程序定义的信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.customActions |
可以使用此库应用程序中的所有库应用程序版本执行的自定义操作列表。 |
|
| properties.description |
string |
此库应用程序定义资源的说明。 此属性可更新。 |
| properties.endOfLifeDate |
string (date-time) |
库应用程序定义的生命周期结束日期。 此属性可用于解除授权目的。 此属性可更新。 |
| properties.eula |
string |
库应用程序定义的 Eula 协议。 |
| properties.privacyStatementUri |
string |
隐私声明 URI。 |
| properties.releaseNoteUri |
string |
发行说明 URI。 |
| properties.supportedOSType |
此属性允许指定应用程序为其构建的 OS 支持的类型。 可能的值包括:Windows、Linux。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
GalleryApplicationCustomAction
可以使用库应用程序版本执行的自定义作。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
帮助用户了解此自定义操作的作用的说明。 |
| name |
string |
自定义操作的名称。 库应用程序版本内必须是唯一的。 |
| parameters |
此自定义操作使用的参数 |
|
| script |
string |
执行此自定义操作时要运行的脚本。 |
GalleryApplicationCustomActionParameter
可以传递给库应用程序版本的自定义作的参数的定义。
| 名称 | 类型 | 说明 |
|---|---|---|
| defaultValue |
string |
参数的默认值。 仅适用于字符串类型 |
| description |
string |
帮助用户了解此参数的含义的说明 |
| name |
string |
自定义操作的名称。 库应用程序版本内必须是唯一的。 |
| required |
boolean |
指示运行自定义操作时是否必须传递此参数。 |
| type |
指定自定义操作参数的类型。 可能的值包括:String、ConfigurationDataBlob 或 LogOutputBlob |
GalleryApplicationCustomActionParameterType
指定自定义操作参数的类型。 可能的值包括:String、ConfigurationDataBlob 或 LogOutputBlob
| 值 | 说明 |
|---|---|
| String | |
| ConfigurationDataBlob | |
| LogOutputBlob |
InnerError
内部错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| errordetail |
string |
内部错误消息或异常转储。 |
| exceptiontype |
string |
异常类型。 |
OperatingSystemTypes
此属性允许指定应用程序为其构建的 OS 支持的类型。 可能的值包括:Windows、Linux。
| 值 | 说明 |
|---|---|
| Windows | |
| Linux |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |