Chilkat Online Tools

UpdateFileSystem SQL Server Example

Amazon FSx

CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    DECLARE @sTmp0 nvarchar(max)
    -- This example requires the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @rest int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Rest', @rest OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    DECLARE @authAws int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.AuthAws', @authAws OUT

    EXEC sp_OASetProperty @authAws, 'AccessKey', 'AWS_ACCESS_KEY'
    EXEC sp_OASetProperty @authAws, '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.)
    EXEC sp_OASetProperty @authAws, 'Region', 'us-west-2'
    EXEC sp_OASetProperty @authAws, 'ServiceName', 'fsx'
    -- SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    EXEC sp_OAMethod @rest, 'SetAuthAws', @success OUT, @authAws

    -- URL: https://fsx.us-west-2.amazonaws.com/
    -- Use the same region as specified above.
    EXEC sp_OAMethod @rest, 'Connect', @success OUT, 'fsx.us-west-2.amazonaws.com', 443, 1, 1
    IF @success <> 1
      BEGIN

        EXEC sp_OAGetProperty @rest, 'ConnectFailReason', @iTmp0 OUT
        PRINT 'ConnectFailReason: ' + @iTmp0
        EXEC sp_OAGetProperty @rest, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @rest
        EXEC @hr = sp_OADestroy @authAws
        RETURN
      END

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

    DECLARE @json int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'ClientRequestToken', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'FileSystemId', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.AutoImportPolicy', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'LustreConfiguration.AutomaticBackupRetentionDays', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.DailyAutomaticBackupStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.DataCompressionType', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.LogConfiguration.Destination', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.LogConfiguration.Level', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'LustreConfiguration.WeeklyMaintenanceStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OntapConfiguration.AutomaticBackupRetentionDays', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OntapConfiguration.DailyAutomaticBackupStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OntapConfiguration.DiskIopsConfiguration.Iops', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OntapConfiguration.DiskIopsConfiguration.Mode', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OntapConfiguration.FsxAdminPassword', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OntapConfiguration.ThroughputCapacity', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OntapConfiguration.WeeklyMaintenanceStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OpenZFSConfiguration.AutomaticBackupRetentionDays', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OpenZFSConfiguration.CopyTagsToBackups', 123
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OpenZFSConfiguration.CopyTagsToVolumes', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OpenZFSConfiguration.DailyAutomaticBackupStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OpenZFSConfiguration.DiskIopsConfiguration.Iops', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OpenZFSConfiguration.DiskIopsConfiguration.Mode', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'OpenZFSConfiguration.ThroughputCapacity', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'OpenZFSConfiguration.WeeklyMaintenanceStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'StorageCapacity', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.AuditLogConfiguration.AuditLogDestination', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'WindowsConfiguration.AutomaticBackupRetentionDays', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.DailyAutomaticBackupStartTime', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[0]', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.Password', 'string'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName', 'string'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'WindowsConfiguration.ThroughputCapacity', 123
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'WindowsConfiguration.WeeklyMaintenanceStartTime', 'string'

    -- The JSON request body created by the above code:

    -- {
    --   "ClientRequestToken": "string",
    --   "FileSystemId": "string",
    --   "LustreConfiguration": {
    --     "AutoImportPolicy": "string",
    --     "AutomaticBackupRetentionDays": number,
    --     "DailyAutomaticBackupStartTime": "string",
    --     "DataCompressionType": "string",
    --     "LogConfiguration": {
    --       "Destination": "string",
    --       "Level": "string"
    --     },
    --     "WeeklyMaintenanceStartTime": "string"
    --   },
    --   "OntapConfiguration": {
    --     "AutomaticBackupRetentionDays": number,
    --     "DailyAutomaticBackupStartTime": "string",
    --     "DiskIopsConfiguration": {
    --       "Iops": number,
    --       "Mode": "string"
    --     },
    --     "FsxAdminPassword": "string",
    --     "ThroughputCapacity": number,
    --     "WeeklyMaintenanceStartTime": "string"
    --   },
    --   "OpenZFSConfiguration": {
    --     "AutomaticBackupRetentionDays": number,
    --     "CopyTagsToBackups": boolean,
    --     "CopyTagsToVolumes": boolean,
    --     "DailyAutomaticBackupStartTime": "string",
    --     "DiskIopsConfiguration": {
    --       "Iops": number,
    --       "Mode": "string"
    --     },
    --     "ThroughputCapacity": number,
    --     "WeeklyMaintenanceStartTime": "string"
    --   },
    --   "StorageCapacity": number,
    --   "WindowsConfiguration": {
    --     "AuditLogConfiguration": {
    --       "AuditLogDestination": "string",
    --       "FileAccessAuditLogLevel": "string",
    --       "FileShareAccessAuditLogLevel": "string"
    --     },
    --     "AutomaticBackupRetentionDays": number,
    --     "DailyAutomaticBackupStartTime": "string",
    --     "SelfManagedActiveDirectoryConfiguration": {
    --       "DnsIps": [
    --         "string"
    --       ],
    --       "Password": "string",
    --       "UserName": "string"
    --     },
    --     "ThroughputCapacity": number,
    --     "WeeklyMaintenanceStartTime": "string"
    --   }
    -- }

    EXEC sp_OAMethod @rest, 'AddHeader', @success OUT, 'Content-Type', 'application/x-amz-json-1.1'
    EXEC sp_OAMethod @rest, 'AddHeader', @success OUT, 'X-Amz-Target', 'AWSSimbaAPIService_v20180301.UpdateFileSystem'

    DECLARE @sbRequestBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbRequestBody OUT

    EXEC sp_OAMethod @json, 'EmitSb', @success OUT, @sbRequestBody
    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @rest, 'FullRequestSb', @success OUT, 'POST', '/', @sbRequestBody, @sbResponseBody
    IF @success <> 1
      BEGIN
        EXEC sp_OAGetProperty @rest, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @rest
        EXEC @hr = sp_OADestroy @authAws
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END
    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @rest, 'ResponseStatusCode', @respStatusCode OUT

    PRINT 'response status code = ' + @respStatusCode
    IF @respStatusCode <> 200
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @rest, 'ResponseHeader', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Response Body:'
        EXEC sp_OAMethod @sbResponseBody, 'GetAsString', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @rest
        EXEC @hr = sp_OADestroy @authAws
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbRequestBody
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @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

    DECLARE @AdministrativeActionType nvarchar(max)

    DECLARE @ProgressPercent int

    DECLARE @RequestTime int

    DECLARE @Status nvarchar(max)

    DECLARE @TargetFileSystemValues nvarchar(max)

    DECLARE @TargetSnapshotValuesCreationTime int

    DECLARE @TargetSnapshotValuesLifecycle nvarchar(max)

    DECLARE @LifecycleTransitionReasonMessage nvarchar(max)

    DECLARE @Name nvarchar(max)

    DECLARE @TargetSnapshotValuesResourceARN nvarchar(max)

    DECLARE @SnapshotId nvarchar(max)

    DECLARE @VolumeId nvarchar(max)

    DECLARE @TargetVolumeValuesCreationTime int

    DECLARE @TargetVolumeValuesFileSystemId nvarchar(max)

    DECLARE @TargetVolumeValuesLifecycle nvarchar(max)

    DECLARE @TargetVolumeValuesName nvarchar(max)

    DECLARE @FlexCacheEndpointType nvarchar(max)

    DECLARE @JunctionPath nvarchar(max)

    DECLARE @OntapVolumeType nvarchar(max)

    DECLARE @SecurityStyle nvarchar(max)

    DECLARE @SizeInMegabytes int

    DECLARE @StorageEfficiencyEnabled int

    DECLARE @StorageVirtualMachineId nvarchar(max)

    DECLARE @StorageVirtualMachineRoot int

    DECLARE @CoolingPeriod int

    DECLARE @TieringPolicyName nvarchar(max)

    DECLARE @UUID nvarchar(max)

    DECLARE @CopyTagsToSnapshots int

    DECLARE @OpenZFSConfigurationDataCompressionType nvarchar(max)

    DECLARE @CopyStrategy nvarchar(max)

    DECLARE @SnapshotARN nvarchar(max)

    DECLARE @ParentVolumeId nvarchar(max)

    DECLARE @ReadOnly int

    DECLARE @RecordSizeKiB int

    DECLARE @StorageCapacityQuotaGiB int

    DECLARE @StorageCapacityReservationGiB int

    DECLARE @VolumePath nvarchar(max)

    DECLARE @TargetVolumeValuesResourceARN nvarchar(max)

    DECLARE @TargetVolumeValuesVolumeId nvarchar(max)

    DECLARE @VolumeType nvarchar(max)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @strVal nvarchar(max)

    DECLARE @Key nvarchar(max)

    DECLARE @Value nvarchar(max)

    DECLARE @k int

    DECLARE @count_k int

    DECLARE @Clients nvarchar(max)

    DECLARE @json1 int

    DECLARE @i1 int

    DECLARE @count_i1 int

    DECLARE @Id int

    DECLARE @v_Type nvarchar(max)

    DECLARE @CreationTime int
    EXEC sp_OAMethod @jResp, 'IntOf', @CreationTime OUT, 'FileSystem.CreationTime'
    DECLARE @DNSName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DNSName OUT, 'FileSystem.DNSName'
    DECLARE @Message nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @Message OUT, 'FileSystem.FailureDetails.Message'
    DECLARE @FileSystemId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileSystemId OUT, 'FileSystem.FileSystemId'
    DECLARE @FileSystemType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileSystemType OUT, 'FileSystem.FileSystemType'
    DECLARE @FileSystemTypeVersion nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileSystemTypeVersion OUT, 'FileSystem.FileSystemTypeVersion'
    DECLARE @KmsKeyId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @KmsKeyId OUT, 'FileSystem.KmsKeyId'
    DECLARE @Lifecycle nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @Lifecycle OUT, 'FileSystem.Lifecycle'
    DECLARE @AutomaticBackupRetentionDays int
    EXEC sp_OAMethod @jResp, 'IntOf', @AutomaticBackupRetentionDays OUT, 'FileSystem.LustreConfiguration.AutomaticBackupRetentionDays'
    DECLARE @CopyTagsToBackups int
    EXEC sp_OAMethod @jResp, 'IntOf', @CopyTagsToBackups OUT, 'FileSystem.LustreConfiguration.CopyTagsToBackups'
    DECLARE @DailyAutomaticBackupStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DailyAutomaticBackupStartTime OUT, 'FileSystem.LustreConfiguration.DailyAutomaticBackupStartTime'
    DECLARE @DataCompressionType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DataCompressionType OUT, 'FileSystem.LustreConfiguration.DataCompressionType'
    DECLARE @AutoImportPolicy nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @AutoImportPolicy OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy'
    DECLARE @ExportPath nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @ExportPath OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.ExportPath'
    DECLARE @FailureDetailsMessage nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FailureDetailsMessage OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message'
    DECLARE @ImportedFileChunkSize int
    EXEC sp_OAMethod @jResp, 'IntOf', @ImportedFileChunkSize OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize'
    DECLARE @ImportPath nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @ImportPath OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.ImportPath'
    DECLARE @DataRepositoryConfigurationLifecycle nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DataRepositoryConfigurationLifecycle OUT, 'FileSystem.LustreConfiguration.DataRepositoryConfiguration.Lifecycle'
    DECLARE @DeploymentType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DeploymentType OUT, 'FileSystem.LustreConfiguration.DeploymentType'
    DECLARE @DriveCacheType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DriveCacheType OUT, 'FileSystem.LustreConfiguration.DriveCacheType'
    DECLARE @Destination nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @Destination OUT, 'FileSystem.LustreConfiguration.LogConfiguration.Destination'
    DECLARE @Level nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @Level OUT, 'FileSystem.LustreConfiguration.LogConfiguration.Level'
    DECLARE @MountName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @MountName OUT, 'FileSystem.LustreConfiguration.MountName'
    DECLARE @PerUnitStorageThroughput int
    EXEC sp_OAMethod @jResp, 'IntOf', @PerUnitStorageThroughput OUT, 'FileSystem.LustreConfiguration.PerUnitStorageThroughput'
    DECLARE @WeeklyMaintenanceStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @WeeklyMaintenanceStartTime OUT, 'FileSystem.LustreConfiguration.WeeklyMaintenanceStartTime'
    DECLARE @OntapConfigurationAutomaticBackupRetentionDays int
    EXEC sp_OAMethod @jResp, 'IntOf', @OntapConfigurationAutomaticBackupRetentionDays OUT, 'FileSystem.OntapConfiguration.AutomaticBackupRetentionDays'
    DECLARE @OntapConfigurationDailyAutomaticBackupStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OntapConfigurationDailyAutomaticBackupStartTime OUT, 'FileSystem.OntapConfiguration.DailyAutomaticBackupStartTime'
    DECLARE @OntapConfigurationDeploymentType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OntapConfigurationDeploymentType OUT, 'FileSystem.OntapConfiguration.DeploymentType'
    DECLARE @Iops int
    EXEC sp_OAMethod @jResp, 'IntOf', @Iops OUT, 'FileSystem.OntapConfiguration.DiskIopsConfiguration.Iops'
    DECLARE @Mode nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @Mode OUT, 'FileSystem.OntapConfiguration.DiskIopsConfiguration.Mode'
    DECLARE @EndpointIpAddressRange nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @EndpointIpAddressRange OUT, 'FileSystem.OntapConfiguration.EndpointIpAddressRange'
    DECLARE @InterclusterDNSName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @InterclusterDNSName OUT, 'FileSystem.OntapConfiguration.Endpoints.Intercluster.DNSName'
    DECLARE @ManagementDNSName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @ManagementDNSName OUT, 'FileSystem.OntapConfiguration.Endpoints.Management.DNSName'
    DECLARE @PreferredSubnetId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @PreferredSubnetId OUT, 'FileSystem.OntapConfiguration.PreferredSubnetId'
    DECLARE @ThroughputCapacity int
    EXEC sp_OAMethod @jResp, 'IntOf', @ThroughputCapacity OUT, 'FileSystem.OntapConfiguration.ThroughputCapacity'
    DECLARE @OntapConfigurationWeeklyMaintenanceStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OntapConfigurationWeeklyMaintenanceStartTime OUT, 'FileSystem.OntapConfiguration.WeeklyMaintenanceStartTime'
    DECLARE @OpenZFSConfigurationAutomaticBackupRetentionDays int
    EXEC sp_OAMethod @jResp, 'IntOf', @OpenZFSConfigurationAutomaticBackupRetentionDays OUT, 'FileSystem.OpenZFSConfiguration.AutomaticBackupRetentionDays'
    DECLARE @OpenZFSConfigurationCopyTagsToBackups int
    EXEC sp_OAMethod @jResp, 'IntOf', @OpenZFSConfigurationCopyTagsToBackups OUT, 'FileSystem.OpenZFSConfiguration.CopyTagsToBackups'
    DECLARE @CopyTagsToVolumes int
    EXEC sp_OAMethod @jResp, 'IntOf', @CopyTagsToVolumes OUT, 'FileSystem.OpenZFSConfiguration.CopyTagsToVolumes'
    DECLARE @OpenZFSConfigurationDailyAutomaticBackupStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OpenZFSConfigurationDailyAutomaticBackupStartTime OUT, 'FileSystem.OpenZFSConfiguration.DailyAutomaticBackupStartTime'
    DECLARE @OpenZFSConfigurationDeploymentType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OpenZFSConfigurationDeploymentType OUT, 'FileSystem.OpenZFSConfiguration.DeploymentType'
    DECLARE @DiskIopsConfigurationIops int
    EXEC sp_OAMethod @jResp, 'IntOf', @DiskIopsConfigurationIops OUT, 'FileSystem.OpenZFSConfiguration.DiskIopsConfiguration.Iops'
    DECLARE @DiskIopsConfigurationMode nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DiskIopsConfigurationMode OUT, 'FileSystem.OpenZFSConfiguration.DiskIopsConfiguration.Mode'
    DECLARE @RootVolumeId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @RootVolumeId OUT, 'FileSystem.OpenZFSConfiguration.RootVolumeId'
    DECLARE @OpenZFSConfigurationThroughputCapacity int
    EXEC sp_OAMethod @jResp, 'IntOf', @OpenZFSConfigurationThroughputCapacity OUT, 'FileSystem.OpenZFSConfiguration.ThroughputCapacity'
    DECLARE @OpenZFSConfigurationWeeklyMaintenanceStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OpenZFSConfigurationWeeklyMaintenanceStartTime OUT, 'FileSystem.OpenZFSConfiguration.WeeklyMaintenanceStartTime'
    DECLARE @OwnerId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OwnerId OUT, 'FileSystem.OwnerId'
    DECLARE @ResourceARN nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @ResourceARN OUT, 'FileSystem.ResourceARN'
    DECLARE @StorageCapacity int
    EXEC sp_OAMethod @jResp, 'IntOf', @StorageCapacity OUT, 'FileSystem.StorageCapacity'
    DECLARE @StorageType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @StorageType OUT, 'FileSystem.StorageType'
    DECLARE @VpcId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @VpcId OUT, 'FileSystem.VpcId'
    DECLARE @ActiveDirectoryId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @ActiveDirectoryId OUT, 'FileSystem.WindowsConfiguration.ActiveDirectoryId'
    DECLARE @AuditLogDestination nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @AuditLogDestination OUT, 'FileSystem.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination'
    DECLARE @FileAccessAuditLogLevel nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileAccessAuditLogLevel OUT, 'FileSystem.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel'
    DECLARE @FileShareAccessAuditLogLevel nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileShareAccessAuditLogLevel OUT, 'FileSystem.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel'
    DECLARE @WindowsConfigurationAutomaticBackupRetentionDays int
    EXEC sp_OAMethod @jResp, 'IntOf', @WindowsConfigurationAutomaticBackupRetentionDays OUT, 'FileSystem.WindowsConfiguration.AutomaticBackupRetentionDays'
    DECLARE @WindowsConfigurationCopyTagsToBackups int
    EXEC sp_OAMethod @jResp, 'IntOf', @WindowsConfigurationCopyTagsToBackups OUT, 'FileSystem.WindowsConfiguration.CopyTagsToBackups'
    DECLARE @WindowsConfigurationDailyAutomaticBackupStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @WindowsConfigurationDailyAutomaticBackupStartTime OUT, 'FileSystem.WindowsConfiguration.DailyAutomaticBackupStartTime'
    DECLARE @WindowsConfigurationDeploymentType nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @WindowsConfigurationDeploymentType OUT, 'FileSystem.WindowsConfiguration.DeploymentType'
    DECLARE @PreferredFileServerIp nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @PreferredFileServerIp OUT, 'FileSystem.WindowsConfiguration.PreferredFileServerIp'
    DECLARE @WindowsConfigurationPreferredSubnetId nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @WindowsConfigurationPreferredSubnetId OUT, 'FileSystem.WindowsConfiguration.PreferredSubnetId'
    DECLARE @RemoteAdministrationEndpoint nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @RemoteAdministrationEndpoint OUT, 'FileSystem.WindowsConfiguration.RemoteAdministrationEndpoint'
    DECLARE @DomainName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @DomainName OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName'
    DECLARE @FileSystemAdministratorsGroup nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @FileSystemAdministratorsGroup OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup'
    DECLARE @OrganizationalUnitDistinguishedName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @OrganizationalUnitDistinguishedName OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName'
    DECLARE @UserName nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @UserName OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName'
    DECLARE @WindowsConfigurationThroughputCapacity int
    EXEC sp_OAMethod @jResp, 'IntOf', @WindowsConfigurationThroughputCapacity OUT, 'FileSystem.WindowsConfiguration.ThroughputCapacity'
    DECLARE @WindowsConfigurationWeeklyMaintenanceStartTime nvarchar(max)
    EXEC sp_OAMethod @jResp, 'StringOf', @WindowsConfigurationWeeklyMaintenanceStartTime OUT, 'FileSystem.WindowsConfiguration.WeeklyMaintenanceStartTime'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.AdministrativeActions'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @AdministrativeActionType OUT, 'FileSystem.AdministrativeActions[i].AdministrativeActionType'
        EXEC sp_OAMethod @jResp, 'StringOf', @FailureDetailsMessage OUT, 'FileSystem.AdministrativeActions[i].FailureDetails.Message'
        EXEC sp_OAMethod @jResp, 'IntOf', @ProgressPercent OUT, 'FileSystem.AdministrativeActions[i].ProgressPercent'
        EXEC sp_OAMethod @jResp, 'IntOf', @RequestTime OUT, 'FileSystem.AdministrativeActions[i].RequestTime'
        EXEC sp_OAMethod @jResp, 'StringOf', @Status OUT, 'FileSystem.AdministrativeActions[i].Status'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetFileSystemValues OUT, 'FileSystem.AdministrativeActions[i].TargetFileSystemValues'
        EXEC sp_OAMethod @jResp, 'IntOf', @TargetSnapshotValuesCreationTime OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.CreationTime'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetSnapshotValuesLifecycle OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.Lifecycle'
        EXEC sp_OAMethod @jResp, 'StringOf', @LifecycleTransitionReasonMessage OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.LifecycleTransitionReason.Message'
        EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.Name'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetSnapshotValuesResourceARN OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.ResourceARN'
        EXEC sp_OAMethod @jResp, 'StringOf', @SnapshotId OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.SnapshotId'
        EXEC sp_OAMethod @jResp, 'StringOf', @VolumeId OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.VolumeId'
        EXEC sp_OAMethod @jResp, 'IntOf', @TargetVolumeValuesCreationTime OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.CreationTime'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetVolumeValuesFileSystemId OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.FileSystemId'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetVolumeValuesLifecycle OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.Lifecycle'
        EXEC sp_OAMethod @jResp, 'StringOf', @LifecycleTransitionReasonMessage OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.LifecycleTransitionReason.Message'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetVolumeValuesName OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.Name'
        EXEC sp_OAMethod @jResp, 'StringOf', @FlexCacheEndpointType OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType'
        EXEC sp_OAMethod @jResp, 'StringOf', @JunctionPath OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.JunctionPath'
        EXEC sp_OAMethod @jResp, 'StringOf', @OntapVolumeType OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.OntapVolumeType'
        EXEC sp_OAMethod @jResp, 'StringOf', @SecurityStyle OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SecurityStyle'
        EXEC sp_OAMethod @jResp, 'IntOf', @SizeInMegabytes OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SizeInMegabytes'
        EXEC sp_OAMethod @jResp, 'IntOf', @StorageEfficiencyEnabled OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled'
        EXEC sp_OAMethod @jResp, 'StringOf', @StorageVirtualMachineId OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId'
        EXEC sp_OAMethod @jResp, 'IntOf', @StorageVirtualMachineRoot OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot'
        EXEC sp_OAMethod @jResp, 'IntOf', @CoolingPeriod OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod'
        EXEC sp_OAMethod @jResp, 'StringOf', @TieringPolicyName OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name'
        EXEC sp_OAMethod @jResp, 'StringOf', @UUID OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.UUID'
        EXEC sp_OAMethod @jResp, 'IntOf', @CopyTagsToSnapshots OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots'
        EXEC sp_OAMethod @jResp, 'StringOf', @OpenZFSConfigurationDataCompressionType OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType'
        EXEC sp_OAMethod @jResp, 'StringOf', @CopyStrategy OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy'
        EXEC sp_OAMethod @jResp, 'StringOf', @SnapshotARN OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN'
        EXEC sp_OAMethod @jResp, 'StringOf', @ParentVolumeId OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId'
        EXEC sp_OAMethod @jResp, 'IntOf', @ReadOnly OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ReadOnly'
        EXEC sp_OAMethod @jResp, 'IntOf', @RecordSizeKiB OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB'
        EXEC sp_OAMethod @jResp, 'IntOf', @StorageCapacityQuotaGiB OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB'
        EXEC sp_OAMethod @jResp, 'IntOf', @StorageCapacityReservationGiB OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB'
        EXEC sp_OAMethod @jResp, 'StringOf', @VolumePath OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.VolumePath'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetVolumeValuesResourceARN OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.ResourceARN'
        EXEC sp_OAMethod @jResp, 'StringOf', @TargetVolumeValuesVolumeId OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.VolumeId'
        EXEC sp_OAMethod @jResp, 'StringOf', @VolumeType OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.VolumeType'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @Key OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Key'
            EXEC sp_OAMethod @jResp, 'StringOf', @Value OUT, 'FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Value'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            SELECT @k = 0
            EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations'
            WHILE @k < @count_k
              BEGIN
                EXEC sp_OASetProperty @jResp, 'K', @k
                EXEC sp_OAMethod @jResp, 'StringOf', @Clients OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k].Clients'

                EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k]'
                SELECT @i1 = 0
                EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'Options'
                WHILE @i1 < @count_i1
                  BEGIN
                    EXEC sp_OASetProperty @json1, 'I', @i1
                    EXEC sp_OAMethod @json1, 'StringOf', @strVal OUT, 'Options[i]'
                    SELECT @i1 = @i1 + 1
                  END
                EXEC @hr = sp_OADestroy @json1

                SELECT @k = @k + 1
              END
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'IntOf', @Id OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Id'
            EXEC sp_OAMethod @jResp, 'IntOf', @StorageCapacityQuotaGiB OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].StorageCapacityQuotaGiB'
            EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Type'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @Key OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags[j].Key'
            EXEC sp_OAMethod @jResp, 'StringOf', @Value OUT, 'FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags[j].Value'
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.NetworkInterfaceIds'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.NetworkInterfaceIds[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.OntapConfiguration.Endpoints.Intercluster.IpAddresses'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.OntapConfiguration.Endpoints.Intercluster.IpAddresses[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.OntapConfiguration.Endpoints.Management.IpAddresses'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.OntapConfiguration.Endpoints.Management.IpAddresses[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.OntapConfiguration.RouteTableIds'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.OntapConfiguration.RouteTableIds[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.SubnetIds'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.SubnetIds[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.Tags'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @Key OUT, 'FileSystem.Tags[i].Key'
        EXEC sp_OAMethod @jResp, 'StringOf', @Value OUT, 'FileSystem.Tags[i].Value'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.WindowsConfiguration.Aliases'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @Lifecycle OUT, 'FileSystem.WindowsConfiguration.Aliases[i].Lifecycle'
        EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'FileSystem.WindowsConfiguration.Aliases[i].Name'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.WindowsConfiguration.MaintenanceOperationsInProgress'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.WindowsConfiguration.MaintenanceOperationsInProgress[i]'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[i]'
        SELECT @i = @i + 1
      END

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

    -- {
    --   "FileSystem": {
    --     "AdministrativeActions": [
    --       {
    --         "AdministrativeActionType": "string",
    --         "FailureDetails": {
    --           "Message": "string"
    --         },
    --         "ProgressPercent": number,
    --         "RequestTime": number,
    --         "Status": "string",
    --         "TargetFileSystemValues": "FileSystem",
    --         "TargetSnapshotValues": {
    --           "AdministrativeActions": [
    --             "AdministrativeAction"
    --           ],
    --           "CreationTime": number,
    --           "Lifecycle": "string",
    --           "LifecycleTransitionReason": {
    --             "Message": "string"
    --           },
    --           "Name": "string",
    --           "ResourceARN": "string",
    --           "SnapshotId": "string",
    --           "Tags": [
    --             {
    --               "Key": "string",
    --               "Value": "string"
    --             }
    --           ],
    --           "VolumeId": "string"
    --         },
    --         "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,
    --     "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"
    --     }
    --   }
    -- }

    EXEC @hr = sp_OADestroy @rest
    EXEC @hr = sp_OADestroy @authAws
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbRequestBody
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO