Snapshot Policies - Update

Patch a snapshot policy

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}?api-version=2024-07-01

URI Parameters

Name In Required Type Description
accountName
path True

string

The name of the NetApp account

Regex pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,127}$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

snapshotPolicyName
path True

string

The name of the snapshot policy

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
location

string

Resource location

properties.dailySchedule

dailySchedule

dailySchedule
Schedule for daily snapshots

properties.enabled

boolean

The property to decide policy is enabled or not

properties.hourlySchedule

hourlySchedule

hourlySchedule
Schedule for hourly snapshots

properties.monthlySchedule

monthlySchedule

monthlySchedule
Schedule for monthly snapshots

properties.weeklySchedule

weeklySchedule

weeklySchedule
Schedule for weekly snapshots

tags

object

Resource tags

Responses

Name Type Description
200 OK

snapshotPolicy

OK

202 Accepted

snapshotPolicy

Accepted -- Create or update request accepted; operation will complete asynchronously

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

SnapshotPolicies_Update

Sample request

PATCH https://management.azure.com/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicyName?api-version=2024-07-01

{
  "location": "eastus",
  "properties": {
    "enabled": true,
    "hourlySchedule": {
      "snapshotsToKeep": 2,
      "minute": 50
    },
    "dailySchedule": {
      "snapshotsToKeep": 4,
      "hour": 14,
      "minute": 30
    },
    "weeklySchedule": {
      "snapshotsToKeep": 3,
      "day": "Wednesday",
      "hour": 14,
      "minute": 45
    },
    "monthlySchedule": {
      "snapshotsToKeep": 5,
      "daysOfMonth": "10,11,12",
      "hour": 14,
      "minute": 15
    }
  }
}

Sample response

{
  "id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1",
  "name": "account1/snapshotPolicy1",
  "type": "Microsoft.NetApp/netAppAccounts/snapshotPolicies",
  "location": "eastus",
  "properties": {
    "enabled": true,
    "hourlySchedule": {
      "snapshotsToKeep": 2,
      "minute": 50
    },
    "dailySchedule": {
      "snapshotsToKeep": 4,
      "hour": 14,
      "minute": 30
    },
    "weeklySchedule": {
      "snapshotsToKeep": 3,
      "day": "Wednesday",
      "hour": 14,
      "minute": 45
    },
    "monthlySchedule": {
      "snapshotsToKeep": 5,
      "daysOfMonth": "10,11,12",
      "hour": 14,
      "minute": 15
    },
    "provisioningState": "Succeeded"
  }
}
Location: https://management.azure.com/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/providers/Microsoft.NetApp/locations/eastus/operationResults/18c499e1-2a3c-441c-950e-4b456c991c18?api-version=2024-07-01&operationResultResponseType=Location
{
  "id": "/subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1",
  "name": "account1/snapshotPolicy1",
  "type": "Microsoft.NetApp/netAppAccounts/snapshotPolicies",
  "location": "eastus",
  "properties": {
    "enabled": true,
    "hourlySchedule": {
      "snapshotsToKeep": 2,
      "minute": 50
    },
    "dailySchedule": {
      "snapshotsToKeep": 4,
      "hour": 14,
      "minute": 30
    },
    "weeklySchedule": {
      "snapshotsToKeep": 3,
      "day": "Wednesday",
      "hour": 14,
      "minute": 45
    },
    "monthlySchedule": {
      "snapshotsToKeep": 5,
      "daysOfMonth": "10,11,12",
      "hour": 14,
      "minute": 15
    },
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

dailySchedule

Daily Schedule properties

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

hourlySchedule

Hourly Schedule properties

monthlySchedule

Monthly Schedule properties

snapshotPolicy

Snapshot policy information

snapshotPolicyPatch

Snapshot policy Details for create and update

systemData

Metadata pertaining to creation and last modification of the resource.

weeklySchedule

Weekly Schedule properties, make a snapshot every week at a specific day or days

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

dailySchedule

Daily Schedule properties

Name Type Description
hour

integer

Indicates which hour in UTC timezone a snapshot should be taken

minute

integer

Indicates which minute snapshot should be taken

snapshotsToKeep

integer

Daily snapshot count to keep

usedBytes

integer

Resource size in bytes, current storage usage for the volume in bytes

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

hourlySchedule

Hourly Schedule properties

Name Type Description
minute

integer

Indicates which minute snapshot should be taken

snapshotsToKeep

integer

Hourly snapshot count to keep

usedBytes

integer

Resource size in bytes, current storage usage for the volume in bytes

monthlySchedule

Monthly Schedule properties

Name Type Description
daysOfMonth

string

Indicates which days of the month snapshot should be taken. A comma delimited string.

hour

integer

Indicates which hour in UTC timezone a snapshot should be taken

minute

integer

Indicates which minute snapshot should be taken

snapshotsToKeep

integer

Monthly snapshot count to keep

usedBytes

integer

Resource size in bytes, current storage usage for the volume in bytes

snapshotPolicy

Snapshot policy information

Name Type Description
etag

string

A unique read-only string that changes whenever the resource is updated.

id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.dailySchedule

dailySchedule

dailySchedule
Schedule for daily snapshots

properties.enabled

boolean

The property to decide policy is enabled or not

properties.hourlySchedule

hourlySchedule

hourlySchedule
Schedule for hourly snapshots

properties.monthlySchedule

monthlySchedule

monthlySchedule
Schedule for monthly snapshots

properties.provisioningState

string

Azure lifecycle management

properties.weeklySchedule

weeklySchedule

weeklySchedule
Schedule for weekly snapshots

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

snapshotPolicyPatch

Snapshot policy Details for create and update

Name Type Description
id

string

Resource Id

location

string

Resource location

name

string

Resource name

properties.dailySchedule

dailySchedule

dailySchedule
Schedule for daily snapshots

properties.enabled

boolean

The property to decide policy is enabled or not

properties.hourlySchedule

hourlySchedule

hourlySchedule
Schedule for hourly snapshots

properties.monthlySchedule

monthlySchedule

monthlySchedule
Schedule for monthly snapshots

properties.provisioningState

string

Azure lifecycle management

properties.weeklySchedule

weeklySchedule

weeklySchedule
Schedule for weekly snapshots

tags

object

Resource tags

type

string

Resource type

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

weeklySchedule

Weekly Schedule properties, make a snapshot every week at a specific day or days

Name Type Description
day

string

Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english

hour

integer

Indicates which hour in UTC timezone a snapshot should be taken

minute

integer

Indicates which minute snapshot should be taken

snapshotsToKeep

integer

Weekly snapshot count to keep

usedBytes

integer

Resource size in bytes, current storage usage for the volume in bytes