Chilkat Online Tools

UpdateSnapshot PureBasic Example

Amazon FSx

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkRest.pb"
IncludeFile "CkAuthAws.pb"

Procedure ChilkatExample()

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

    rest.i = CkRest::ckCreate()
    If rest.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    authAws.i = CkAuthAws::ckCreate()
    If authAws.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkAuthAws::setCkAccessKey(authAws, "AWS_ACCESS_KEY")
    CkAuthAws::setCkSecretKey(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::setCkRegion(authAws, "us-west-2")
    CkAuthAws::setCkServiceName(authAws, "fsx")
    ; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    CkRest::ckSetAuthAws(rest,authAws)

    ; URL: https://fsx.us-west-2.amazonaws.com/
    ; Use the same region as specified above.
    success = CkRest::ckConnect(rest,"fsx.us-west-2.amazonaws.com",443,1,1)
    If success <> 1
        Debug "ConnectFailReason: " + Str(CkRest::ckConnectFailReason(rest))
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        ProcedureReturn
    EndIf

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

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

    json.i = CkJsonObject::ckCreate()
    If json.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(json,"ClientRequestToken","string")
    CkJsonObject::ckUpdateString(json,"Name","string")
    CkJsonObject::ckUpdateString(json,"SnapshotId","string")

    ; The JSON request body created by the above code:

    ; {
    ;   "ClientRequestToken": "string",
    ;   "Name": "string",
    ;   "SnapshotId": "string"
    ; }

    CkRest::ckAddHeader(rest,"Content-Type","application/x-amz-json-1.1")
    CkRest::ckAddHeader(rest,"X-Amz-Target","AWSSimbaAPIService_v20180301.UpdateSnapshot")

    sbRequestBody.i = CkStringBuilder::ckCreate()
    If sbRequestBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckEmitSb(json,sbRequestBody)
    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success = CkRest::ckFullRequestSb(rest,"POST","/",sbRequestBody,sbResponseBody)
    If success <> 1
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    respStatusCode.i = CkRest::ckResponseStatusCode(rest)
    Debug "response status code = " + Str(respStatusCode)
    If respStatusCode <> 200
        Debug "Response Header:"
        Debug CkRest::ckResponseHeader(rest)
        Debug "Response Body:"
        Debug CkStringBuilder::ckGetAsString(sbResponseBody)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(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

    AdministrativeActionType.s
    FailureDetailsMessage.s
    ProgressPercent.i
    RequestTime.i
    Status.s
    TargetFileSystemValuesCreationTime.i
    DNSName.s
    FileSystemId.s
    FileSystemType.s
    FileSystemTypeVersion.s
    KmsKeyId.s
    TargetFileSystemValuesLifecycle.s
    AutomaticBackupRetentionDays.i
    CopyTagsToBackups.i
    DailyAutomaticBackupStartTime.s
    DataCompressionType.s
    AutoImportPolicy.s
    ExportPath.s
    ImportedFileChunkSize.i
    ImportPath.s
    DataRepositoryConfigurationLifecycle.s
    DeploymentType.s
    DriveCacheType.s
    Destination.s
    Level.s
    MountName.s
    PerUnitStorageThroughput.i
    WeeklyMaintenanceStartTime.s
    OntapConfigurationAutomaticBackupRetentionDays.i
    OntapConfigurationDailyAutomaticBackupStartTime.s
    OntapConfigurationDeploymentType.s
    Iops.i
    Mode.s
    EndpointIpAddressRange.s
    InterclusterDNSName.s
    ManagementDNSName.s
    PreferredSubnetId.s
    ThroughputCapacity.i
    OntapConfigurationWeeklyMaintenanceStartTime.s
    OpenZFSConfigurationAutomaticBackupRetentionDays.i
    OpenZFSConfigurationCopyTagsToBackups.i
    CopyTagsToVolumes.i
    OpenZFSConfigurationDailyAutomaticBackupStartTime.s
    OpenZFSConfigurationDeploymentType.s
    DiskIopsConfigurationIops.i
    DiskIopsConfigurationMode.s
    RootVolumeId.s
    OpenZFSConfigurationThroughputCapacity.i
    OpenZFSConfigurationWeeklyMaintenanceStartTime.s
    OwnerId.s
    TargetFileSystemValuesResourceARN.s
    StorageCapacity.i
    StorageType.s
    VpcId.s
    ActiveDirectoryId.s
    AuditLogDestination.s
    FileAccessAuditLogLevel.s
    FileShareAccessAuditLogLevel.s
    WindowsConfigurationAutomaticBackupRetentionDays.i
    WindowsConfigurationCopyTagsToBackups.i
    WindowsConfigurationDailyAutomaticBackupStartTime.s
    WindowsConfigurationDeploymentType.s
    PreferredFileServerIp.s
    WindowsConfigurationPreferredSubnetId.s
    RemoteAdministrationEndpoint.s
    DomainName.s
    FileSystemAdministratorsGroup.s
    OrganizationalUnitDistinguishedName.s
    UserName.s
    WindowsConfigurationThroughputCapacity.i
    WindowsConfigurationWeeklyMaintenanceStartTime.s
    TargetSnapshotValues.s
    TargetVolumeValuesCreationTime.i
    TargetVolumeValuesFileSystemId.s
    TargetVolumeValuesLifecycle.s
    LifecycleTransitionReasonMessage.s
    TargetVolumeValuesName.s
    FlexCacheEndpointType.s
    JunctionPath.s
    OntapVolumeType.s
    SecurityStyle.s
    SizeInMegabytes.i
    StorageEfficiencyEnabled.i
    StorageVirtualMachineId.s
    StorageVirtualMachineRoot.i
    CoolingPeriod.i
    TieringPolicyName.s
    UUID.s
    CopyTagsToSnapshots.i
    OpenZFSConfigurationDataCompressionType.s
    CopyStrategy.s
    SnapshotARN.s
    ParentVolumeId.s
    ReadOnly.i
    RecordSizeKiB.i
    StorageCapacityQuotaGiB.i
    StorageCapacityReservationGiB.i
    VolumePath.s
    TargetVolumeValuesResourceARN.s
    TargetVolumeValuesVolumeId.s
    VolumeType.s
    j.i
    count_j.i
    strVal.s
    Key.s
    Value.s
    k.i
    count_k.i
    Clients.s
    json1.i
    i1.i
    count_i1.i
    Id.i
    v_Type.s

    CreationTime.i = CkJsonObject::ckIntOf(jResp,"Snapshot.CreationTime")
    Lifecycle.s = CkJsonObject::ckStringOf(jResp,"Snapshot.Lifecycle")
    Message.s = CkJsonObject::ckStringOf(jResp,"Snapshot.LifecycleTransitionReason.Message")
    Name.s = CkJsonObject::ckStringOf(jResp,"Snapshot.Name")
    ResourceARN.s = CkJsonObject::ckStringOf(jResp,"Snapshot.ResourceARN")
    SnapshotId.s = CkJsonObject::ckStringOf(jResp,"Snapshot.SnapshotId")
    VolumeId.s = CkJsonObject::ckStringOf(jResp,"Snapshot.VolumeId")
    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        AdministrativeActionType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].AdministrativeActionType")
        FailureDetailsMessage = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].FailureDetails.Message")
        ProgressPercent = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].ProgressPercent")
        RequestTime = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].RequestTime")
        Status = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].Status")
        TargetFileSystemValuesCreationTime = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.CreationTime")
        DNSName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.DNSName")
        FailureDetailsMessage = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.FailureDetails.Message")
        FileSystemId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemId")
        FileSystemType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemType")
        FileSystemTypeVersion = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.FileSystemTypeVersion")
        KmsKeyId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.KmsKeyId")
        TargetFileSystemValuesLifecycle = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.Lifecycle")
        AutomaticBackupRetentionDays = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.AutomaticBackupRetentionDays")
        CopyTagsToBackups = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.CopyTagsToBackups")
        DailyAutomaticBackupStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DailyAutomaticBackupStartTime")
        DataCompressionType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataCompressionType")
        AutoImportPolicy = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy")
        ExportPath = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ExportPath")
        FailureDetailsMessage = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message")
        ImportedFileChunkSize = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize")
        ImportPath = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.ImportPath")
        DataRepositoryConfigurationLifecycle = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DataRepositoryConfiguration.Lifecycle")
        DeploymentType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DeploymentType")
        DriveCacheType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.DriveCacheType")
        Destination = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Destination")
        Level = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.LogConfiguration.Level")
        MountName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.MountName")
        PerUnitStorageThroughput = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.PerUnitStorageThroughput")
        WeeklyMaintenanceStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.LustreConfiguration.WeeklyMaintenanceStartTime")
        OntapConfigurationAutomaticBackupRetentionDays = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.AutomaticBackupRetentionDays")
        OntapConfigurationDailyAutomaticBackupStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DailyAutomaticBackupStartTime")
        OntapConfigurationDeploymentType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DeploymentType")
        Iops = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Iops")
        Mode = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.DiskIopsConfiguration.Mode")
        EndpointIpAddressRange = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.EndpointIpAddressRange")
        InterclusterDNSName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.DNSName")
        ManagementDNSName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.DNSName")
        PreferredSubnetId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.PreferredSubnetId")
        ThroughputCapacity = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.ThroughputCapacity")
        OntapConfigurationWeeklyMaintenanceStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.WeeklyMaintenanceStartTime")
        OpenZFSConfigurationAutomaticBackupRetentionDays = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.AutomaticBackupRetentionDays")
        OpenZFSConfigurationCopyTagsToBackups = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToBackups")
        CopyTagsToVolumes = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.CopyTagsToVolumes")
        OpenZFSConfigurationDailyAutomaticBackupStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DailyAutomaticBackupStartTime")
        OpenZFSConfigurationDeploymentType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DeploymentType")
        DiskIopsConfigurationIops = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Iops")
        DiskIopsConfigurationMode = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.DiskIopsConfiguration.Mode")
        RootVolumeId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.RootVolumeId")
        OpenZFSConfigurationThroughputCapacity = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.ThroughputCapacity")
        OpenZFSConfigurationWeeklyMaintenanceStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OpenZFSConfiguration.WeeklyMaintenanceStartTime")
        OwnerId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OwnerId")
        TargetFileSystemValuesResourceARN = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.ResourceARN")
        StorageCapacity = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageCapacity")
        StorageType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.StorageType")
        VpcId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.VpcId")
        ActiveDirectoryId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ActiveDirectoryId")
        AuditLogDestination = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination")
        FileAccessAuditLogLevel = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel")
        FileShareAccessAuditLogLevel = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel")
        WindowsConfigurationAutomaticBackupRetentionDays = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.AutomaticBackupRetentionDays")
        WindowsConfigurationCopyTagsToBackups = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.CopyTagsToBackups")
        WindowsConfigurationDailyAutomaticBackupStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DailyAutomaticBackupStartTime")
        WindowsConfigurationDeploymentType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.DeploymentType")
        PreferredFileServerIp = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredFileServerIp")
        WindowsConfigurationPreferredSubnetId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.PreferredSubnetId")
        RemoteAdministrationEndpoint = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.RemoteAdministrationEndpoint")
        DomainName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName")
        FileSystemAdministratorsGroup = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup")
        OrganizationalUnitDistinguishedName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName")
        UserName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName")
        WindowsConfigurationThroughputCapacity = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.ThroughputCapacity")
        WindowsConfigurationWeeklyMaintenanceStartTime = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.WeeklyMaintenanceStartTime")
        TargetSnapshotValues = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetSnapshotValues")
        TargetVolumeValuesCreationTime = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.CreationTime")
        TargetVolumeValuesFileSystemId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.FileSystemId")
        TargetVolumeValuesLifecycle = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.Lifecycle")
        LifecycleTransitionReasonMessage = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.LifecycleTransitionReason.Message")
        TargetVolumeValuesName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.Name")
        FlexCacheEndpointType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType")
        JunctionPath = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.JunctionPath")
        OntapVolumeType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.OntapVolumeType")
        SecurityStyle = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SecurityStyle")
        SizeInMegabytes = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SizeInMegabytes")
        StorageEfficiencyEnabled = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled")
        StorageVirtualMachineId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId")
        StorageVirtualMachineRoot = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot")
        CoolingPeriod = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod")
        TieringPolicyName = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name")
        UUID = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.UUID")
        CopyTagsToSnapshots = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots")
        OpenZFSConfigurationDataCompressionType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType")
        CopyStrategy = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy")
        SnapshotARN = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN")
        ParentVolumeId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId")
        ReadOnly = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ReadOnly")
        RecordSizeKiB = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB")
        StorageCapacityQuotaGiB = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB")
        StorageCapacityReservationGiB = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB")
        VolumePath = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.VolumePath")
        TargetVolumeValuesResourceARN = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.ResourceARN")
        TargetVolumeValuesVolumeId = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeId")
        VolumeType = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.VolumeType")
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.AdministrativeActions[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.NetworkInterfaceIds[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Intercluster.IpAddresses[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.Endpoints.Management.IpAddresses[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.OntapConfiguration.RouteTableIds[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.SubnetIds[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            Key = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Key")
            Value = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.Tags[j].Value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            Lifecycle = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Lifecycle")
            Name = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.Aliases[j].Name")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.MaintenanceOperationsInProgress[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetFileSystemValues.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                Clients = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k].Clients")

                json1 = CkJsonObject::ckObjectOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k]")
                i1 = 0
                count_i1 = CkJsonObject::ckSizeOfArray(json1,"Options")
                While i1 < count_i1
                    CkJsonObject::setCkI(json1, i1)
                    strVal = CkJsonObject::ckStringOf(json1,"Options[i]")
                    i1 = i1 + 1
                Wend
                CkJsonObject::ckDispose(json1)

                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            Id = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Id")
            StorageCapacityQuotaGiB = CkJsonObject::ckIntOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].StorageCapacityQuotaGiB")
            v_Type = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            Key = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Key")
            Value = CkJsonObject::ckStringOf(jResp,"Snapshot.AdministrativeActions[i].TargetVolumeValues.Tags[j].Value")
            j = j + 1
        Wend
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"Snapshot.Tags")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        Key = CkJsonObject::ckStringOf(jResp,"Snapshot.Tags[i].Key")
        Value = CkJsonObject::ckStringOf(jResp,"Snapshot.Tags[i].Value")
        i = i + 1
    Wend

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


    CkRest::ckDispose(rest)
    CkAuthAws::ckDispose(authAws)
    CkJsonObject::ckDispose(json)
    CkStringBuilder::ckDispose(sbRequestBody)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure