Chilkat Online Tools

CreateVolumeFromBackup 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("BackupId","string")
$oJson.UpdateString("ClientRequestToken","string")
$oJson.UpdateString("Name","string")
$oJson.UpdateString("OntapConfiguration.JunctionPath","string")
$oJson.UpdateString("OntapConfiguration.SecurityStyle","string")
$oJson.UpdateInt("OntapConfiguration.SizeInMegabytes",123)
$oJson.UpdateInt("OntapConfiguration.StorageEfficiencyEnabled",123)
$oJson.UpdateString("OntapConfiguration.StorageVirtualMachineId","string")
$oJson.UpdateInt("OntapConfiguration.TieringPolicy.CoolingPeriod",123)
$oJson.UpdateString("OntapConfiguration.TieringPolicy.Name","string")
$oJson.UpdateString("Tags[0].Key","string")
$oJson.UpdateString("Tags[0].Value","string")

; The JSON request body created by the above code:

; {
;   "BackupId": "string",
;   "ClientRequestToken": "string",
;   "Name": "string",
;   "OntapConfiguration": {
;     "JunctionPath": "string",
;     "SecurityStyle": "string",
;     "SizeInMegabytes": number,
;     "StorageEfficiencyEnabled": boolean,
;     "StorageVirtualMachineId": "string",
;     "TieringPolicy": {
;       "CoolingPeriod": number,
;       "Name": "string"
;     }
;   },
;   "Tags": [
;     {
;       "Key": "string",
;       "Value": "string"
;     }
;   ]
; }

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

$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 $sAdministrativeActionType
Local $sFailureDetailsMessage
Local $iProgressPercent
Local $iRequestTime
Local $sStatus
Local $iTargetFileSystemValuesCreationTime
Local $sDNSName
Local $sTargetFileSystemValuesFileSystemId
Local $sFileSystemType
Local $sFileSystemTypeVersion
Local $sKmsKeyId
Local $sTargetFileSystemValuesLifecycle
Local $iAutomaticBackupRetentionDays
Local $iCopyTagsToBackups
Local $sDailyAutomaticBackupStartTime
Local $sLustreConfigurationDataCompressionType
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 $iTargetSnapshotValuesCreationTime
Local $sTargetSnapshotValuesLifecycle
Local $sLifecycleTransitionReasonMessage
Local $sTargetSnapshotValuesName
Local $sTargetSnapshotValuesResourceARN
Local $sSnapshotId
Local $sTargetSnapshotValuesVolumeId
Local $sTargetVolumeValues
Local $iJ
Local $iCount_j
Local $strVal
Local $sKey
Local $sValue
Local $sClients
Local $iK
Local $iCount_k
Local $iId
Local $sV_Type

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

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

; {
;   "Volume": {
;     "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": {
;           "AdministrativeActions": [
;             "AdministrativeAction"
;           ],
;           "CreationTime": number,
;           "Lifecycle": "string",
;           "LifecycleTransitionReason": {
;             "Message": "string"
;           },
;           "Name": "string",
;           "ResourceARN": "string",
;           "SnapshotId": "string",
;           "Tags": [
;             {
;               "Key": "string",
;               "Value": "string"
;             }
;           ],
;           "VolumeId": "string"
;         },
;         "TargetVolumeValues": "Volume"
;       }
;     ],
;     "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"
;   }
; }