更新 mobileAppContentFile

命名空间:microsoft.graph

注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证

更新 mobileAppContentFile 对象的属性。

此 API 可用于以下国家级云部署

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国

权限

要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) DeviceManagementApps.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序 DeviceManagementApps.ReadWrite.All

HTTP 请求

PATCH /deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files/{mobileAppContentFileId}

请求标头

标头
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权
接受 application/json

请求正文

在请求正文中,提供 mobileAppContentFile 对象的 JSON 表示形式。

下表显示了创建 mobileAppContentFile 时所需的属性。

属性 类型 说明
azureStorageUri String 指示文件上传到的 Azure 存储 URI。 在收到有效的 mobileAppContentFile 时由服务创建。 此为只读属性。 此属性是只读的。
isCommitted Boolean 指示文件是否已提交的值。 已提交的应用内容文件已由 Intune 服务完全上传和验证。 TRUE 表示应用内容文件已提交,FALSE 表示未提交应用内容文件。 默认为 FALSE。 此为只读属性。 此属性是只读的。
id String 此 mobileAppContentFile 的唯一标识符。 此 ID 是在创建 mobileAppContentFile 期间分配的。 此为只读属性。 此属性是只读的。
createdDateTime DateTimeOffset 以 ISO 8601 格式指示与应用内容文件关联的创建日期和时间。 例如,2014 年 1 月 1 日午夜 (UTC) 如下所示:“2014-01-01T00:00:00Z”。 此为只读属性。 此属性是只读的。
name String 指示文件的名称。
size Int64 加密前的文件大小。 若要弃用,请改用 sizeInBytes 属性。
sizeEncrypted Int64 加密后的文件大小。 若要弃用,请改用 sizeEncryptedInBytes 属性。
sizeInBytes Int64 指示文件的原始大小(以字节为单位)。 有效值 0 到 9.22337203685478E+18
sizeEncryptedInBytes Int64 指示加密后文件的大小(以字节为单位)。 有效值 0 到 9.22337203685478E+18
azureStorageUriExpirationDateTime DateTimeOffset 以 ISO 8601 格式指示 Azure 存储 URI 过期的日期和时间。 例如,2014 年 1 月 1 日午夜 (UTC) 如下所示:“2014-01-01T00:00:00Z”。 此为只读属性。 此属性是只读的。
manifest 二进制 指示包含文件元数据的清单信息。
uploadState mobileAppContentFileUploadState 指示当前上传请求的状态。 可能的值包括:success、transientError、error、unknown、azureStorageUriRequestSuccess、azureStorageUriRequestPending、 azureStorageUriRequestFailed、azureStorageUriRequestTimedOut、azureStorageUriRenewalSuccess、azureStorageUriRenewalPending、azureStorageUriRenewalFailed、azureStorageUriRenewalTimedOut、commitFileSuccess、commitFilePending、commitFileFailed、commitFileTimedOut。 默认值为 success。 此属性是只读的。 可取值为:successtransientErrorerrorunknownazureStorageUriRequestSuccessazureStorageUriRequestPendingazureStorageUriRequestFailedazureStorageUriRequestTimedOutazureStorageUriRenewalSuccessazureStorageUriRenewalPendingazureStorageUriRenewalFailedazureStorageUriRenewalTimedOutcommitFileSuccesscommitFilePendingcommitFileFailedcommitFileTimedOut
isDependency 布尔值 指示此内容文件是否是main内容文件的依赖项。 TRUE 表示内容文件是依赖项,FALSE 表示内容文件不是依赖项,并且是main内容文件。 默认为 FALSE。

响应

如果成功,此方法将在响应正文中返回 200 OK 响应代码和更新的 mobileAppContentFile 对象。

示例

请求

下面是一个请求示例。

PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files/{mobileAppContentFileId}
Content-type: application/json
Content-length: 419

{
  "@odata.type": "#microsoft.graph.mobileAppContentFile",
  "azureStorageUri": "Azure Storage Uri value",
  "isCommitted": true,
  "name": "Name value",
  "size": 4,
  "sizeEncrypted": 13,
  "azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
  "manifest": "bWFuaWZlc3Q=",
  "uploadState": "transientError",
  "isDependency": true
}

响应

下面是一个响应示例。 注意:为简洁起见,可能会截断此处显示的响应对象。 将从实际调用中返回所有属性。

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 527

{
  "@odata.type": "#microsoft.graph.mobileAppContentFile",
  "azureStorageUri": "Azure Storage Uri value",
  "isCommitted": true,
  "id": "eab2e29b-e29b-eab2-9be2-b2ea9be2b2ea",
  "createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
  "name": "Name value",
  "size": 4,
  "sizeEncrypted": 13,
  "sizeInBytes": 11,
  "sizeEncryptedInBytes": 4,
  "azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
  "manifest": "bWFuaWZlc3Q=",
  "uploadState": "transientError",
  "isDependency": true
}