CreateSnapshot TCL Example
load ./chilkat.dll
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set rest [new_CkRest]
set authAws [new_CkAuthAws]
CkAuthAws_put_AccessKey $authAws "AWS_ACCESS_KEY"
CkAuthAws_put_SecretKey $authAws "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.)
CkAuthAws_put_Region $authAws "us-west-2"
CkAuthAws_put_ServiceName $authAws "fsx"
# SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws $rest $authAws
# URL: https://fsx.us-west-2.amazonaws.com/
# Use the same region as specified above.
set success [CkRest_Connect $rest "fsx.us-west-2.amazonaws.com" 443 1 1]
if {$success != 1} then {
puts "ConnectFailReason: [CkRest_get_ConnectFailReason $rest]"
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
exit
}
# 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
set json [new_CkJsonObject]
CkJsonObject_UpdateString $json "ClientRequestToken" "string"
CkJsonObject_UpdateString $json "Name" "string"
CkJsonObject_UpdateString $json "Tags[0].Key" "string"
CkJsonObject_UpdateString $json "Tags[0].Value" "string"
CkJsonObject_UpdateString $json "VolumeId" "string"
# The JSON request body created by the above code:
# {
# "ClientRequestToken": "string",
# "Name": "string",
# "Tags": [
# {
# "Key": "string",
# "Value": "string"
# }
# ],
# "VolumeId": "string"
# }
CkRest_AddHeader $rest "Content-Type" "application/x-amz-json-1.1"
CkRest_AddHeader $rest "X-Amz-Target" "AWSSimbaAPIService_v20180301.CreateSnapshot"
set sbRequestBody [new_CkStringBuilder]
CkJsonObject_EmitSb $json $sbRequestBody
set sbResponseBody [new_CkStringBuilder]
set success [CkRest_FullRequestSb $rest "POST" "/" $sbRequestBody $sbResponseBody]
if {$success != 1} then {
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set respStatusCode [CkRest_get_ResponseStatusCode $rest]
puts "response status code = $respStatusCode"
if {$respStatusCode != 200} then {
puts "Response Header:"
puts [CkRest_responseHeader $rest]
puts "Response Body:"
puts [CkStringBuilder_getAsString $sbResponseBody]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set jResp [new_CkJsonObject]
CkJsonObject_LoadSb $jResp $sbResponseBody
# 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
# json1 is a CkJsonObject
set CreationTime [CkJsonObject_IntOf $jResp "Snapshot.CreationTime"]
set Lifecycle [CkJsonObject_stringOf $jResp "Snapshot.Lifecycle"]
set Message [CkJsonObject_stringOf $jResp "Snapshot.LifecycleTransitionReason.Message"]
set Name [CkJsonObject_stringOf $jResp "Snapshot.Name"]
set ResourceARN [CkJsonObject_stringOf $jResp "Snapshot.ResourceARN"]
set SnapshotId [CkJsonObject_stringOf $jResp "Snapshot.SnapshotId"]
set VolumeId [CkJsonObject_stringOf $jResp "Snapshot.VolumeId"]
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set AdministrativeActionType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].AdministrativeActionType"]
set FailureDetailsMessage [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].FailureDetails.Message"]
set ProgressPercent [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].ProgressPercent"]
set RequestTime [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].RequestTime"]
set Status [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].Status"]
set TargetFileSystemValuesCreationTime [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.CreationTime"]
set DNSName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.DNSName"]
set FailureDetailsMessage [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.FailureDetails.Message"]
set FileSystemId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemId"]
set FileSystemType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemType"]
set FileSystemTypeVersion [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemTypeVersion"]
set KmsKeyId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.KmsKeyId"]
set TargetFileSystemValuesLifecycle [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.Lifecycle"]
set AutomaticBackupRetentionDays [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.AutomaticBackupRetentionDays"]
set CopyTagsToBackups [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.CopyTagsToBackups"]
set DailyAutomaticBackupStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DailyAutomaticBackupStartTime"]
set DataCompressionType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataCompressionType"]
set AutoImportPolicy [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy"]
set ExportPath [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ExportPath"]
set FailureDetailsMessage [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message"]
set ImportedFileChunkSize [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize"]
set ImportPath [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportPath"]
set DataRepositoryConfigurationLifecycle [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.Lifecycle"]
set DeploymentType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DeploymentType"]
set DriveCacheType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DriveCacheType"]
set Destination [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Destination"]
set Level [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Level"]
set MountName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.MountName"]
set PerUnitStorageThroughput [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.PerUnitStorageThroughput"]
set WeeklyMaintenanceStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.WeeklyMaintenanceStartTime"]
set OntapConfigurationAutomaticBackupRetentionDays [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.AutomaticBackupRetentionDays"]
set OntapConfigurationDailyAutomaticBackupStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DailyAutomaticBackupStartTime"]
set OntapConfigurationDeploymentType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DeploymentType"]
set Iops [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Iops"]
set Mode [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Mode"]
set EndpointIpAddressRange [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.EndpointIpAddressRange"]
set InterclusterDNSName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.DNSName"]
set ManagementDNSName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.DNSName"]
set PreferredSubnetId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.PreferredSubnetId"]
set ThroughputCapacity [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.ThroughputCapacity"]
set OntapConfigurationWeeklyMaintenanceStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.WeeklyMaintenanceStartTime"]
set OpenZFSConfigurationAutomaticBackupRetentionDays [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.AutomaticBackupRetentionDays"]
set OpenZFSConfigurationCopyTagsToBackups [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToBackups"]
set CopyTagsToVolumes [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToVolumes"]
set OpenZFSConfigurationDailyAutomaticBackupStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DailyAutomaticBackupStartTime"]
set OpenZFSConfigurationDeploymentType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DeploymentType"]
set DiskIopsConfigurationIops [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Iops"]
set DiskIopsConfigurationMode [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Mode"]
set RootVolumeId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.RootVolumeId"]
set OpenZFSConfigurationThroughputCapacity [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.ThroughputCapacity"]
set OpenZFSConfigurationWeeklyMaintenanceStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.WeeklyMaintenanceStartTime"]
set OwnerId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OwnerId"]
set TargetFileSystemValuesResourceARN [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.ResourceARN"]
set StorageCapacity [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageCapacity"]
set StorageType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageType"]
set VpcId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.VpcId"]
set ActiveDirectoryId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ActiveDirectoryId"]
set AuditLogDestination [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination"]
set FileAccessAuditLogLevel [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel"]
set FileShareAccessAuditLogLevel [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel"]
set WindowsConfigurationAutomaticBackupRetentionDays [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AutomaticBackupRetentionDays"]
set WindowsConfigurationCopyTagsToBackups [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.CopyTagsToBackups"]
set WindowsConfigurationDailyAutomaticBackupStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DailyAutomaticBackupStartTime"]
set WindowsConfigurationDeploymentType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DeploymentType"]
set PreferredFileServerIp [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredFileServerIp"]
set WindowsConfigurationPreferredSubnetId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredSubnetId"]
set RemoteAdministrationEndpoint [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.RemoteAdministrationEndpoint"]
set DomainName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName"]
set FileSystemAdministratorsGroup [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup"]
set OrganizationalUnitDistinguishedName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName"]
set UserName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName"]
set WindowsConfigurationThroughputCapacity [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ThroughputCapacity"]
set WindowsConfigurationWeeklyMaintenanceStartTime [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.WeeklyMaintenanceStartTime"]
set TargetSnapshotValues [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetSnapshotValues"]
set TargetVolumeValuesCreationTime [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.CreationTime"]
set TargetVolumeValuesFileSystemId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.FileSystemId"]
set TargetVolumeValuesLifecycle [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.Lifecycle"]
set LifecycleTransitionReasonMessage [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.LifecycleTransitionReason.Message"]
set TargetVolumeValuesName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.Name"]
set FlexCacheEndpointType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType"]
set JunctionPath [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.JunctionPath"]
set OntapVolumeType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.OntapVolumeType"]
set SecurityStyle [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SecurityStyle"]
set SizeInMegabytes [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SizeInMegabytes"]
set StorageEfficiencyEnabled [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled"]
set StorageVirtualMachineId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId"]
set StorageVirtualMachineRoot [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot"]
set CoolingPeriod [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod"]
set TieringPolicyName [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name"]
set UUID [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.UUID"]
set CopyTagsToSnapshots [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots"]
set OpenZFSConfigurationDataCompressionType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType"]
set CopyStrategy [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy"]
set SnapshotARN [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN"]
set ParentVolumeId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId"]
set ReadOnly [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ReadOnly"]
set RecordSizeKiB [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB"]
set StorageCapacityQuotaGiB [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB"]
set StorageCapacityReservationGiB [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB"]
set VolumePath [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.VolumePath"]
set TargetVolumeValuesResourceARN [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.ResourceARN"]
set TargetVolumeValuesVolumeId [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeId"]
set VolumeType [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeType"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Key [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Key"]
set Value [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Lifecycle [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Lifecycle"]
set Name [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Name"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set Clients [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k].Clients"]
set json1 [CkJsonObject_ObjectOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k]"]
set i1 0
set count_i1 [CkJsonObject_SizeOfArray $json1 "Options"]
while {$i1 < $count_i1} {
CkJsonObject_put_I $json1 $i1
set strVal [CkJsonObject_stringOf $json1 "Options[i]"]
set i1 [expr $i1 + 1]
}
delete_CkJsonObject $json1
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Id [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Id"]
set StorageCapacityQuotaGiB [CkJsonObject_IntOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].StorageCapacityQuotaGiB"]
set v_Type [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Type"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Key [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Key"]
set Value [CkJsonObject_stringOf $jResp "Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Value"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "Snapshot.Tags"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set Key [CkJsonObject_stringOf $jResp "Snapshot.Tags[i].Key"]
set Value [CkJsonObject_stringOf $jResp "Snapshot.Tags[i].Value"]
set i [expr $i + 1]
}
# A sample JSON response body parsed by the above code:
# {
# "Snapshot": {
# "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"
# }
# }
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp