CreateSnapshot C++ Example
#include <CkRest.h>
#include <CkAuthAws.h>
#include <CkJsonObject.h>
#include <CkStringBuilder.h>
void ChilkatSample(void)
{
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkRest rest;
bool success;
CkAuthAws authAws;
authAws.put_AccessKey("AWS_ACCESS_KEY");
authAws.put_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.)
authAws.put_Region("us-west-2");
authAws.put_ServiceName("fsx");
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
rest.SetAuthAws(authAws);
// URL: https://fsx.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = rest.Connect("fsx.us-west-2.amazonaws.com",443,true,true);
if (success != true) {
std::cout << "ConnectFailReason: " << rest.get_ConnectFailReason() << "\r\n";
std::cout << rest.lastErrorText() << "\r\n";
return;
}
// 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
CkJsonObject json;
json.UpdateString("ClientRequestToken","string");
json.UpdateString("Name","string");
json.UpdateString("Tags[0].Key","string");
json.UpdateString("Tags[0].Value","string");
json.UpdateString("VolumeId","string");
// The JSON request body created by the above code:
// {
// "ClientRequestToken": "string",
// "Name": "string",
// "Tags": [
// {
// "Key": "string",
// "Value": "string"
// }
// ],
// "VolumeId": "string"
// }
rest.AddHeader("Content-Type","application/x-amz-json-1.1");
rest.AddHeader("X-Amz-Target","AWSSimbaAPIService_v20180301.CreateSnapshot");
CkStringBuilder sbRequestBody;
json.EmitSb(sbRequestBody);
CkStringBuilder sbResponseBody;
success = rest.FullRequestSb("POST","/",sbRequestBody,sbResponseBody);
if (success != true) {
std::cout << rest.lastErrorText() << "\r\n";
return;
}
int respStatusCode = rest.get_ResponseStatusCode();
std::cout << "response status code = " << respStatusCode << "\r\n";
if (respStatusCode != 200) {
std::cout << "Response Header:" << "\r\n";
std::cout << rest.responseHeader() << "\r\n";
std::cout << "Response Body:" << "\r\n";
std::cout << sbResponseBody.getAsString() << "\r\n";
return;
}
CkJsonObject jResp;
jResp.LoadSb(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
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
const char *AdministrativeActionType = 0;
const char *FailureDetailsMessage = 0;
int ProgressPercent;
int RequestTime;
const char *Status = 0;
int TargetFileSystemValuesCreationTime;
const char *DNSName = 0;
const char *FileSystemId = 0;
const char *FileSystemType = 0;
const char *FileSystemTypeVersion = 0;
const char *KmsKeyId = 0;
const char *TargetFileSystemValuesLifecycle = 0;
int AutomaticBackupRetentionDays;
int CopyTagsToBackups;
const char *DailyAutomaticBackupStartTime = 0;
const char *DataCompressionType = 0;
const char *AutoImportPolicy = 0;
const char *ExportPath = 0;
int ImportedFileChunkSize;
const char *ImportPath = 0;
const char *DataRepositoryConfigurationLifecycle = 0;
const char *DeploymentType = 0;
const char *DriveCacheType = 0;
const char *Destination = 0;
const char *Level = 0;
const char *MountName = 0;
int PerUnitStorageThroughput;
const char *WeeklyMaintenanceStartTime = 0;
int OntapConfigurationAutomaticBackupRetentionDays;
const char *OntapConfigurationDailyAutomaticBackupStartTime = 0;
const char *OntapConfigurationDeploymentType = 0;
int Iops;
const char *Mode = 0;
const char *EndpointIpAddressRange = 0;
const char *InterclusterDNSName = 0;
const char *ManagementDNSName = 0;
const char *PreferredSubnetId = 0;
int ThroughputCapacity;
const char *OntapConfigurationWeeklyMaintenanceStartTime = 0;
int OpenZFSConfigurationAutomaticBackupRetentionDays;
int OpenZFSConfigurationCopyTagsToBackups;
int CopyTagsToVolumes;
const char *OpenZFSConfigurationDailyAutomaticBackupStartTime = 0;
const char *OpenZFSConfigurationDeploymentType = 0;
int DiskIopsConfigurationIops;
const char *DiskIopsConfigurationMode = 0;
const char *RootVolumeId = 0;
int OpenZFSConfigurationThroughputCapacity;
const char *OpenZFSConfigurationWeeklyMaintenanceStartTime = 0;
const char *OwnerId = 0;
const char *TargetFileSystemValuesResourceARN = 0;
int StorageCapacity;
const char *StorageType = 0;
const char *VpcId = 0;
const char *ActiveDirectoryId = 0;
const char *AuditLogDestination = 0;
const char *FileAccessAuditLogLevel = 0;
const char *FileShareAccessAuditLogLevel = 0;
int WindowsConfigurationAutomaticBackupRetentionDays;
int WindowsConfigurationCopyTagsToBackups;
const char *WindowsConfigurationDailyAutomaticBackupStartTime = 0;
const char *WindowsConfigurationDeploymentType = 0;
const char *PreferredFileServerIp = 0;
const char *WindowsConfigurationPreferredSubnetId = 0;
const char *RemoteAdministrationEndpoint = 0;
const char *DomainName = 0;
const char *FileSystemAdministratorsGroup = 0;
const char *OrganizationalUnitDistinguishedName = 0;
const char *UserName = 0;
int WindowsConfigurationThroughputCapacity;
const char *WindowsConfigurationWeeklyMaintenanceStartTime = 0;
const char *TargetSnapshotValues = 0;
int TargetVolumeValuesCreationTime;
const char *TargetVolumeValuesFileSystemId = 0;
const char *TargetVolumeValuesLifecycle = 0;
const char *LifecycleTransitionReasonMessage = 0;
const char *TargetVolumeValuesName = 0;
const char *FlexCacheEndpointType = 0;
const char *JunctionPath = 0;
const char *OntapVolumeType = 0;
const char *SecurityStyle = 0;
int SizeInMegabytes;
int StorageEfficiencyEnabled;
const char *StorageVirtualMachineId = 0;
int StorageVirtualMachineRoot;
int CoolingPeriod;
const char *TieringPolicyName = 0;
const char *UUID = 0;
int CopyTagsToSnapshots;
const char *OpenZFSConfigurationDataCompressionType = 0;
const char *CopyStrategy = 0;
const char *SnapshotARN = 0;
const char *ParentVolumeId = 0;
int ReadOnly;
int RecordSizeKiB;
int StorageCapacityQuotaGiB;
int StorageCapacityReservationGiB;
const char *VolumePath = 0;
const char *TargetVolumeValuesResourceARN = 0;
const char *TargetVolumeValuesVolumeId = 0;
const char *VolumeType = 0;
int j;
int count_j;
const char *strVal = 0;
const char *Key = 0;
const char *Value = 0;
int k;
int count_k;
const char *Clients = 0;
CkJsonObject *json1 = 0;
int i1;
int count_i1;
int Id;
const char *v_Type = 0;
int CreationTime = jResp.IntOf("Snapshot.CreationTime");
const char *Lifecycle = jResp.stringOf("Snapshot.Lifecycle");
const char *Message = jResp.stringOf("Snapshot.LifecycleTransitionReason.Message");
const char *Name = jResp.stringOf("Snapshot.Name");
const char *ResourceARN = jResp.stringOf("Snapshot.ResourceARN");
const char *SnapshotId = jResp.stringOf("Snapshot.SnapshotId");
const char *VolumeId = jResp.stringOf("Snapshot.VolumeId");
int i = 0;
int count_i = jResp.SizeOfArray("Snapshot.AdministrativeActions");
while (i < count_i) {
jResp.put_I(i);
AdministrativeActionType = jResp.stringOf("Snapshot.AdministrativeActions[i].AdministrativeActionType");
FailureDetailsMessage = jResp.stringOf("Snapshot.AdministrativeActions[i].FailureDetails.Message");
ProgressPercent = jResp.IntOf("Snapshot.AdministrativeActions[i].ProgressPercent");
RequestTime = jResp.IntOf("Snapshot.AdministrativeActions[i].RequestTime");
Status = jResp.stringOf("Snapshot.AdministrativeActions[i].Status");
TargetFileSystemValuesCreationTime = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.CreationTime");
DNSName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.DNSName");
FailureDetailsMessage = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.FailureDetails.Message");
FileSystemId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemId");
FileSystemType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemType");
FileSystemTypeVersion = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemTypeVersion");
KmsKeyId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.KmsKeyId");
TargetFileSystemValuesLifecycle = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.Lifecycle");
AutomaticBackupRetentionDays = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.AutomaticBackupRetentionDays");
CopyTagsToBackups = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.CopyTagsToBackups");
DailyAutomaticBackupStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DailyAutomaticBackupStartTime");
DataCompressionType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataCompressionType");
AutoImportPolicy = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy");
ExportPath = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ExportPath");
FailureDetailsMessage = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message");
ImportedFileChunkSize = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize");
ImportPath = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportPath");
DataRepositoryConfigurationLifecycle = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.Lifecycle");
DeploymentType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DeploymentType");
DriveCacheType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DriveCacheType");
Destination = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Destination");
Level = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Level");
MountName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.MountName");
PerUnitStorageThroughput = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.PerUnitStorageThroughput");
WeeklyMaintenanceStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.WeeklyMaintenanceStartTime");
OntapConfigurationAutomaticBackupRetentionDays = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.AutomaticBackupRetentionDays");
OntapConfigurationDailyAutomaticBackupStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DailyAutomaticBackupStartTime");
OntapConfigurationDeploymentType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DeploymentType");
Iops = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Iops");
Mode = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Mode");
EndpointIpAddressRange = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.EndpointIpAddressRange");
InterclusterDNSName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.DNSName");
ManagementDNSName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.DNSName");
PreferredSubnetId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.PreferredSubnetId");
ThroughputCapacity = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.ThroughputCapacity");
OntapConfigurationWeeklyMaintenanceStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.WeeklyMaintenanceStartTime");
OpenZFSConfigurationAutomaticBackupRetentionDays = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.AutomaticBackupRetentionDays");
OpenZFSConfigurationCopyTagsToBackups = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToBackups");
CopyTagsToVolumes = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToVolumes");
OpenZFSConfigurationDailyAutomaticBackupStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DailyAutomaticBackupStartTime");
OpenZFSConfigurationDeploymentType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DeploymentType");
DiskIopsConfigurationIops = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Iops");
DiskIopsConfigurationMode = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Mode");
RootVolumeId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.RootVolumeId");
OpenZFSConfigurationThroughputCapacity = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.ThroughputCapacity");
OpenZFSConfigurationWeeklyMaintenanceStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.WeeklyMaintenanceStartTime");
OwnerId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OwnerId");
TargetFileSystemValuesResourceARN = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.ResourceARN");
StorageCapacity = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageCapacity");
StorageType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageType");
VpcId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.VpcId");
ActiveDirectoryId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ActiveDirectoryId");
AuditLogDestination = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination");
FileAccessAuditLogLevel = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel");
FileShareAccessAuditLogLevel = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel");
WindowsConfigurationAutomaticBackupRetentionDays = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AutomaticBackupRetentionDays");
WindowsConfigurationCopyTagsToBackups = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.CopyTagsToBackups");
WindowsConfigurationDailyAutomaticBackupStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DailyAutomaticBackupStartTime");
WindowsConfigurationDeploymentType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DeploymentType");
PreferredFileServerIp = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredFileServerIp");
WindowsConfigurationPreferredSubnetId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredSubnetId");
RemoteAdministrationEndpoint = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.RemoteAdministrationEndpoint");
DomainName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName");
FileSystemAdministratorsGroup = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup");
OrganizationalUnitDistinguishedName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName");
UserName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName");
WindowsConfigurationThroughputCapacity = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ThroughputCapacity");
WindowsConfigurationWeeklyMaintenanceStartTime = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.WeeklyMaintenanceStartTime");
TargetSnapshotValues = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetSnapshotValues");
TargetVolumeValuesCreationTime = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.CreationTime");
TargetVolumeValuesFileSystemId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.FileSystemId");
TargetVolumeValuesLifecycle = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.Lifecycle");
LifecycleTransitionReasonMessage = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.LifecycleTransitionReason.Message");
TargetVolumeValuesName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.Name");
FlexCacheEndpointType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType");
JunctionPath = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.JunctionPath");
OntapVolumeType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.OntapVolumeType");
SecurityStyle = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SecurityStyle");
SizeInMegabytes = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SizeInMegabytes");
StorageEfficiencyEnabled = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled");
StorageVirtualMachineId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId");
StorageVirtualMachineRoot = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot");
CoolingPeriod = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod");
TieringPolicyName = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name");
UUID = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.UUID");
CopyTagsToSnapshots = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots");
OpenZFSConfigurationDataCompressionType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType");
CopyStrategy = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy");
SnapshotARN = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN");
ParentVolumeId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId");
ReadOnly = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ReadOnly");
RecordSizeKiB = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB");
StorageCapacityQuotaGiB = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB");
StorageCapacityReservationGiB = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB");
VolumePath = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.VolumePath");
TargetVolumeValuesResourceARN = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.ResourceARN");
TargetVolumeValuesVolumeId = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeId");
VolumeType = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeType");
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags");
while (j < count_j) {
jResp.put_J(j);
Key = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Key");
Value = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Value");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases");
while (j < count_j) {
jResp.put_J(j);
Lifecycle = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Lifecycle");
Name = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Name");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions");
while (j < count_j) {
jResp.put_J(j);
strVal = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions[j]");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports");
while (j < count_j) {
jResp.put_J(j);
k = 0;
count_k = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations");
while (k < count_k) {
jResp.put_K(k);
Clients = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k].Clients");
json1 = jResp.ObjectOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k]");
i1 = 0;
count_i1 = json1->SizeOfArray("Options");
while (i1 < count_i1) {
json1->put_I(i1);
strVal = json1->stringOf("Options[i]");
i1 = i1 + 1;
}
delete json1;
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas");
while (j < count_j) {
jResp.put_J(j);
Id = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Id");
StorageCapacityQuotaGiB = jResp.IntOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].StorageCapacityQuotaGiB");
v_Type = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Type");
j = j + 1;
}
j = 0;
count_j = jResp.SizeOfArray("Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags");
while (j < count_j) {
jResp.put_J(j);
Key = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Key");
Value = jResp.stringOf("Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Value");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = jResp.SizeOfArray("Snapshot.Tags");
while (i < count_i) {
jResp.put_I(i);
Key = jResp.stringOf("Snapshot.Tags[i].Key");
Value = jResp.stringOf("Snapshot.Tags[i].Value");
i = 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"
// }
// }
}