DescribeJobDefinitions SQL Server Example
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', 'batch'
-- SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
EXEC sp_OAMethod @rest, 'SetAuthAws', @success OUT, @authAws
-- URL: https://batch.us-west-2.amazonaws.com/
-- Use the same region as specified above.
EXEC sp_OAMethod @rest, 'Connect', @success OUT, 'batch.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, 'jobDefinitionName', 'string'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'jobDefinitions[0]', 'string'
EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'maxResults', 123
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'nextToken', 'string'
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'status', 'string'
-- The JSON request body created by the above code:
-- {
-- "jobDefinitionName": "string",
-- "jobDefinitions": [
-- "string"
-- ],
-- "maxResults": number,
-- "nextToken": "string",
-- "status": "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', 'DescribeJobDefinitions'
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', '/v1/describejobdefinitions', @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 @ExecutionRoleArn nvarchar(max)
DECLARE @PlatformVersion nvarchar(max)
DECLARE @Image nvarchar(max)
DECLARE @InstanceType nvarchar(max)
DECLARE @JobRoleArn nvarchar(max)
DECLARE @InitProcessEnabled int
DECLARE @MaxSwap int
DECLARE @SharedMemorySize int
DECLARE @Swappiness int
DECLARE @LogDriver nvarchar(max)
DECLARE @v_String nvarchar(max)
DECLARE @Memory int
DECLARE @AssignPublicIp nvarchar(max)
DECLARE @Privileged int
DECLARE @ReadonlyRootFilesystem int
DECLARE @User nvarchar(max)
DECLARE @Vcpus int
DECLARE @jobDefinitionArn nvarchar(max)
DECLARE @jobDefinitionName nvarchar(max)
DECLARE @MainNode int
DECLARE @NumNodes int
DECLARE @parametersString nvarchar(max)
DECLARE @propagateTags int
DECLARE @Attempts int
DECLARE @revision int
DECLARE @schedulingPriority int
DECLARE @status nvarchar(max)
DECLARE @tagsString nvarchar(max)
DECLARE @AttemptDurationSeconds int
DECLARE @v_type nvarchar(max)
DECLARE @j int
DECLARE @count_j int
DECLARE @strVal nvarchar(max)
DECLARE @name nvarchar(max)
DECLARE @value nvarchar(max)
DECLARE @containerPath nvarchar(max)
DECLARE @hostPath nvarchar(max)
DECLARE @k int
DECLARE @count_k int
DECLARE @size int
DECLARE @valueFrom nvarchar(max)
DECLARE @readOnly int
DECLARE @sourceVolume nvarchar(max)
DECLARE @hardLimit int
DECLARE @softLimit int
DECLARE @AccessPointId nvarchar(max)
DECLARE @Iam nvarchar(max)
DECLARE @FileSystemId nvarchar(max)
DECLARE @RootDirectory nvarchar(max)
DECLARE @TransitEncryption nvarchar(max)
DECLARE @TransitEncryptionPort int
DECLARE @SourcePath nvarchar(max)
DECLARE @containerExecutionRoleArn nvarchar(max)
DECLARE @FargatePlatformConfigurationPlatformVersion nvarchar(max)
DECLARE @containerImage nvarchar(max)
DECLARE @containerInstanceType nvarchar(max)
DECLARE @containerJobRoleArn nvarchar(max)
DECLARE @LinuxParametersInitProcessEnabled int
DECLARE @LinuxParametersMaxSwap int
DECLARE @LinuxParametersSharedMemorySize int
DECLARE @LinuxParametersSwappiness int
DECLARE @LogConfigurationLogDriver nvarchar(max)
DECLARE @OptionsString nvarchar(max)
DECLARE @containerMemory int
DECLARE @NetworkConfigurationAssignPublicIp nvarchar(max)
DECLARE @containerPrivileged int
DECLARE @containerReadonlyRootFilesystem int
DECLARE @containerUser nvarchar(max)
DECLARE @containerVcpus int
DECLARE @targetNodes nvarchar(max)
DECLARE @json1 int
DECLARE @i1 int
DECLARE @count_i1 int
DECLARE @AuthorizationConfigAccessPointId nvarchar(max)
DECLARE @AuthorizationConfigIam nvarchar(max)
DECLARE @efsVolumeConfigurationFileSystemId nvarchar(max)
DECLARE @efsVolumeConfigurationRootDirectory nvarchar(max)
DECLARE @efsVolumeConfigurationTransitEncryption nvarchar(max)
DECLARE @efsVolumeConfigurationTransitEncryptionPort int
DECLARE @hostSourcePath nvarchar(max)
DECLARE @action nvarchar(max)
DECLARE @onExitCode nvarchar(max)
DECLARE @onReason nvarchar(max)
DECLARE @onStatusReason nvarchar(max)
DECLARE @nextToken nvarchar(max)
EXEC sp_OAMethod @jResp, 'StringOf', @nextToken OUT, 'nextToken'
DECLARE @i int
SELECT @i = 0
DECLARE @count_i int
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'jobDefinitions'
WHILE @i < @count_i
BEGIN
EXEC sp_OASetProperty @jResp, 'I', @i
EXEC sp_OAMethod @jResp, 'StringOf', @ExecutionRoleArn OUT, 'jobDefinitions[i].containerProperties.executionRoleArn'
EXEC sp_OAMethod @jResp, 'StringOf', @PlatformVersion OUT, 'jobDefinitions[i].containerProperties.fargatePlatformConfiguration.platformVersion'
EXEC sp_OAMethod @jResp, 'StringOf', @Image OUT, 'jobDefinitions[i].containerProperties.image'
EXEC sp_OAMethod @jResp, 'StringOf', @InstanceType OUT, 'jobDefinitions[i].containerProperties.instanceType'
EXEC sp_OAMethod @jResp, 'StringOf', @JobRoleArn OUT, 'jobDefinitions[i].containerProperties.jobRoleArn'
EXEC sp_OAMethod @jResp, 'IntOf', @InitProcessEnabled OUT, 'jobDefinitions[i].containerProperties.linuxParameters.initProcessEnabled'
EXEC sp_OAMethod @jResp, 'IntOf', @MaxSwap OUT, 'jobDefinitions[i].containerProperties.linuxParameters.maxSwap'
EXEC sp_OAMethod @jResp, 'IntOf', @SharedMemorySize OUT, 'jobDefinitions[i].containerProperties.linuxParameters.sharedMemorySize'
EXEC sp_OAMethod @jResp, 'IntOf', @Swappiness OUT, 'jobDefinitions[i].containerProperties.linuxParameters.swappiness'
EXEC sp_OAMethod @jResp, 'StringOf', @LogDriver OUT, 'jobDefinitions[i].containerProperties.logConfiguration.logDriver'
EXEC sp_OAMethod @jResp, 'StringOf', @v_String OUT, 'jobDefinitions[i].containerProperties.logConfiguration.options.string'
EXEC sp_OAMethod @jResp, 'IntOf', @Memory OUT, 'jobDefinitions[i].containerProperties.memory'
EXEC sp_OAMethod @jResp, 'StringOf', @AssignPublicIp OUT, 'jobDefinitions[i].containerProperties.networkConfiguration.assignPublicIp'
EXEC sp_OAMethod @jResp, 'IntOf', @Privileged OUT, 'jobDefinitions[i].containerProperties.privileged'
EXEC sp_OAMethod @jResp, 'IntOf', @ReadonlyRootFilesystem OUT, 'jobDefinitions[i].containerProperties.readonlyRootFilesystem'
EXEC sp_OAMethod @jResp, 'StringOf', @User OUT, 'jobDefinitions[i].containerProperties.user'
EXEC sp_OAMethod @jResp, 'IntOf', @Vcpus OUT, 'jobDefinitions[i].containerProperties.vcpus'
EXEC sp_OAMethod @jResp, 'StringOf', @jobDefinitionArn OUT, 'jobDefinitions[i].jobDefinitionArn'
EXEC sp_OAMethod @jResp, 'StringOf', @jobDefinitionName OUT, 'jobDefinitions[i].jobDefinitionName'
EXEC sp_OAMethod @jResp, 'IntOf', @MainNode OUT, 'jobDefinitions[i].nodeProperties.mainNode'
EXEC sp_OAMethod @jResp, 'IntOf', @NumNodes OUT, 'jobDefinitions[i].nodeProperties.numNodes'
EXEC sp_OAMethod @jResp, 'StringOf', @parametersString OUT, 'jobDefinitions[i].parameters.string'
EXEC sp_OAMethod @jResp, 'IntOf', @propagateTags OUT, 'jobDefinitions[i].propagateTags'
EXEC sp_OAMethod @jResp, 'IntOf', @Attempts OUT, 'jobDefinitions[i].retryStrategy.attempts'
EXEC sp_OAMethod @jResp, 'IntOf', @revision OUT, 'jobDefinitions[i].revision'
EXEC sp_OAMethod @jResp, 'IntOf', @schedulingPriority OUT, 'jobDefinitions[i].schedulingPriority'
EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'jobDefinitions[i].status'
EXEC sp_OAMethod @jResp, 'StringOf', @tagsString OUT, 'jobDefinitions[i].tags.string'
EXEC sp_OAMethod @jResp, 'IntOf', @AttemptDurationSeconds OUT, 'jobDefinitions[i].timeout.attemptDurationSeconds'
EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'jobDefinitions[i].type'
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.command'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'jobDefinitions[i].containerProperties.command[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.environment'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].containerProperties.environment[j].name'
EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'jobDefinitions[i].containerProperties.environment[j].value'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.linuxParameters.devices'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].containerProperties.linuxParameters.devices[j].containerPath'
EXEC sp_OAMethod @jResp, 'StringOf', @hostPath OUT, 'jobDefinitions[i].containerProperties.linuxParameters.devices[j].hostPath'
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].containerProperties.linuxParameters.devices[j].permissions'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'jobDefinitions[i].containerProperties.linuxParameters.devices[j].permissions[k]'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.linuxParameters.tmpfs'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].containerPath'
EXEC sp_OAMethod @jResp, 'IntOf', @size OUT, 'jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].size'
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].mountOptions'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].mountOptions[k]'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.logConfiguration.secretOptions'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].containerProperties.logConfiguration.secretOptions[j].name'
EXEC sp_OAMethod @jResp, 'StringOf', @valueFrom OUT, 'jobDefinitions[i].containerProperties.logConfiguration.secretOptions[j].valueFrom'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.mountPoints'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].containerProperties.mountPoints[j].containerPath'
EXEC sp_OAMethod @jResp, 'IntOf', @readOnly OUT, 'jobDefinitions[i].containerProperties.mountPoints[j].readOnly'
EXEC sp_OAMethod @jResp, 'StringOf', @sourceVolume OUT, 'jobDefinitions[i].containerProperties.mountPoints[j].sourceVolume'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.resourceRequirements'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'jobDefinitions[i].containerProperties.resourceRequirements[j].type'
EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'jobDefinitions[i].containerProperties.resourceRequirements[j].value'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.secrets'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].containerProperties.secrets[j].name'
EXEC sp_OAMethod @jResp, 'StringOf', @valueFrom OUT, 'jobDefinitions[i].containerProperties.secrets[j].valueFrom'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.ulimits'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'IntOf', @hardLimit OUT, 'jobDefinitions[i].containerProperties.ulimits[j].hardLimit'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].containerProperties.ulimits[j].name'
EXEC sp_OAMethod @jResp, 'IntOf', @softLimit OUT, 'jobDefinitions[i].containerProperties.ulimits[j].softLimit'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].containerProperties.volumes'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @AccessPointId OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId'
EXEC sp_OAMethod @jResp, 'StringOf', @Iam OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.authorizationConfig.iam'
EXEC sp_OAMethod @jResp, 'StringOf', @FileSystemId OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.fileSystemId'
EXEC sp_OAMethod @jResp, 'StringOf', @RootDirectory OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.rootDirectory'
EXEC sp_OAMethod @jResp, 'StringOf', @TransitEncryption OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.transitEncryption'
EXEC sp_OAMethod @jResp, 'IntOf', @TransitEncryptionPort OUT, 'jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.transitEncryptionPort'
EXEC sp_OAMethod @jResp, 'StringOf', @SourcePath OUT, 'jobDefinitions[i].containerProperties.volumes[j].host.sourcePath'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].containerProperties.volumes[j].name'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @containerExecutionRoleArn OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn'
EXEC sp_OAMethod @jResp, 'StringOf', @FargatePlatformConfigurationPlatformVersion OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion'
EXEC sp_OAMethod @jResp, 'StringOf', @containerImage OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.image'
EXEC sp_OAMethod @jResp, 'StringOf', @containerInstanceType OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.instanceType'
EXEC sp_OAMethod @jResp, 'StringOf', @containerJobRoleArn OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn'
EXEC sp_OAMethod @jResp, 'IntOf', @LinuxParametersInitProcessEnabled OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled'
EXEC sp_OAMethod @jResp, 'IntOf', @LinuxParametersMaxSwap OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap'
EXEC sp_OAMethod @jResp, 'IntOf', @LinuxParametersSharedMemorySize OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize'
EXEC sp_OAMethod @jResp, 'IntOf', @LinuxParametersSwappiness OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness'
EXEC sp_OAMethod @jResp, 'StringOf', @LogConfigurationLogDriver OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver'
EXEC sp_OAMethod @jResp, 'StringOf', @OptionsString OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string'
EXEC sp_OAMethod @jResp, 'IntOf', @containerMemory OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.memory'
EXEC sp_OAMethod @jResp, 'StringOf', @NetworkConfigurationAssignPublicIp OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp'
EXEC sp_OAMethod @jResp, 'IntOf', @containerPrivileged OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.privileged'
EXEC sp_OAMethod @jResp, 'IntOf', @containerReadonlyRootFilesystem OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem'
EXEC sp_OAMethod @jResp, 'StringOf', @containerUser OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.user'
EXEC sp_OAMethod @jResp, 'IntOf', @containerVcpus OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.vcpus'
EXEC sp_OAMethod @jResp, 'StringOf', @targetNodes OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].targetNodes'
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.command'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.command[k]'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name'
EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath'
EXEC sp_OAMethod @jResp, 'StringOf', @hostPath OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath'
EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]'
SELECT @i1 = 0
EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'permissions'
WHILE @i1 < @count_i1
BEGIN
EXEC sp_OASetProperty @json1, 'I', @i1
EXEC sp_OAMethod @json1, 'StringOf', @strVal OUT, 'permissions[i]'
SELECT @i1 = @i1 + 1
END
EXEC @hr = sp_OADestroy @json1
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath'
EXEC sp_OAMethod @jResp, 'IntOf', @size OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size'
EXEC sp_OAMethod @jResp, 'ObjectOf', @json1 OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]'
SELECT @i1 = 0
EXEC sp_OAMethod @json1, 'SizeOfArray', @count_i1 OUT, 'mountOptions'
WHILE @i1 < @count_i1
BEGIN
EXEC sp_OASetProperty @json1, 'I', @i1
EXEC sp_OAMethod @json1, 'StringOf', @strVal OUT, 'mountOptions[i]'
SELECT @i1 = @i1 + 1
END
EXEC @hr = sp_OADestroy @json1
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name'
EXEC sp_OAMethod @jResp, 'StringOf', @valueFrom OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @containerPath OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath'
EXEC sp_OAMethod @jResp, 'IntOf', @readOnly OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly'
EXEC sp_OAMethod @jResp, 'StringOf', @sourceVolume OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type'
EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name'
EXEC sp_OAMethod @jResp, 'StringOf', @valueFrom OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'IntOf', @hardLimit OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name'
EXEC sp_OAMethod @jResp, 'IntOf', @softLimit OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit'
SELECT @k = @k + 1
END
SELECT @k = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_k OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes'
WHILE @k < @count_k
BEGIN
EXEC sp_OASetProperty @jResp, 'K', @k
EXEC sp_OAMethod @jResp, 'StringOf', @AuthorizationConfigAccessPointId OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId'
EXEC sp_OAMethod @jResp, 'StringOf', @AuthorizationConfigIam OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam'
EXEC sp_OAMethod @jResp, 'StringOf', @efsVolumeConfigurationFileSystemId OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId'
EXEC sp_OAMethod @jResp, 'StringOf', @efsVolumeConfigurationRootDirectory OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory'
EXEC sp_OAMethod @jResp, 'StringOf', @efsVolumeConfigurationTransitEncryption OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption'
EXEC sp_OAMethod @jResp, 'IntOf', @efsVolumeConfigurationTransitEncryptionPort OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort'
EXEC sp_OAMethod @jResp, 'StringOf', @hostSourcePath OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath'
EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name'
SELECT @k = @k + 1
END
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].platformCapabilities'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'jobDefinitions[i].platformCapabilities[j]'
SELECT @j = @j + 1
END
SELECT @j = 0
EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'jobDefinitions[i].retryStrategy.evaluateOnExit'
WHILE @j < @count_j
BEGIN
EXEC sp_OASetProperty @jResp, 'J', @j
EXEC sp_OAMethod @jResp, 'StringOf', @action OUT, 'jobDefinitions[i].retryStrategy.evaluateOnExit[j].action'
EXEC sp_OAMethod @jResp, 'StringOf', @onExitCode OUT, 'jobDefinitions[i].retryStrategy.evaluateOnExit[j].onExitCode'
EXEC sp_OAMethod @jResp, 'StringOf', @onReason OUT, 'jobDefinitions[i].retryStrategy.evaluateOnExit[j].onReason'
EXEC sp_OAMethod @jResp, 'StringOf', @onStatusReason OUT, 'jobDefinitions[i].retryStrategy.evaluateOnExit[j].onStatusReason'
SELECT @j = @j + 1
END
SELECT @i = @i + 1
END
-- A sample JSON response body parsed by the above code:
-- {
-- "jobDefinitions": [
-- {
-- "containerProperties": {
-- "command": [
-- "string"
-- ],
-- "environment": [
-- {
-- "name": "string",
-- "value": "string"
-- }
-- ],
-- "executionRoleArn": "string",
-- "fargatePlatformConfiguration": {
-- "platformVersion": "string"
-- },
-- "image": "string",
-- "instanceType": "string",
-- "jobRoleArn": "string",
-- "linuxParameters": {
-- "devices": [
-- {
-- "containerPath": "string",
-- "hostPath": "string",
-- "permissions": [
-- "string"
-- ]
-- }
-- ],
-- "initProcessEnabled": boolean,
-- "maxSwap": number,
-- "sharedMemorySize": number,
-- "swappiness": number,
-- "tmpfs": [
-- {
-- "containerPath": "string",
-- "mountOptions": [
-- "string"
-- ],
-- "size": number
-- }
-- ]
-- },
-- "logConfiguration": {
-- "logDriver": "string",
-- "options": {
-- "string": "string"
-- },
-- "secretOptions": [
-- {
-- "name": "string",
-- "valueFrom": "string"
-- }
-- ]
-- },
-- "memory": number,
-- "mountPoints": [
-- {
-- "containerPath": "string",
-- "readOnly": boolean,
-- "sourceVolume": "string"
-- }
-- ],
-- "networkConfiguration": {
-- "assignPublicIp": "string"
-- },
-- "privileged": boolean,
-- "readonlyRootFilesystem": boolean,
-- "resourceRequirements": [
-- {
-- "type": "string",
-- "value": "string"
-- }
-- ],
-- "secrets": [
-- {
-- "name": "string",
-- "valueFrom": "string"
-- }
-- ],
-- "ulimits": [
-- {
-- "hardLimit": number,
-- "name": "string",
-- "softLimit": number
-- }
-- ],
-- "user": "string",
-- "vcpus": number,
-- "volumes": [
-- {
-- "efsVolumeConfiguration": {
-- "authorizationConfig": {
-- "accessPointId": "string",
-- "iam": "string"
-- },
-- "fileSystemId": "string",
-- "rootDirectory": "string",
-- "transitEncryption": "string",
-- "transitEncryptionPort": number
-- },
-- "host": {
-- "sourcePath": "string"
-- },
-- "name": "string"
-- }
-- ]
-- },
-- "jobDefinitionArn": "string",
-- "jobDefinitionName": "string",
-- "nodeProperties": {
-- "mainNode": number,
-- "nodeRangeProperties": [
-- {
-- "container": {
-- "command": [
-- "string"
-- ],
-- "environment": [
-- {
-- "name": "string",
-- "value": "string"
-- }
-- ],
-- "executionRoleArn": "string",
-- "fargatePlatformConfiguration": {
-- "platformVersion": "string"
-- },
-- "image": "string",
-- "instanceType": "string",
-- "jobRoleArn": "string",
-- "linuxParameters": {
-- "devices": [
-- {
-- "containerPath": "string",
-- "hostPath": "string",
-- "permissions": [
-- "string"
-- ]
-- }
-- ],
-- "initProcessEnabled": boolean,
-- "maxSwap": number,
-- "sharedMemorySize": number,
-- "swappiness": number,
-- "tmpfs": [
-- {
-- "containerPath": "string",
-- "mountOptions": [
-- "string"
-- ],
-- "size": number
-- }
-- ]
-- },
-- "logConfiguration": {
-- "logDriver": "string",
-- "options": {
-- "string": "string"
-- },
-- "secretOptions": [
-- {
-- "name": "string",
-- "valueFrom": "string"
-- }
-- ]
-- },
-- "memory": number,
-- "mountPoints": [
-- {
-- "containerPath": "string",
-- "readOnly": boolean,
-- "sourceVolume": "string"
-- }
-- ],
-- "networkConfiguration": {
-- "assignPublicIp": "string"
-- },
-- "privileged": boolean,
-- "readonlyRootFilesystem": boolean,
-- "resourceRequirements": [
-- {
-- "type": "string",
-- "value": "string"
-- }
-- ],
-- "secrets": [
-- {
-- "name": "string",
-- "valueFrom": "string"
-- }
-- ],
-- "ulimits": [
-- {
-- "hardLimit": number,
-- "name": "string",
-- "softLimit": number
-- }
-- ],
-- "user": "string",
-- "vcpus": number,
-- "volumes": [
-- {
-- "efsVolumeConfiguration": {
-- "authorizationConfig": {
-- "accessPointId": "string",
-- "iam": "string"
-- },
-- "fileSystemId": "string",
-- "rootDirectory": "string",
-- "transitEncryption": "string",
-- "transitEncryptionPort": number
-- },
-- "host": {
-- "sourcePath": "string"
-- },
-- "name": "string"
-- }
-- ]
-- },
-- "targetNodes": "string"
-- }
-- ],
-- "numNodes": number
-- },
-- "parameters": {
-- "string": "string"
-- },
-- "platformCapabilities": [
-- "string"
-- ],
-- "propagateTags": boolean,
-- "retryStrategy": {
-- "attempts": number,
-- "evaluateOnExit": [
-- {
-- "action": "string",
-- "onExitCode": "string",
-- "onReason": "string",
-- "onStatusReason": "string"
-- }
-- ]
-- },
-- "revision": number,
-- "schedulingPriority": number,
-- "status": "string",
-- "tags": {
-- "string": "string"
-- },
-- "timeout": {
-- "attemptDurationSeconds": number
-- },
-- "type": "string"
-- }
-- ],
-- "nextToken": "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