Chilkat Online Tools

CreateVolumeFromBackup C Example

Amazon FSx

#include <C_CkRest.h>
#include <C_CkAuthAws.h>
#include <C_CkJsonObject.h>
#include <C_CkStringBuilder.h>

void ChilkatSample(void)
    {
    HCkRest rest;
    BOOL success;
    HCkAuthAws authAws;
    HCkJsonObject json;
    HCkStringBuilder sbRequestBody;
    HCkStringBuilder sbResponseBody;
    int respStatusCode;
    HCkJsonObject jResp;
    const char *AdministrativeActionType;
    const char *FailureDetailsMessage;
    int ProgressPercent;
    int RequestTime;
    const char *Status;
    int TargetFileSystemValuesCreationTime;
    const char *DNSName;
    const char *TargetFileSystemValuesFileSystemId;
    const char *FileSystemType;
    const char *FileSystemTypeVersion;
    const char *KmsKeyId;
    const char *TargetFileSystemValuesLifecycle;
    int AutomaticBackupRetentionDays;
    int CopyTagsToBackups;
    const char *DailyAutomaticBackupStartTime;
    const char *LustreConfigurationDataCompressionType;
    const char *AutoImportPolicy;
    const char *ExportPath;
    int ImportedFileChunkSize;
    const char *ImportPath;
    const char *DataRepositoryConfigurationLifecycle;
    const char *DeploymentType;
    const char *DriveCacheType;
    const char *Destination;
    const char *Level;
    const char *MountName;
    int PerUnitStorageThroughput;
    const char *WeeklyMaintenanceStartTime;
    int OntapConfigurationAutomaticBackupRetentionDays;
    const char *OntapConfigurationDailyAutomaticBackupStartTime;
    const char *OntapConfigurationDeploymentType;
    int Iops;
    const char *Mode;
    const char *EndpointIpAddressRange;
    const char *InterclusterDNSName;
    const char *ManagementDNSName;
    const char *PreferredSubnetId;
    int ThroughputCapacity;
    const char *OntapConfigurationWeeklyMaintenanceStartTime;
    int OpenZFSConfigurationAutomaticBackupRetentionDays;
    int OpenZFSConfigurationCopyTagsToBackups;
    int CopyTagsToVolumes;
    const char *OpenZFSConfigurationDailyAutomaticBackupStartTime;
    const char *OpenZFSConfigurationDeploymentType;
    int DiskIopsConfigurationIops;
    const char *DiskIopsConfigurationMode;
    const char *RootVolumeId;
    int OpenZFSConfigurationThroughputCapacity;
    const char *OpenZFSConfigurationWeeklyMaintenanceStartTime;
    const char *OwnerId;
    const char *TargetFileSystemValuesResourceARN;
    int StorageCapacity;
    const char *StorageType;
    const char *VpcId;
    const char *ActiveDirectoryId;
    const char *AuditLogDestination;
    const char *FileAccessAuditLogLevel;
    const char *FileShareAccessAuditLogLevel;
    int WindowsConfigurationAutomaticBackupRetentionDays;
    int WindowsConfigurationCopyTagsToBackups;
    const char *WindowsConfigurationDailyAutomaticBackupStartTime;
    const char *WindowsConfigurationDeploymentType;
    const char *PreferredFileServerIp;
    const char *WindowsConfigurationPreferredSubnetId;
    const char *RemoteAdministrationEndpoint;
    const char *DomainName;
    const char *FileSystemAdministratorsGroup;
    const char *OrganizationalUnitDistinguishedName;
    const char *UserName;
    int WindowsConfigurationThroughputCapacity;
    const char *WindowsConfigurationWeeklyMaintenanceStartTime;
    int TargetSnapshotValuesCreationTime;
    const char *TargetSnapshotValuesLifecycle;
    const char *LifecycleTransitionReasonMessage;
    const char *TargetSnapshotValuesName;
    const char *TargetSnapshotValuesResourceARN;
    const char *SnapshotId;
    const char *TargetSnapshotValuesVolumeId;
    const char *TargetVolumeValues;
    int j;
    int count_j;
    const char *strVal;
    const char *Key;
    const char *Value;
    const char *Clients;
    int k;
    int count_k;
    int Id;
    const char *v_Type;
    int CreationTime;
    const char *FileSystemId;
    const char *Lifecycle;
    const char *Message;
    const char *Name;
    const char *FlexCacheEndpointType;
    const char *JunctionPath;
    const char *OntapVolumeType;
    const char *SecurityStyle;
    int SizeInMegabytes;
    int StorageEfficiencyEnabled;
    const char *StorageVirtualMachineId;
    int StorageVirtualMachineRoot;
    int CoolingPeriod;
    const char *TieringPolicyName;
    const char *UUID;
    int CopyTagsToSnapshots;
    const char *DataCompressionType;
    const char *CopyStrategy;
    const char *SnapshotARN;
    const char *ParentVolumeId;
    int ReadOnly;
    int RecordSizeKiB;
    int StorageCapacityQuotaGiB;
    int StorageCapacityReservationGiB;
    const char *VolumePath;
    const char *ResourceARN;
    const char *VolumeId;
    const char *VolumeType;
    int i;
    int count_i;

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

    rest = CkRest_Create();

    authAws = CkAuthAws_Create();
    CkAuthAws_putAccessKey(authAws,"AWS_ACCESS_KEY");
    CkAuthAws_putSecretKey(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_putRegion(authAws,"us-west-2");
    CkAuthAws_putServiceName(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.
    success = CkRest_Connect(rest,"fsx.us-west-2.amazonaws.com",443,TRUE,TRUE);
    if (success != TRUE) {
        printf("ConnectFailReason: %d\n",CkRest_getConnectFailReason(rest));
        printf("%s\n",CkRest_lastErrorText(rest));
        CkRest_Dispose(rest);
        CkAuthAws_Dispose(authAws);
        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

    json = CkJsonObject_Create();
    CkJsonObject_UpdateString(json,"BackupId","string");
    CkJsonObject_UpdateString(json,"ClientRequestToken","string");
    CkJsonObject_UpdateString(json,"Name","string");
    CkJsonObject_UpdateString(json,"OntapConfiguration.JunctionPath","string");
    CkJsonObject_UpdateString(json,"OntapConfiguration.SecurityStyle","string");
    CkJsonObject_UpdateInt(json,"OntapConfiguration.SizeInMegabytes",123);
    CkJsonObject_UpdateInt(json,"OntapConfiguration.StorageEfficiencyEnabled",123);
    CkJsonObject_UpdateString(json,"OntapConfiguration.StorageVirtualMachineId","string");
    CkJsonObject_UpdateInt(json,"OntapConfiguration.TieringPolicy.CoolingPeriod",123);
    CkJsonObject_UpdateString(json,"OntapConfiguration.TieringPolicy.Name","string");
    CkJsonObject_UpdateString(json,"Tags[0].Key","string");
    CkJsonObject_UpdateString(json,"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"
    //     }
    //   ]
    // }

    CkRest_AddHeader(rest,"Content-Type","application/x-amz-json-1.1");
    CkRest_AddHeader(rest,"X-Amz-Target","AWSSimbaAPIService_v20180301.CreateVolumeFromBackup");

    sbRequestBody = CkStringBuilder_Create();
    CkJsonObject_EmitSb(json,sbRequestBody);
    sbResponseBody = CkStringBuilder_Create();
    success = CkRest_FullRequestSb(rest,"POST","/",sbRequestBody,sbResponseBody);
    if (success != TRUE) {
        printf("%s\n",CkRest_lastErrorText(rest));
        CkRest_Dispose(rest);
        CkAuthAws_Dispose(authAws);
        CkJsonObject_Dispose(json);
        CkStringBuilder_Dispose(sbRequestBody);
        CkStringBuilder_Dispose(sbResponseBody);
        return;
    }

    respStatusCode = CkRest_getResponseStatusCode(rest);
    printf("response status code = %d\n",respStatusCode);
    if (respStatusCode != 200) {
        printf("Response Header:\n");
        printf("%s\n",CkRest_responseHeader(rest));
        printf("Response Body:\n");
        printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));
        CkRest_Dispose(rest);
        CkAuthAws_Dispose(authAws);
        CkJsonObject_Dispose(json);
        CkStringBuilder_Dispose(sbRequestBody);
        CkStringBuilder_Dispose(sbResponseBody);
        return;
    }

    jResp = CkJsonObject_Create();
    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

    // 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.

    CreationTime = CkJsonObject_IntOf(jResp,"Volume.CreationTime");
    FileSystemId = CkJsonObject_stringOf(jResp,"Volume.FileSystemId");
    Lifecycle = CkJsonObject_stringOf(jResp,"Volume.Lifecycle");
    Message = CkJsonObject_stringOf(jResp,"Volume.LifecycleTransitionReason.Message");
    Name = CkJsonObject_stringOf(jResp,"Volume.Name");
    FlexCacheEndpointType = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.FlexCacheEndpointType");
    JunctionPath = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.JunctionPath");
    OntapVolumeType = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.OntapVolumeType");
    SecurityStyle = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.SecurityStyle");
    SizeInMegabytes = CkJsonObject_IntOf(jResp,"Volume.OntapConfiguration.SizeInMegabytes");
    StorageEfficiencyEnabled = CkJsonObject_IntOf(jResp,"Volume.OntapConfiguration.StorageEfficiencyEnabled");
    StorageVirtualMachineId = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.StorageVirtualMachineId");
    StorageVirtualMachineRoot = CkJsonObject_IntOf(jResp,"Volume.OntapConfiguration.StorageVirtualMachineRoot");
    CoolingPeriod = CkJsonObject_IntOf(jResp,"Volume.OntapConfiguration.TieringPolicy.CoolingPeriod");
    TieringPolicyName = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.TieringPolicy.Name");
    UUID = CkJsonObject_stringOf(jResp,"Volume.OntapConfiguration.UUID");
    CopyTagsToSnapshots = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.CopyTagsToSnapshots");
    DataCompressionType = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.DataCompressionType");
    CopyStrategy = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.OriginSnapshot.CopyStrategy");
    SnapshotARN = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.OriginSnapshot.SnapshotARN");
    ParentVolumeId = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.ParentVolumeId");
    ReadOnly = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.ReadOnly");
    RecordSizeKiB = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.RecordSizeKiB");
    StorageCapacityQuotaGiB = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.StorageCapacityQuotaGiB");
    StorageCapacityReservationGiB = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.StorageCapacityReservationGiB");
    VolumePath = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.VolumePath");
    ResourceARN = CkJsonObject_stringOf(jResp,"Volume.ResourceARN");
    VolumeId = CkJsonObject_stringOf(jResp,"Volume.VolumeId");
    VolumeType = CkJsonObject_stringOf(jResp,"Volume.VolumeType");
    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        AdministrativeActionType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].AdministrativeActionType");
        FailureDetailsMessage = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].FailureDetails.Message");
        ProgressPercent = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].ProgressPercent");
        RequestTime = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].RequestTime");
        Status = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].Status");
        TargetFileSystemValuesCreationTime = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.CreationTime");
        DNSName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.DNSName");
        FailureDetailsMessage = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.FailureDetails.Message");
        TargetFileSystemValuesFileSystemId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.FileSystemId");
        FileSystemType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.FileSystemType");
        FileSystemTypeVersion = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.FileSystemTypeVersion");
        KmsKeyId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.KmsKeyId");
        TargetFileSystemValuesLifecycle = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.Lifecycle");
        AutomaticBackupRetentionDays = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.AutomaticBackupRetentionDays");
        CopyTagsToBackups = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.CopyTagsToBackups");
        DailyAutomaticBackupStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DailyAutomaticBackupStartTime");
        LustreConfigurationDataCompressionType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataCompressionType");
        AutoImportPolicy = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy");
        ExportPath = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ExportPath");
        FailureDetailsMessage = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message");
        ImportedFileChunkSize = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize");
        ImportPath = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportPath");
        DataRepositoryConfigurationLifecycle = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.Lifecycle");
        DeploymentType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DeploymentType");
        DriveCacheType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DriveCacheType");
        Destination = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Destination");
        Level = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Level");
        MountName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.MountName");
        PerUnitStorageThroughput = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.PerUnitStorageThroughput");
        WeeklyMaintenanceStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.WeeklyMaintenanceStartTime");
        OntapConfigurationAutomaticBackupRetentionDays = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.AutomaticBackupRetentionDays");
        OntapConfigurationDailyAutomaticBackupStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DailyAutomaticBackupStartTime");
        OntapConfigurationDeploymentType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DeploymentType");
        Iops = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Iops");
        Mode = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Mode");
        EndpointIpAddressRange = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.EndpointIpAddressRange");
        InterclusterDNSName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.DNSName");
        ManagementDNSName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.DNSName");
        PreferredSubnetId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.PreferredSubnetId");
        ThroughputCapacity = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.ThroughputCapacity");
        OntapConfigurationWeeklyMaintenanceStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.WeeklyMaintenanceStartTime");
        OpenZFSConfigurationAutomaticBackupRetentionDays = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.AutomaticBackupRetentionDays");
        OpenZFSConfigurationCopyTagsToBackups = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToBackups");
        CopyTagsToVolumes = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToVolumes");
        OpenZFSConfigurationDailyAutomaticBackupStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DailyAutomaticBackupStartTime");
        OpenZFSConfigurationDeploymentType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DeploymentType");
        DiskIopsConfigurationIops = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Iops");
        DiskIopsConfigurationMode = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Mode");
        RootVolumeId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.RootVolumeId");
        OpenZFSConfigurationThroughputCapacity = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.ThroughputCapacity");
        OpenZFSConfigurationWeeklyMaintenanceStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.WeeklyMaintenanceStartTime");
        OwnerId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OwnerId");
        TargetFileSystemValuesResourceARN = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.ResourceARN");
        StorageCapacity = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.StorageCapacity");
        StorageType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.StorageType");
        VpcId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.VpcId");
        ActiveDirectoryId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ActiveDirectoryId");
        AuditLogDestination = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination");
        FileAccessAuditLogLevel = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel");
        FileShareAccessAuditLogLevel = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel");
        WindowsConfigurationAutomaticBackupRetentionDays = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AutomaticBackupRetentionDays");
        WindowsConfigurationCopyTagsToBackups = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.CopyTagsToBackups");
        WindowsConfigurationDailyAutomaticBackupStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DailyAutomaticBackupStartTime");
        WindowsConfigurationDeploymentType = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DeploymentType");
        PreferredFileServerIp = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredFileServerIp");
        WindowsConfigurationPreferredSubnetId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredSubnetId");
        RemoteAdministrationEndpoint = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.RemoteAdministrationEndpoint");
        DomainName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName");
        FileSystemAdministratorsGroup = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup");
        OrganizationalUnitDistinguishedName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName");
        UserName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName");
        WindowsConfigurationThroughputCapacity = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ThroughputCapacity");
        WindowsConfigurationWeeklyMaintenanceStartTime = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.WeeklyMaintenanceStartTime");
        TargetSnapshotValuesCreationTime = CkJsonObject_IntOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.CreationTime");
        TargetSnapshotValuesLifecycle = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.Lifecycle");
        LifecycleTransitionReasonMessage = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.LifecycleTransitionReason.Message");
        TargetSnapshotValuesName = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.Name");
        TargetSnapshotValuesResourceARN = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.ResourceARN");
        SnapshotId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.SnapshotId");
        TargetSnapshotValuesVolumeId = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.VolumeId");
        TargetVolumeValues = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetVolumeValues");
        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.SubnetIds");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.SubnetIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.Tags");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            Key = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Key");
            Value = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Value");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            Lifecycle = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Lifecycle");
            Name = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Name");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            strVal = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions[j]");
            j = j + 1;
        }

        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.Tags");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            Key = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Key");
            Value = CkJsonObject_stringOf(jResp,"Volume.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Value");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"Volume.OpenZFSConfiguration.NfsExports");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        j = 0;
        count_j = CkJsonObject_SizeOfArray(jResp,"Volume.OpenZFSConfiguration.NfsExports[i].ClientConfigurations");
        while (j < count_j) {
            CkJsonObject_putJ(jResp,j);
            Clients = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.NfsExports[i].ClientConfigurations[j].Clients");
            k = 0;
            count_k = CkJsonObject_SizeOfArray(jResp,"Volume.OpenZFSConfiguration.NfsExports[i].ClientConfigurations[j].Options");
            while (k < count_k) {
                CkJsonObject_putK(jResp,k);
                strVal = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.NfsExports[i].ClientConfigurations[j].Options[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"Volume.OpenZFSConfiguration.UserAndGroupQuotas");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        Id = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.UserAndGroupQuotas[i].Id");
        StorageCapacityQuotaGiB = CkJsonObject_IntOf(jResp,"Volume.OpenZFSConfiguration.UserAndGroupQuotas[i].StorageCapacityQuotaGiB");
        v_Type = CkJsonObject_stringOf(jResp,"Volume.OpenZFSConfiguration.UserAndGroupQuotas[i].Type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObject_SizeOfArray(jResp,"Volume.Tags");
    while (i < count_i) {
        CkJsonObject_putI(jResp,i);
        Key = CkJsonObject_stringOf(jResp,"Volume.Tags[i].Key");
        Value = CkJsonObject_stringOf(jResp,"Volume.Tags[i].Value");
        i = i + 1;
    }

    // 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"
    //   }
    // }


    CkRest_Dispose(rest);
    CkAuthAws_Dispose(authAws);
    CkJsonObject_Dispose(json);
    CkStringBuilder_Dispose(sbRequestBody);
    CkStringBuilder_Dispose(sbResponseBody);
    CkJsonObject_Dispose(jResp);

    }