Chilkat Online Tools

DescribeSnapshots autoit Example

Amazon FSx

; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oRest = ObjCreate("Chilkat_9_5_0.Rest")
Local $bSuccess

$oAuthAws = ObjCreate("Chilkat_9_5_0.AuthAws")
$oAuthAws.AccessKey = "AWS_ACCESS_KEY"
$oAuthAws.SecretKey = "AWS_SECRET_KEY"

; Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
$oAuthAws.Region = "us-west-2"
$oAuthAws.ServiceName = "fsx"
; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
$oRest.SetAuthAws($oAuthAws)

; URL: https://fsx.us-west-2.amazonaws.com/
; Use the same region as specified above.
$bSuccess = $oRest.Connect("fsx.us-west-2.amazonaws.com",443,True,True)
If ($bSuccess <> True) Then
    ConsoleWrite("ConnectFailReason: " & $oRest.ConnectFailReason & @CRLF)
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

; The following code creates the JSON request body.
; The JSON created by this code is shown below.

; Use this online tool to generate code from sample JSON:
; Generate Code to Create JSON

$oJson = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJson.UpdateString("Filters[0].Name","string")
$oJson.UpdateString("Filters[0].Values[0]","string")
$oJson.UpdateInt("MaxResults",123)
$oJson.UpdateString("NextToken","string")
$oJson.UpdateString("SnapshotIds[0]","string")

; The JSON request body created by the above code:

; {
;   "Filters": [
;     {
;       "Name": "string",
;       "Values": [
;         "string"
;       ]
;     }
;   ],
;   "MaxResults": number,
;   "NextToken": "string",
;   "SnapshotIds": [
;     "string"
;   ]
; }

$oRest.AddHeader("Content-Type","application/x-amz-json-1.1")
$oRest.AddHeader("X-Amz-Target","AWSSimbaAPIService_v20180301.DescribeSnapshots")

$oSbRequestBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$oJson.EmitSb($oSbRequestBody)
$oSbResponseBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$bSuccess = $oRest.FullRequestSb("POST","/",$oSbRequestBody,$oSbResponseBody)
If ($bSuccess <> True) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

Local $iRespStatusCode = $oRest.ResponseStatusCode
ConsoleWrite("response status code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 200) Then
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oRest.ResponseHeader & @CRLF)
    ConsoleWrite("Response Body:" & @CRLF)
    ConsoleWrite($oSbResponseBody.GetAsString() & @CRLF)
    Exit
EndIf

$oJResp = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJResp.LoadSb($oSbResponseBody)

; The following code parses the JSON response.
; A sample JSON response is shown below the sample code.

; Use this online tool to generate parsing code from sample JSON:
; Generate Parsing Code from JSON

Local $iCreationTime
Local $sLifecycle
Local $sMessage
Local $sName
Local $sResourceARN
Local $sSnapshotId
Local $sVolumeId
Local $iJ
Local $iCount_j
Local $sAdministrativeActionType
Local $sFailureDetailsMessage
Local $iProgressPercent
Local $iRequestTime
Local $sStatus
Local $iTargetFileSystemValuesCreationTime
Local $sDNSName
Local $sFileSystemId
Local $sFileSystemType
Local $sFileSystemTypeVersion
Local $sKmsKeyId
Local $sTargetFileSystemValuesLifecycle
Local $iAutomaticBackupRetentionDays
Local $iCopyTagsToBackups
Local $sDailyAutomaticBackupStartTime
Local $sDataCompressionType
Local $sAutoImportPolicy
Local $sExportPath
Local $iImportedFileChunkSize
Local $sImportPath
Local $sDataRepositoryConfigurationLifecycle
Local $sDeploymentType
Local $sDriveCacheType
Local $sDestination
Local $sLevel
Local $sMountName
Local $iPerUnitStorageThroughput
Local $sWeeklyMaintenanceStartTime
Local $iOntapConfigurationAutomaticBackupRetentionDays
Local $sOntapConfigurationDailyAutomaticBackupStartTime
Local $sOntapConfigurationDeploymentType
Local $iIops
Local $sMode
Local $sEndpointIpAddressRange
Local $sInterclusterDNSName
Local $sManagementDNSName
Local $sPreferredSubnetId
Local $iThroughputCapacity
Local $sOntapConfigurationWeeklyMaintenanceStartTime
Local $iOpenZFSConfigurationAutomaticBackupRetentionDays
Local $iOpenZFSConfigurationCopyTagsToBackups
Local $iCopyTagsToVolumes
Local $sOpenZFSConfigurationDailyAutomaticBackupStartTime
Local $sOpenZFSConfigurationDeploymentType
Local $iDiskIopsConfigurationIops
Local $sDiskIopsConfigurationMode
Local $sRootVolumeId
Local $iOpenZFSConfigurationThroughputCapacity
Local $sOpenZFSConfigurationWeeklyMaintenanceStartTime
Local $sOwnerId
Local $sTargetFileSystemValuesResourceARN
Local $iStorageCapacity
Local $sStorageType
Local $sVpcId
Local $sActiveDirectoryId
Local $sAuditLogDestination
Local $sFileAccessAuditLogLevel
Local $sFileShareAccessAuditLogLevel
Local $iWindowsConfigurationAutomaticBackupRetentionDays
Local $iWindowsConfigurationCopyTagsToBackups
Local $sWindowsConfigurationDailyAutomaticBackupStartTime
Local $sWindowsConfigurationDeploymentType
Local $sPreferredFileServerIp
Local $sWindowsConfigurationPreferredSubnetId
Local $sRemoteAdministrationEndpoint
Local $sDomainName
Local $sFileSystemAdministratorsGroup
Local $sOrganizationalUnitDistinguishedName
Local $sUserName
Local $iWindowsConfigurationThroughputCapacity
Local $sWindowsConfigurationWeeklyMaintenanceStartTime
Local $sTargetSnapshotValues
Local $iTargetVolumeValuesCreationTime
Local $sTargetVolumeValuesFileSystemId
Local $sTargetVolumeValuesLifecycle
Local $sLifecycleTransitionReasonMessage
Local $sTargetVolumeValuesName
Local $sFlexCacheEndpointType
Local $sJunctionPath
Local $sOntapVolumeType
Local $sSecurityStyle
Local $iSizeInMegabytes
Local $iStorageEfficiencyEnabled
Local $sStorageVirtualMachineId
Local $iStorageVirtualMachineRoot
Local $iCoolingPeriod
Local $sTieringPolicyName
Local $sUUID
Local $iCopyTagsToSnapshots
Local $sOpenZFSConfigurationDataCompressionType
Local $sCopyStrategy
Local $sSnapshotARN
Local $sParentVolumeId
Local $iReadOnly
Local $iRecordSizeKiB
Local $iStorageCapacityQuotaGiB
Local $iStorageCapacityReservationGiB
Local $sVolumePath
Local $sTargetVolumeValuesResourceARN
Local $sTargetVolumeValuesVolumeId
Local $sVolumeType
Local $iK
Local $iCount_k
Local $strVal
Local $sKey
Local $sValue
Local $oJson1
Local $i1
Local $iCount_i1
Local $sClients
Local $iJ1
Local $iCount_j1
Local $iId
Local $sV_Type

Local $sNextToken = $oJResp.StringOf("NextToken")
Local $i = 0
Local $iCount_i = $oJResp.SizeOfArray("Snapshots")
While $i < $iCount_i
    $oJResp.I = $i
    $iCreationTime = $oJResp.IntOf("Snapshots[i].CreationTime")
    $sLifecycle = $oJResp.StringOf("Snapshots[i].Lifecycle")
    $sMessage = $oJResp.StringOf("Snapshots[i].LifecycleTransitionReason.Message")
    $sName = $oJResp.StringOf("Snapshots[i].Name")
    $sResourceARN = $oJResp.StringOf("Snapshots[i].ResourceARN")
    $sSnapshotId = $oJResp.StringOf("Snapshots[i].SnapshotId")
    $sVolumeId = $oJResp.StringOf("Snapshots[i].VolumeId")
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sAdministrativeActionType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].AdministrativeActionType")
        $sFailureDetailsMessage = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].FailureDetails.Message")
        $iProgressPercent = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].ProgressPercent")
        $iRequestTime = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].RequestTime")
        $sStatus = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].Status")
        $iTargetFileSystemValuesCreationTime = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.CreationTime")
        $sDNSName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.DNSName")
        $sFailureDetailsMessage = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.FailureDetails.Message")
        $sFileSystemId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.FileSystemId")
        $sFileSystemType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.FileSystemType")
        $sFileSystemTypeVersion = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.FileSystemTypeVersion")
        $sKmsKeyId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.KmsKeyId")
        $sTargetFileSystemValuesLifecycle = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.Lifecycle")
        $iAutomaticBackupRetentionDays = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.AutomaticBackupRetentionDays")
        $iCopyTagsToBackups = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.CopyTagsToBackups")
        $sDailyAutomaticBackupStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DailyAutomaticBackupStartTime")
        $sDataCompressionType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataCompressionType")
        $sAutoImportPolicy = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy")
        $sExportPath = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ExportPath")
        $sFailureDetailsMessage = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message")
        $iImportedFileChunkSize = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize")
        $sImportPath = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportPath")
        $sDataRepositoryConfigurationLifecycle = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.Lifecycle")
        $sDeploymentType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DeploymentType")
        $sDriveCacheType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.DriveCacheType")
        $sDestination = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Destination")
        $sLevel = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Level")
        $sMountName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.MountName")
        $iPerUnitStorageThroughput = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.PerUnitStorageThroughput")
        $sWeeklyMaintenanceStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.LustreConfiguration.WeeklyMaintenanceStartTime")
        $iOntapConfigurationAutomaticBackupRetentionDays = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.AutomaticBackupRetentionDays")
        $sOntapConfigurationDailyAutomaticBackupStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.DailyAutomaticBackupStartTime")
        $sOntapConfigurationDeploymentType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.DeploymentType")
        $iIops = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Iops")
        $sMode = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Mode")
        $sEndpointIpAddressRange = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.EndpointIpAddressRange")
        $sInterclusterDNSName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.DNSName")
        $sManagementDNSName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.DNSName")
        $sPreferredSubnetId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.PreferredSubnetId")
        $iThroughputCapacity = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.ThroughputCapacity")
        $sOntapConfigurationWeeklyMaintenanceStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.WeeklyMaintenanceStartTime")
        $iOpenZFSConfigurationAutomaticBackupRetentionDays = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.AutomaticBackupRetentionDays")
        $iOpenZFSConfigurationCopyTagsToBackups = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToBackups")
        $iCopyTagsToVolumes = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToVolumes")
        $sOpenZFSConfigurationDailyAutomaticBackupStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.DailyAutomaticBackupStartTime")
        $sOpenZFSConfigurationDeploymentType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.DeploymentType")
        $iDiskIopsConfigurationIops = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Iops")
        $sDiskIopsConfigurationMode = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Mode")
        $sRootVolumeId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.RootVolumeId")
        $iOpenZFSConfigurationThroughputCapacity = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.ThroughputCapacity")
        $sOpenZFSConfigurationWeeklyMaintenanceStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OpenZFSConfiguration.WeeklyMaintenanceStartTime")
        $sOwnerId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OwnerId")
        $sTargetFileSystemValuesResourceARN = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.ResourceARN")
        $iStorageCapacity = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.StorageCapacity")
        $sStorageType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.StorageType")
        $sVpcId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.VpcId")
        $sActiveDirectoryId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.ActiveDirectoryId")
        $sAuditLogDestination = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination")
        $sFileAccessAuditLogLevel = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel")
        $sFileShareAccessAuditLogLevel = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel")
        $iWindowsConfigurationAutomaticBackupRetentionDays = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.AutomaticBackupRetentionDays")
        $iWindowsConfigurationCopyTagsToBackups = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.CopyTagsToBackups")
        $sWindowsConfigurationDailyAutomaticBackupStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.DailyAutomaticBackupStartTime")
        $sWindowsConfigurationDeploymentType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.DeploymentType")
        $sPreferredFileServerIp = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.PreferredFileServerIp")
        $sWindowsConfigurationPreferredSubnetId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.PreferredSubnetId")
        $sRemoteAdministrationEndpoint = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.RemoteAdministrationEndpoint")
        $sDomainName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName")
        $sFileSystemAdministratorsGroup = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup")
        $sOrganizationalUnitDistinguishedName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName")
        $sUserName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName")
        $iWindowsConfigurationThroughputCapacity = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.ThroughputCapacity")
        $sWindowsConfigurationWeeklyMaintenanceStartTime = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.WeeklyMaintenanceStartTime")
        $sTargetSnapshotValues = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetSnapshotValues")
        $iTargetVolumeValuesCreationTime = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.CreationTime")
        $sTargetVolumeValuesFileSystemId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.FileSystemId")
        $sTargetVolumeValuesLifecycle = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.Lifecycle")
        $sLifecycleTransitionReasonMessage = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.LifecycleTransitionReason.Message")
        $sTargetVolumeValuesName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.Name")
        $sFlexCacheEndpointType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType")
        $sJunctionPath = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.JunctionPath")
        $sOntapVolumeType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.OntapVolumeType")
        $sSecurityStyle = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.SecurityStyle")
        $iSizeInMegabytes = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.SizeInMegabytes")
        $iStorageEfficiencyEnabled = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled")
        $sStorageVirtualMachineId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId")
        $iStorageVirtualMachineRoot = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot")
        $iCoolingPeriod = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod")
        $sTieringPolicyName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name")
        $sUUID = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OntapConfiguration.UUID")
        $iCopyTagsToSnapshots = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots")
        $sOpenZFSConfigurationDataCompressionType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType")
        $sCopyStrategy = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy")
        $sSnapshotARN = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN")
        $sParentVolumeId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId")
        $iReadOnly = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.ReadOnly")
        $iRecordSizeKiB = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB")
        $iStorageCapacityQuotaGiB = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB")
        $iStorageCapacityReservationGiB = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB")
        $sVolumePath = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.VolumePath")
        $sTargetVolumeValuesResourceARN = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.ResourceARN")
        $sTargetVolumeValuesVolumeId = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.VolumeId")
        $sVolumeType = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.VolumeType")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.AdministrativeActions")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.AdministrativeActions[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.NetworkInterfaceIds")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.NetworkInterfaceIds[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.RouteTableIds")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.OntapConfiguration.RouteTableIds[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.SubnetIds")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.SubnetIds[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.Tags")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sKey = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.Tags[k].Key")
            $sValue = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.Tags[k].Value")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.Aliases")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sLifecycle = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.Aliases[k].Lifecycle")
            $sName = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.Aliases[k].Name")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.AdministrativeActions")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.AdministrativeActions[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.NfsExports")
        While $iK < $iCount_k
            $oJResp.K = $iK

            $oJson1 = $oJResp.ObjectOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.NfsExports[k]")
            $i1 = 0
            $iCount_i1 = $oJson1.SizeOfArray("ClientConfigurations")
            While $i1 < $iCount_i1
                $oJson1.I = $i1
                $sClients = $oJson1.StringOf("ClientConfigurations[i].Clients")
                $iJ1 = 0
                $iCount_j1 = $oJson1.SizeOfArray("ClientConfigurations[i].Options")
                While $iJ1 < $iCount_j1
                    $oJson1.J = $iJ1
                    $strVal = $oJson1.StringOf("ClientConfigurations[i].Options[j]")
                    $iJ1 = $iJ1 + 1
                Wend
                $i1 = $i1 + 1
            Wend

            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $iId = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[k].Id")
            $iStorageCapacityQuotaGiB = $oJResp.IntOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[k].StorageCapacityQuotaGiB")
            $sV_Type = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[k].Type")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.Tags")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sKey = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.Tags[k].Key")
            $sValue = $oJResp.StringOf("Snapshots[i].AdministrativeActions[j].TargetVolumeValues.Tags[k].Value")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("Snapshots[i].Tags")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sKey = $oJResp.StringOf("Snapshots[i].Tags[j].Key")
        $sValue = $oJResp.StringOf("Snapshots[i].Tags[j].Value")
        $iJ = $iJ + 1
    Wend
    $i = $i + 1
Wend

; A sample JSON response body parsed by the above code:

; {
;   "NextToken": "string",
;   "Snapshots": [
;     {
;       "AdministrativeActions": [
;         {
;           "AdministrativeActionType": "string",
;           "FailureDetails": {
;             "Message": "string"
;           },
;           "ProgressPercent": number,
;           "RequestTime": number,
;           "Status": "string",
;           "TargetFileSystemValues": {
;             "AdministrativeActions": [
;               "AdministrativeAction"
;             ],
;             "CreationTime": number,
;             "DNSName": "string",
;             "FailureDetails": {
;               "Message": "string"
;             },
;             "FileSystemId": "string",
;             "FileSystemType": "string",
;             "FileSystemTypeVersion": "string",
;             "KmsKeyId": "string",
;             "Lifecycle": "string",
;             "LustreConfiguration": {
;               "AutomaticBackupRetentionDays": number,
;               "CopyTagsToBackups": boolean,
;               "DailyAutomaticBackupStartTime": "string",
;               "DataCompressionType": "string",
;               "DataRepositoryConfiguration": {
;                 "AutoImportPolicy": "string",
;                 "ExportPath": "string",
;                 "FailureDetails": {
;                   "Message": "string"
;                 },
;                 "ImportedFileChunkSize": number,
;                 "ImportPath": "string",
;                 "Lifecycle": "string"
;               },
;               "DeploymentType": "string",
;               "DriveCacheType": "string",
;               "LogConfiguration": {
;                 "Destination": "string",
;                 "Level": "string"
;               },
;               "MountName": "string",
;               "PerUnitStorageThroughput": number,
;               "WeeklyMaintenanceStartTime": "string"
;             },
;             "NetworkInterfaceIds": [
;               "string"
;             ],
;             "OntapConfiguration": {
;               "AutomaticBackupRetentionDays": number,
;               "DailyAutomaticBackupStartTime": "string",
;               "DeploymentType": "string",
;               "DiskIopsConfiguration": {
;                 "Iops": number,
;                 "Mode": "string"
;               },
;               "EndpointIpAddressRange": "string",
;               "Endpoints": {
;                 "Intercluster": {
;                   "DNSName": "string",
;                   "IpAddresses": [
;                     "string"
;                   ]
;                 },
;                 "Management": {
;                   "DNSName": "string",
;                   "IpAddresses": [
;                     "string"
;                   ]
;                 }
;               },
;               "PreferredSubnetId": "string",
;               "RouteTableIds": [
;                 "string"
;               ],
;               "ThroughputCapacity": number,
;               "WeeklyMaintenanceStartTime": "string"
;             },
;             "OpenZFSConfiguration": {
;               "AutomaticBackupRetentionDays": number,
;               "CopyTagsToBackups": boolean,
;               "CopyTagsToVolumes": boolean,
;               "DailyAutomaticBackupStartTime": "string",
;               "DeploymentType": "string",
;               "DiskIopsConfiguration": {
;                 "Iops": number,
;                 "Mode": "string"
;               },
;               "RootVolumeId": "string",
;               "ThroughputCapacity": number,
;               "WeeklyMaintenanceStartTime": "string"
;             },
;             "OwnerId": "string",
;             "ResourceARN": "string",
;             "StorageCapacity": number,
;             "StorageType": "string",
;             "SubnetIds": [
;               "string"
;             ],
;             "Tags": [
;               {
;                 "Key": "string",
;                 "Value": "string"
;               }
;             ],
;             "VpcId": "string",
;             "WindowsConfiguration": {
;               "ActiveDirectoryId": "string",
;               "Aliases": [
;                 {
;                   "Lifecycle": "string",
;                   "Name": "string"
;                 }
;               ],
;               "AuditLogConfiguration": {
;                 "AuditLogDestination": "string",
;                 "FileAccessAuditLogLevel": "string",
;                 "FileShareAccessAuditLogLevel": "string"
;               },
;               "AutomaticBackupRetentionDays": number,
;               "CopyTagsToBackups": boolean,
;               "DailyAutomaticBackupStartTime": "string",
;               "DeploymentType": "string",
;               "MaintenanceOperationsInProgress": [
;                 "string"
;               ],
;               "PreferredFileServerIp": "string",
;               "PreferredSubnetId": "string",
;               "RemoteAdministrationEndpoint": "string",
;               "SelfManagedActiveDirectoryConfiguration": {
;                 "DnsIps": [
;                   "string"
;                 ],
;                 "DomainName": "string",
;                 "FileSystemAdministratorsGroup": "string",
;                 "OrganizationalUnitDistinguishedName": "string",
;                 "UserName": "string"
;               },
;               "ThroughputCapacity": number,
;               "WeeklyMaintenanceStartTime": "string"
;             }
;           },
;           "TargetSnapshotValues": "Snapshot",
;           "TargetVolumeValues": {
;             "AdministrativeActions": [
;               "AdministrativeAction"
;             ],
;             "CreationTime": number,
;             "FileSystemId": "string",
;             "Lifecycle": "string",
;             "LifecycleTransitionReason": {
;               "Message": "string"
;             },
;             "Name": "string",
;             "OntapConfiguration": {
;               "FlexCacheEndpointType": "string",
;               "JunctionPath": "string",
;               "OntapVolumeType": "string",
;               "SecurityStyle": "string",
;               "SizeInMegabytes": number,
;               "StorageEfficiencyEnabled": boolean,
;               "StorageVirtualMachineId": "string",
;               "StorageVirtualMachineRoot": boolean,
;               "TieringPolicy": {
;                 "CoolingPeriod": number,
;                 "Name": "string"
;               },
;               "UUID": "string"
;             },
;             "OpenZFSConfiguration": {
;               "CopyTagsToSnapshots": boolean,
;               "DataCompressionType": "string",
;               "NfsExports": [
;                 {
;                   "ClientConfigurations": [
;                     {
;                       "Clients": "string",
;                       "Options": [
;                         "string"
;                       ]
;                     }
;                   ]
;                 }
;               ],
;               "OriginSnapshot": {
;                 "CopyStrategy": "string",
;                 "SnapshotARN": "string"
;               },
;               "ParentVolumeId": "string",
;               "ReadOnly": boolean,
;               "RecordSizeKiB": number,
;               "StorageCapacityQuotaGiB": number,
;               "StorageCapacityReservationGiB": number,
;               "UserAndGroupQuotas": [
;                 {
;                   "Id": number,
;                   "StorageCapacityQuotaGiB": number,
;                   "Type": "string"
;                 }
;               ],
;               "VolumePath": "string"
;             },
;             "ResourceARN": "string",
;             "Tags": [
;               {
;                 "Key": "string",
;                 "Value": "string"
;               }
;             ],
;             "VolumeId": "string",
;             "VolumeType": "string"
;           }
;         }
;       ],
;       "CreationTime": number,
;       "Lifecycle": "string",
;       "LifecycleTransitionReason": {
;         "Message": "string"
;       },
;       "Name": "string",
;       "ResourceARN": "string",
;       "SnapshotId": "string",
;       "Tags": [
;         {
;           "Key": "string",
;           "Value": "string"
;         }
;       ],
;       "VolumeId": "string"
;     }
;   ]
; }