# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
    pip install azure-identity
    pip install azure-mgmt-compute
# USAGE
    python restore_point_collection_update_minimum_set_gen.py

    Before run the sample, please set the values of the client ID, tenant ID and client secret
    of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
    AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
    https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""


def main():
    client = ComputeManagementClient(
        credential=DefaultAzureCredential(),
        subscription_id="SUBSCRIPTION_ID",
    )

    response = client.restore_point_collections.update(
        resource_group_name="rgcompute",
        restore_point_collection_name="aaaaaaaaaaaaaaaaaa",
        parameters={
            "properties": {
                "instantAccess": bool,
                "provisioningState": "str",
                "restorePointCollectionId": "str",
                "restorePoints": [
                    {
                        "id": "str",
                        "name": "str",
                        "properties": {
                            "consistencyMode": "str",
                            "excludeDisks": [{"id": "str"}],
                            "instanceView": {
                                "diskRestorePoints": [
                                    {
                                        "id": "str",
                                        "replicationStatus": {
                                            "completionPercent": 0,
                                            "status": {
                                                "code": "str",
                                                "displayStatus": "str",
                                                "level": "str",
                                                "message": "str",
                                                "time": "2020-02-20 00:00:00",
                                            },
                                        },
                                        "snapshotAccessState": "str",
                                    }
                                ],
                                "statuses": [
                                    {
                                        "code": "str",
                                        "displayStatus": "str",
                                        "level": "str",
                                        "message": "str",
                                        "time": "2020-02-20 00:00:00",
                                    }
                                ],
                            },
                            "instantAccessDurationMinutes": 0,
                            "provisioningState": "str",
                            "sourceMetadata": {
                                "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}},
                                "hardwareProfile": {
                                    "vmSize": "str",
                                    "vmSizeProperties": {"vCPUsAvailable": 0, "vCPUsPerCore": 0},
                                },
                                "hyperVGeneration": "str",
                                "licenseType": "str",
                                "location": "str",
                                "osProfile": {
                                    "adminPassword": "str",
                                    "adminUsername": "str",
                                    "allowExtensionOperations": bool,
                                    "computerName": "str",
                                    "customData": "str",
                                    "linuxConfiguration": {
                                        "disablePasswordAuthentication": bool,
                                        "enableVMAgentPlatformUpdates": bool,
                                        "patchSettings": {
                                            "assessmentMode": "str",
                                            "automaticByPlatformSettings": {
                                                "bypassPlatformSafetyChecksOnUserSchedule": bool,
                                                "rebootSetting": "str",
                                            },
                                            "patchMode": "str",
                                        },
                                        "provisionVMAgent": bool,
                                        "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]},
                                    },
                                    "requireGuestProvisionSignal": bool,
                                    "secrets": [
                                        {
                                            "sourceVault": {"id": "str"},
                                            "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}],
                                        }
                                    ],
                                    "windowsConfiguration": {
                                        "additionalUnattendContent": [
                                            {
                                                "componentName": "str",
                                                "content": "str",
                                                "passName": "str",
                                                "settingName": "str",
                                            }
                                        ],
                                        "enableAutomaticUpdates": bool,
                                        "enableVMAgentPlatformUpdates": bool,
                                        "patchSettings": {
                                            "assessmentMode": "str",
                                            "automaticByPlatformSettings": {
                                                "bypassPlatformSafetyChecksOnUserSchedule": bool,
                                                "rebootSetting": "str",
                                            },
                                            "enableHotpatching": bool,
                                            "patchMode": "str",
                                        },
                                        "provisionVMAgent": bool,
                                        "timeZone": "str",
                                        "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]},
                                    },
                                },
                                "securityProfile": {
                                    "encryptionAtHost": bool,
                                    "encryptionIdentity": {"userAssignedIdentityResourceId": "str"},
                                    "proxyAgentSettings": {
                                        "addProxyAgentExtension": bool,
                                        "enabled": bool,
                                        "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"},
                                        "keyIncarnationId": 0,
                                        "mode": "str",
                                        "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"},
                                    },
                                    "securityType": "str",
                                    "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool},
                                },
                                "storageProfile": {
                                    "dataDisks": [
                                        {
                                            "caching": "str",
                                            "diskRestorePoint": {
                                                "encryption": {"diskEncryptionSet": {"id": "str"}, "type": "str"},
                                                "id": "str",
                                                "sourceDiskRestorePoint": {"id": "str"},
                                            },
                                            "diskSizeGB": 0,
                                            "lun": 0,
                                            "managedDisk": {
                                                "diskEncryptionSet": {"id": "str"},
                                                "id": "str",
                                                "securityProfile": {
                                                    "diskEncryptionSet": {"id": "str"},
                                                    "securityEncryptionType": "str",
                                                },
                                                "storageAccountType": "str",
                                            },
                                            "name": "str",
                                            "writeAcceleratorEnabled": bool,
                                        }
                                    ],
                                    "diskControllerType": "str",
                                    "osDisk": {
                                        "caching": "str",
                                        "diskRestorePoint": {
                                            "encryption": {"diskEncryptionSet": {"id": "str"}, "type": "str"},
                                            "id": "str",
                                            "sourceDiskRestorePoint": {"id": "str"},
                                        },
                                        "diskSizeGB": 0,
                                        "encryptionSettings": {
                                            "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}},
                                            "enabled": bool,
                                            "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}},
                                        },
                                        "managedDisk": {
                                            "diskEncryptionSet": {"id": "str"},
                                            "id": "str",
                                            "securityProfile": {
                                                "diskEncryptionSet": {"id": "str"},
                                                "securityEncryptionType": "str",
                                            },
                                            "storageAccountType": "str",
                                        },
                                        "name": "str",
                                        "osType": "str",
                                        "writeAcceleratorEnabled": bool,
                                    },
                                },
                                "userData": "str",
                                "vmId": "str",
                            },
                            "sourceRestorePoint": {"id": "str"},
                            "timeCreated": "2020-02-20 00:00:00",
                        },
                        "systemData": {
                            "createdAt": "2020-02-20 00:00:00",
                            "createdBy": "str",
                            "createdByType": "str",
                            "lastModifiedAt": "2020-02-20 00:00:00",
                            "lastModifiedBy": "str",
                            "lastModifiedByType": "str",
                        },
                        "type": "str",
                    }
                ],
                "source": {"id": "str", "location": "str"},
            },
            "tags": {"str": "str"},
        },
    )
    print(response)


# x-ms-original-file: 2025-11-01/restorePointExamples/RestorePointCollection_Update_MinimumSet_Gen.json
if __name__ == "__main__":
    main()
