Snapshot Policies - Get
获取快照策略
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}?api-version=2025-09-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
account
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$ |
NetApp 帐户的名称 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
snapshot
|
path | True |
string |
快照策略的名称 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure作已成功完成。 |
|
| Other Status Codes |
意外错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 冒充您的用户帐户 |
示例
SnapshotPolicies_Get
示例请求
示例响应
{
"name": "account1/snapshotPolicy1",
"type": "Microsoft.NetApp/netAppAccounts/snapshotPolicies",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1",
"location": "eastus",
"properties": {
"dailySchedule": {
"hour": 14,
"minute": 30,
"snapshotsToKeep": 4
},
"enabled": true,
"hourlySchedule": {
"minute": 50,
"snapshotsToKeep": 2
},
"monthlySchedule": {
"daysOfMonth": "10,11,12",
"hour": 14,
"minute": 15,
"snapshotsToKeep": 5
},
"provisioningState": "Succeeded",
"weeklySchedule": {
"day": "Wednesday",
"hour": 14,
"minute": 45,
"snapshotsToKeep": 3
}
}
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Daily |
每日计划属性 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Hourly |
每小时计划属性 |
|
Monthly |
每月计划属性 |
|
Snapshot |
快照策略信息 |
|
system |
与创建和上次修改资源相关的元数据。 |
|
Weekly |
每周计划属性,在特定的一天或几天每周创建快照 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DailySchedule
每日计划属性
| 名称 | 类型 | 说明 |
|---|---|---|
| hour |
integer (int32) |
指示应拍摄快照的 UTC 时区中的小时 |
| minute |
integer (int32) |
指示应创建哪个分钟快照 |
| snapshotsToKeep |
integer (int32) |
要保留的每日快照计数 |
| usedBytes |
integer (int64) |
资源大小(以字节为单位)、卷的当前存储使用情况(以字节为单位) |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
附加信息。 |
| type |
string |
附加信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
HourlySchedule
每小时计划属性
| 名称 | 类型 | 说明 |
|---|---|---|
| minute |
integer (int32) |
指示应创建哪个分钟快照 |
| snapshotsToKeep |
integer (int32) |
要保留的每小时快照计数 |
| usedBytes |
integer (int64) |
资源大小(以字节为单位)、卷的当前存储使用情况(以字节为单位) |
MonthlySchedule
每月计划属性
| 名称 | 类型 | 说明 |
|---|---|---|
| daysOfMonth |
string |
指示应拍摄月份快照的天数。 逗号分隔字符串。 |
| hour |
integer (int32) |
指示应拍摄快照的 UTC 时区中的小时 |
| minute |
integer (int32) |
指示应创建哪个分钟快照 |
| snapshotsToKeep |
integer (int32) |
要保留的每月快照计数 |
| usedBytes |
integer (int64) |
资源大小(以字节为单位)、卷的当前存储使用情况(以字节为单位) |
SnapshotPolicy
快照策略信息
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
“如果在响应正文中提供了 etag,则也可以根据正常的 etag 约定将其作为标头提供。 实体标记用于比较同一请求资源的两个或多个实体。 HTTP/1.1 在 etag(第 14.19 节)、If-Match(第 14.24 节)、If-None-Match(第 14.26 节)和 If-Range(第 14.27 节)标头字段中使用实体标签。 |
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| location |
string |
资源所在的地理位置 |
| name |
string |
资源的名称 |
| properties.dailySchedule |
每日快照的计划 |
|
| properties.enabled |
boolean |
决定策略的属性已启用或不启用 |
| properties.hourlySchedule |
每小时快照的计划 |
|
| properties.monthlySchedule |
每月快照的计划 |
|
| properties.provisioningState |
string |
Azure 生命周期管理 |
| properties.weeklySchedule |
计划每周快照 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 例如,“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
资源上次修改的时间戳 (UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
WeeklySchedule
每周计划属性,在特定的一天或几天每周创建快照
| 名称 | 类型 | 说明 |
|---|---|---|
| day |
string |
指示应拍摄哪些工作日快照,接受以英文表示的星期几名称的逗号分隔列表 |
| hour |
integer (int32) |
指示应拍摄快照的 UTC 时区中的小时 |
| minute |
integer (int32) |
指示应创建哪个分钟快照 |
| snapshotsToKeep |
integer (int32) |
要保留的每周快照计数 |
| usedBytes |
integer (int64) |
资源大小(以字节为单位)、卷的当前存储使用情况(以字节为单位) |