UpdateProject TCL Example
load ./chilkat.dll
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set rest [new_CkRest]
set authAws [new_CkAuthAws]
CkAuthAws_put_AccessKey $authAws "AWS_ACCESS_KEY"
CkAuthAws_put_SecretKey $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_put_Region $authAws "us-west-2"
CkAuthAws_put_ServiceName $authAws "codebuild"
# SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws $rest $authAws
# URL: https://codebuild.us-west-2.amazonaws.com/
# Use the same region as specified above.
set success [CkRest_Connect $rest "codebuild.us-west-2.amazonaws.com" 443 1 1]
if {$success != 1} then {
puts "ConnectFailReason: [CkRest_get_ConnectFailReason $rest]"
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
exit
}
# 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
set json [new_CkJsonObject]
CkJsonObject_UpdateString $json "artifacts.artifactIdentifier" "string"
CkJsonObject_UpdateString $json "artifacts.bucketOwnerAccess" "string"
CkJsonObject_UpdateInt $json "artifacts.encryptionDisabled" 123
CkJsonObject_UpdateString $json "artifacts.location" "string"
CkJsonObject_UpdateString $json "artifacts.name" "string"
CkJsonObject_UpdateString $json "artifacts.namespaceType" "string"
CkJsonObject_UpdateInt $json "artifacts.overrideArtifactName" 123
CkJsonObject_UpdateString $json "artifacts.packaging" "string"
CkJsonObject_UpdateString $json "artifacts.path" "string"
CkJsonObject_UpdateString $json "artifacts.type" "string"
CkJsonObject_UpdateInt $json "badgeEnabled" 123
CkJsonObject_UpdateString $json "buildBatchConfig.batchReportMode" "string"
CkJsonObject_UpdateInt $json "buildBatchConfig.combineArtifacts" 123
CkJsonObject_UpdateString $json "buildBatchConfig.restrictions.computeTypesAllowed[0]" "string"
CkJsonObject_UpdateInt $json "buildBatchConfig.restrictions.maximumBuildsAllowed" 123
CkJsonObject_UpdateString $json "buildBatchConfig.serviceRole" "string"
CkJsonObject_UpdateInt $json "buildBatchConfig.timeoutInMins" 123
CkJsonObject_UpdateString $json "cache.location" "string"
CkJsonObject_UpdateString $json "cache.modes[0]" "string"
CkJsonObject_UpdateString $json "cache.type" "string"
CkJsonObject_UpdateInt $json "concurrentBuildLimit" 123
CkJsonObject_UpdateString $json "description" "string"
CkJsonObject_UpdateString $json "encryptionKey" "string"
CkJsonObject_UpdateString $json "environment.certificate" "string"
CkJsonObject_UpdateString $json "environment.computeType" "string"
CkJsonObject_UpdateString $json "environment.environmentVariables[0].name" "string"
CkJsonObject_UpdateString $json "environment.environmentVariables[0].type" "string"
CkJsonObject_UpdateString $json "environment.environmentVariables[0].value" "string"
CkJsonObject_UpdateString $json "environment.image" "string"
CkJsonObject_UpdateString $json "environment.imagePullCredentialsType" "string"
CkJsonObject_UpdateInt $json "environment.privilegedMode" 123
CkJsonObject_UpdateString $json "environment.registryCredential.credential" "string"
CkJsonObject_UpdateString $json "environment.registryCredential.credentialProvider" "string"
CkJsonObject_UpdateString $json "environment.type" "string"
CkJsonObject_UpdateString $json "fileSystemLocations[0].identifier" "string"
CkJsonObject_UpdateString $json "fileSystemLocations[0].location" "string"
CkJsonObject_UpdateString $json "fileSystemLocations[0].mountOptions" "string"
CkJsonObject_UpdateString $json "fileSystemLocations[0].mountPoint" "string"
CkJsonObject_UpdateString $json "fileSystemLocations[0].type" "string"
CkJsonObject_UpdateString $json "logsConfig.cloudWatchLogs.groupName" "string"
CkJsonObject_UpdateString $json "logsConfig.cloudWatchLogs.status" "string"
CkJsonObject_UpdateString $json "logsConfig.cloudWatchLogs.streamName" "string"
CkJsonObject_UpdateString $json "logsConfig.s3Logs.bucketOwnerAccess" "string"
CkJsonObject_UpdateInt $json "logsConfig.s3Logs.encryptionDisabled" 123
CkJsonObject_UpdateString $json "logsConfig.s3Logs.location" "string"
CkJsonObject_UpdateString $json "logsConfig.s3Logs.status" "string"
CkJsonObject_UpdateString $json "name" "string"
CkJsonObject_UpdateInt $json "queuedTimeoutInMinutes" 123
CkJsonObject_UpdateString $json "secondaryArtifacts[0].artifactIdentifier" "string"
CkJsonObject_UpdateString $json "secondaryArtifacts[0].bucketOwnerAccess" "string"
CkJsonObject_UpdateInt $json "secondaryArtifacts[0].encryptionDisabled" 123
CkJsonObject_UpdateString $json "secondaryArtifacts[0].location" "string"
CkJsonObject_UpdateString $json "secondaryArtifacts[0].name" "string"
CkJsonObject_UpdateString $json "secondaryArtifacts[0].namespaceType" "string"
CkJsonObject_UpdateInt $json "secondaryArtifacts[0].overrideArtifactName" 123
CkJsonObject_UpdateString $json "secondaryArtifacts[0].packaging" "string"
CkJsonObject_UpdateString $json "secondaryArtifacts[0].path" "string"
CkJsonObject_UpdateString $json "secondaryArtifacts[0].type" "string"
CkJsonObject_UpdateString $json "secondarySources[0].auth.resource" "string"
CkJsonObject_UpdateString $json "secondarySources[0].auth.type" "string"
CkJsonObject_UpdateString $json "secondarySources[0].buildspec" "string"
CkJsonObject_UpdateString $json "secondarySources[0].buildStatusConfig.context" "string"
CkJsonObject_UpdateString $json "secondarySources[0].buildStatusConfig.targetUrl" "string"
CkJsonObject_UpdateInt $json "secondarySources[0].gitCloneDepth" 123
CkJsonObject_UpdateInt $json "secondarySources[0].gitSubmodulesConfig.fetchSubmodules" 123
CkJsonObject_UpdateInt $json "secondarySources[0].insecureSsl" 123
CkJsonObject_UpdateString $json "secondarySources[0].location" "string"
CkJsonObject_UpdateInt $json "secondarySources[0].reportBuildStatus" 123
CkJsonObject_UpdateString $json "secondarySources[0].sourceIdentifier" "string"
CkJsonObject_UpdateString $json "secondarySources[0].type" "string"
CkJsonObject_UpdateString $json "secondarySourceVersions[0].sourceIdentifier" "string"
CkJsonObject_UpdateString $json "secondarySourceVersions[0].sourceVersion" "string"
CkJsonObject_UpdateString $json "serviceRole" "string"
CkJsonObject_UpdateString $json "source.auth.resource" "string"
CkJsonObject_UpdateString $json "source.auth.type" "string"
CkJsonObject_UpdateString $json "source.buildspec" "string"
CkJsonObject_UpdateString $json "source.buildStatusConfig.context" "string"
CkJsonObject_UpdateString $json "source.buildStatusConfig.targetUrl" "string"
CkJsonObject_UpdateInt $json "source.gitCloneDepth" 123
CkJsonObject_UpdateInt $json "source.gitSubmodulesConfig.fetchSubmodules" 123
CkJsonObject_UpdateInt $json "source.insecureSsl" 123
CkJsonObject_UpdateString $json "source.location" "string"
CkJsonObject_UpdateInt $json "source.reportBuildStatus" 123
CkJsonObject_UpdateString $json "source.sourceIdentifier" "string"
CkJsonObject_UpdateString $json "source.type" "string"
CkJsonObject_UpdateString $json "sourceVersion" "string"
CkJsonObject_UpdateString $json "tags[0].key" "string"
CkJsonObject_UpdateString $json "tags[0].value" "string"
CkJsonObject_UpdateInt $json "timeoutInMinutes" 123
CkJsonObject_UpdateString $json "vpcConfig.securityGroupIds[0]" "string"
CkJsonObject_UpdateString $json "vpcConfig.subnets[0]" "string"
CkJsonObject_UpdateString $json "vpcConfig.vpcId" "string"
# The JSON request body created by the above code:
# {
# "artifacts": {
# "artifactIdentifier": "string",
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "name": "string",
# "namespaceType": "string",
# "overrideArtifactName": boolean,
# "packaging": "string",
# "path": "string",
# "type": "string"
# },
# "badgeEnabled": boolean,
# "buildBatchConfig": {
# "batchReportMode": "string",
# "combineArtifacts": boolean,
# "restrictions": {
# "computeTypesAllowed": [
# "string"
# ],
# "maximumBuildsAllowed": number
# },
# "serviceRole": "string",
# "timeoutInMins": number
# },
# "cache": {
# "location": "string",
# "modes": [
# "string"
# ],
# "type": "string"
# },
# "concurrentBuildLimit": number,
# "description": "string",
# "encryptionKey": "string",
# "environment": {
# "certificate": "string",
# "computeType": "string",
# "environmentVariables": [
# {
# "name": "string",
# "type": "string",
# "value": "string"
# }
# ],
# "image": "string",
# "imagePullCredentialsType": "string",
# "privilegedMode": boolean,
# "registryCredential": {
# "credential": "string",
# "credentialProvider": "string"
# },
# "type": "string"
# },
# "fileSystemLocations": [
# {
# "identifier": "string",
# "location": "string",
# "mountOptions": "string",
# "mountPoint": "string",
# "type": "string"
# }
# ],
# "logsConfig": {
# "cloudWatchLogs": {
# "groupName": "string",
# "status": "string",
# "streamName": "string"
# },
# "s3Logs": {
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "status": "string"
# }
# },
# "name": "string",
# "queuedTimeoutInMinutes": number,
# "secondaryArtifacts": [
# {
# "artifactIdentifier": "string",
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "name": "string",
# "namespaceType": "string",
# "overrideArtifactName": boolean,
# "packaging": "string",
# "path": "string",
# "type": "string"
# }
# ],
# "secondarySources": [
# {
# "auth": {
# "resource": "string",
# "type": "string"
# },
# "buildspec": "string",
# "buildStatusConfig": {
# "context": "string",
# "targetUrl": "string"
# },
# "gitCloneDepth": number,
# "gitSubmodulesConfig": {
# "fetchSubmodules": boolean
# },
# "insecureSsl": boolean,
# "location": "string",
# "reportBuildStatus": boolean,
# "sourceIdentifier": "string",
# "type": "string"
# }
# ],
# "secondarySourceVersions": [
# {
# "sourceIdentifier": "string",
# "sourceVersion": "string"
# }
# ],
# "serviceRole": "string",
# "source": {
# "auth": {
# "resource": "string",
# "type": "string"
# },
# "buildspec": "string",
# "buildStatusConfig": {
# "context": "string",
# "targetUrl": "string"
# },
# "gitCloneDepth": number,
# "gitSubmodulesConfig": {
# "fetchSubmodules": boolean
# },
# "insecureSsl": boolean,
# "location": "string",
# "reportBuildStatus": boolean,
# "sourceIdentifier": "string",
# "type": "string"
# },
# "sourceVersion": "string",
# "tags": [
# {
# "key": "string",
# "value": "string"
# }
# ],
# "timeoutInMinutes": number,
# "vpcConfig": {
# "securityGroupIds": [
# "string"
# ],
# "subnets": [
# "string"
# ],
# "vpcId": "string"
# }
# }
CkRest_AddHeader $rest "Content-Type" "application/x-amz-json-1.1"
CkRest_AddHeader $rest "X-Amz-Target" "CodeBuild_20161006.UpdateProject"
set sbRequestBody [new_CkStringBuilder]
CkJsonObject_EmitSb $json $sbRequestBody
set sbResponseBody [new_CkStringBuilder]
set success [CkRest_FullRequestSb $rest "POST" "/" $sbRequestBody $sbResponseBody]
if {$success != 1} then {
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set respStatusCode [CkRest_get_ResponseStatusCode $rest]
puts "response status code = $respStatusCode"
if {$respStatusCode != 200} then {
puts "Response Header:"
puts [CkRest_responseHeader $rest]
puts "Response Body:"
puts [CkStringBuilder_getAsString $sbResponseBody]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set jResp [new_CkJsonObject]
CkJsonObject_LoadSb $jResp $sbResponseBody
# The following code parses the JSON response.
# A sample JSON response is shown below the sample code.
# Use this online tool to generate parsing code from sample JSON:
# Generate Parsing Code from JSON
set Arn [CkJsonObject_stringOf $jResp "project.arn"]
set ArtifactIdentifier [CkJsonObject_stringOf $jResp "project.artifacts.artifactIdentifier"]
set BucketOwnerAccess [CkJsonObject_stringOf $jResp "project.artifacts.bucketOwnerAccess"]
set EncryptionDisabled [CkJsonObject_IntOf $jResp "project.artifacts.encryptionDisabled"]
set Location [CkJsonObject_stringOf $jResp "project.artifacts.location"]
set Name [CkJsonObject_stringOf $jResp "project.artifacts.name"]
set NamespaceType [CkJsonObject_stringOf $jResp "project.artifacts.namespaceType"]
set OverrideArtifactName [CkJsonObject_IntOf $jResp "project.artifacts.overrideArtifactName"]
set Packaging [CkJsonObject_stringOf $jResp "project.artifacts.packaging"]
set Path [CkJsonObject_stringOf $jResp "project.artifacts.path"]
set v_Type [CkJsonObject_stringOf $jResp "project.artifacts.type"]
set BadgeEnabled [CkJsonObject_IntOf $jResp "project.badge.badgeEnabled"]
set BadgeRequestUrl [CkJsonObject_stringOf $jResp "project.badge.badgeRequestUrl"]
set BatchReportMode [CkJsonObject_stringOf $jResp "project.buildBatchConfig.batchReportMode"]
set CombineArtifacts [CkJsonObject_IntOf $jResp "project.buildBatchConfig.combineArtifacts"]
set MaximumBuildsAllowed [CkJsonObject_IntOf $jResp "project.buildBatchConfig.restrictions.maximumBuildsAllowed"]
set ServiceRole [CkJsonObject_stringOf $jResp "project.buildBatchConfig.serviceRole"]
set TimeoutInMins [CkJsonObject_IntOf $jResp "project.buildBatchConfig.timeoutInMins"]
set CacheLocation [CkJsonObject_stringOf $jResp "project.cache.location"]
set CacheType [CkJsonObject_stringOf $jResp "project.cache.type"]
set ConcurrentBuildLimit [CkJsonObject_IntOf $jResp "project.concurrentBuildLimit"]
set Created [CkJsonObject_IntOf $jResp "project.created"]
set Description [CkJsonObject_stringOf $jResp "project.description"]
set EncryptionKey [CkJsonObject_stringOf $jResp "project.encryptionKey"]
set Certificate [CkJsonObject_stringOf $jResp "project.environment.certificate"]
set ComputeType [CkJsonObject_stringOf $jResp "project.environment.computeType"]
set Image [CkJsonObject_stringOf $jResp "project.environment.image"]
set ImagePullCredentialsType [CkJsonObject_stringOf $jResp "project.environment.imagePullCredentialsType"]
set PrivilegedMode [CkJsonObject_IntOf $jResp "project.environment.privilegedMode"]
set Credential [CkJsonObject_stringOf $jResp "project.environment.registryCredential.credential"]
set CredentialProvider [CkJsonObject_stringOf $jResp "project.environment.registryCredential.credentialProvider"]
set EnvironmentType [CkJsonObject_stringOf $jResp "project.environment.type"]
set LastModified [CkJsonObject_IntOf $jResp "project.lastModified"]
set GroupName [CkJsonObject_stringOf $jResp "project.logsConfig.cloudWatchLogs.groupName"]
set Status [CkJsonObject_stringOf $jResp "project.logsConfig.cloudWatchLogs.status"]
set StreamName [CkJsonObject_stringOf $jResp "project.logsConfig.cloudWatchLogs.streamName"]
set S3LogsBucketOwnerAccess [CkJsonObject_stringOf $jResp "project.logsConfig.s3Logs.bucketOwnerAccess"]
set S3LogsEncryptionDisabled [CkJsonObject_IntOf $jResp "project.logsConfig.s3Logs.encryptionDisabled"]
set S3LogsLocation [CkJsonObject_stringOf $jResp "project.logsConfig.s3Logs.location"]
set S3LogsStatus [CkJsonObject_stringOf $jResp "project.logsConfig.s3Logs.status"]
set projectName [CkJsonObject_stringOf $jResp "project.name"]
set ProjectVisibility [CkJsonObject_stringOf $jResp "project.projectVisibility"]
set PublicProjectAlias [CkJsonObject_stringOf $jResp "project.publicProjectAlias"]
set QueuedTimeoutInMinutes [CkJsonObject_IntOf $jResp "project.queuedTimeoutInMinutes"]
set ResourceAccessRole [CkJsonObject_stringOf $jResp "project.resourceAccessRole"]
set projectServiceRole [CkJsonObject_stringOf $jResp "project.serviceRole"]
set Resource [CkJsonObject_stringOf $jResp "project.source.auth.resource"]
set AuthType [CkJsonObject_stringOf $jResp "project.source.auth.type"]
set Buildspec [CkJsonObject_stringOf $jResp "project.source.buildspec"]
set Context [CkJsonObject_stringOf $jResp "project.source.buildStatusConfig.context"]
set TargetUrl [CkJsonObject_stringOf $jResp "project.source.buildStatusConfig.targetUrl"]
set GitCloneDepth [CkJsonObject_IntOf $jResp "project.source.gitCloneDepth"]
set FetchSubmodules [CkJsonObject_IntOf $jResp "project.source.gitSubmodulesConfig.fetchSubmodules"]
set InsecureSsl [CkJsonObject_IntOf $jResp "project.source.insecureSsl"]
set SourceLocation [CkJsonObject_stringOf $jResp "project.source.location"]
set ReportBuildStatus [CkJsonObject_IntOf $jResp "project.source.reportBuildStatus"]
set SourceIdentifier [CkJsonObject_stringOf $jResp "project.source.sourceIdentifier"]
set SourceType [CkJsonObject_stringOf $jResp "project.source.type"]
set SourceVersion [CkJsonObject_stringOf $jResp "project.sourceVersion"]
set TimeoutInMinutes [CkJsonObject_IntOf $jResp "project.timeoutInMinutes"]
set VpcId [CkJsonObject_stringOf $jResp "project.vpcConfig.vpcId"]
set BranchFilter [CkJsonObject_stringOf $jResp "project.webhook.branchFilter"]
set BuildType [CkJsonObject_stringOf $jResp "project.webhook.buildType"]
set LastModifiedSecret [CkJsonObject_IntOf $jResp "project.webhook.lastModifiedSecret"]
set PayloadUrl [CkJsonObject_stringOf $jResp "project.webhook.payloadUrl"]
set Secret [CkJsonObject_stringOf $jResp "project.webhook.secret"]
set v_Url [CkJsonObject_stringOf $jResp "project.webhook.url"]
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.buildBatchConfig.restrictions.computeTypesAllowed"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "project.buildBatchConfig.restrictions.computeTypesAllowed[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.cache.modes"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "project.cache.modes[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.environment.environmentVariables"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set name [CkJsonObject_stringOf $jResp "project.environment.environmentVariables[i].name"]
set v_type [CkJsonObject_stringOf $jResp "project.environment.environmentVariables[i].type"]
set value [CkJsonObject_stringOf $jResp "project.environment.environmentVariables[i].value"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.fileSystemLocations"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set identifier [CkJsonObject_stringOf $jResp "project.fileSystemLocations[i].identifier"]
set location [CkJsonObject_stringOf $jResp "project.fileSystemLocations[i].location"]
set mountOptions [CkJsonObject_stringOf $jResp "project.fileSystemLocations[i].mountOptions"]
set mountPoint [CkJsonObject_stringOf $jResp "project.fileSystemLocations[i].mountPoint"]
set v_type [CkJsonObject_stringOf $jResp "project.fileSystemLocations[i].type"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.secondaryArtifacts"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set artifactIdentifier [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].artifactIdentifier"]
set bucketOwnerAccess [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].bucketOwnerAccess"]
set encryptionDisabled [CkJsonObject_IntOf $jResp "project.secondaryArtifacts[i].encryptionDisabled"]
set location [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].location"]
set name [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].name"]
set namespaceType [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].namespaceType"]
set overrideArtifactName [CkJsonObject_IntOf $jResp "project.secondaryArtifacts[i].overrideArtifactName"]
set packaging [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].packaging"]
set path [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].path"]
set v_type [CkJsonObject_stringOf $jResp "project.secondaryArtifacts[i].type"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.secondarySources"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set authResource [CkJsonObject_stringOf $jResp "project.secondarySources[i].auth.resource"]
set authType [CkJsonObject_stringOf $jResp "project.secondarySources[i].auth.type"]
set buildspec [CkJsonObject_stringOf $jResp "project.secondarySources[i].buildspec"]
set buildStatusConfigContext [CkJsonObject_stringOf $jResp "project.secondarySources[i].buildStatusConfig.context"]
set buildStatusConfigTargetUrl [CkJsonObject_stringOf $jResp "project.secondarySources[i].buildStatusConfig.targetUrl"]
set gitCloneDepth [CkJsonObject_IntOf $jResp "project.secondarySources[i].gitCloneDepth"]
set gitSubmodulesConfigFetchSubmodules [CkJsonObject_IntOf $jResp "project.secondarySources[i].gitSubmodulesConfig.fetchSubmodules"]
set insecureSsl [CkJsonObject_IntOf $jResp "project.secondarySources[i].insecureSsl"]
set location [CkJsonObject_stringOf $jResp "project.secondarySources[i].location"]
set reportBuildStatus [CkJsonObject_IntOf $jResp "project.secondarySources[i].reportBuildStatus"]
set sourceIdentifier [CkJsonObject_stringOf $jResp "project.secondarySources[i].sourceIdentifier"]
set v_type [CkJsonObject_stringOf $jResp "project.secondarySources[i].type"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.secondarySourceVersions"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set sourceIdentifier [CkJsonObject_stringOf $jResp "project.secondarySourceVersions[i].sourceIdentifier"]
set sourceVersion [CkJsonObject_stringOf $jResp "project.secondarySourceVersions[i].sourceVersion"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.tags"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set key [CkJsonObject_stringOf $jResp "project.tags[i].key"]
set value [CkJsonObject_stringOf $jResp "project.tags[i].value"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.vpcConfig.securityGroupIds"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "project.vpcConfig.securityGroupIds[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.vpcConfig.subnets"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "project.vpcConfig.subnets[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "project.webhook.filterGroups"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "project.webhook.filterGroups[i]"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set excludeMatchedPattern [CkJsonObject_IntOf $jResp "project.webhook.filterGroups[i][j].excludeMatchedPattern"]
set pattern [CkJsonObject_stringOf $jResp "project.webhook.filterGroups[i][j].pattern"]
set v_type [CkJsonObject_stringOf $jResp "project.webhook.filterGroups[i][j].type"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
# A sample JSON response body parsed by the above code:
# {
# "project": {
# "arn": "string",
# "artifacts": {
# "artifactIdentifier": "string",
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "name": "string",
# "namespaceType": "string",
# "overrideArtifactName": boolean,
# "packaging": "string",
# "path": "string",
# "type": "string"
# },
# "badge": {
# "badgeEnabled": boolean,
# "badgeRequestUrl": "string"
# },
# "buildBatchConfig": {
# "batchReportMode": "string",
# "combineArtifacts": boolean,
# "restrictions": {
# "computeTypesAllowed": [
# "string"
# ],
# "maximumBuildsAllowed": number
# },
# "serviceRole": "string",
# "timeoutInMins": number
# },
# "cache": {
# "location": "string",
# "modes": [
# "string"
# ],
# "type": "string"
# },
# "concurrentBuildLimit": number,
# "created": number,
# "description": "string",
# "encryptionKey": "string",
# "environment": {
# "certificate": "string",
# "computeType": "string",
# "environmentVariables": [
# {
# "name": "string",
# "type": "string",
# "value": "string"
# }
# ],
# "image": "string",
# "imagePullCredentialsType": "string",
# "privilegedMode": boolean,
# "registryCredential": {
# "credential": "string",
# "credentialProvider": "string"
# },
# "type": "string"
# },
# "fileSystemLocations": [
# {
# "identifier": "string",
# "location": "string",
# "mountOptions": "string",
# "mountPoint": "string",
# "type": "string"
# }
# ],
# "lastModified": number,
# "logsConfig": {
# "cloudWatchLogs": {
# "groupName": "string",
# "status": "string",
# "streamName": "string"
# },
# "s3Logs": {
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "status": "string"
# }
# },
# "name": "string",
# "projectVisibility": "string",
# "publicProjectAlias": "string",
# "queuedTimeoutInMinutes": number,
# "resourceAccessRole": "string",
# "secondaryArtifacts": [
# {
# "artifactIdentifier": "string",
# "bucketOwnerAccess": "string",
# "encryptionDisabled": boolean,
# "location": "string",
# "name": "string",
# "namespaceType": "string",
# "overrideArtifactName": boolean,
# "packaging": "string",
# "path": "string",
# "type": "string"
# }
# ],
# "secondarySources": [
# {
# "auth": {
# "resource": "string",
# "type": "string"
# },
# "buildspec": "string",
# "buildStatusConfig": {
# "context": "string",
# "targetUrl": "string"
# },
# "gitCloneDepth": number,
# "gitSubmodulesConfig": {
# "fetchSubmodules": boolean
# },
# "insecureSsl": boolean,
# "location": "string",
# "reportBuildStatus": boolean,
# "sourceIdentifier": "string",
# "type": "string"
# }
# ],
# "secondarySourceVersions": [
# {
# "sourceIdentifier": "string",
# "sourceVersion": "string"
# }
# ],
# "serviceRole": "string",
# "source": {
# "auth": {
# "resource": "string",
# "type": "string"
# },
# "buildspec": "string",
# "buildStatusConfig": {
# "context": "string",
# "targetUrl": "string"
# },
# "gitCloneDepth": number,
# "gitSubmodulesConfig": {
# "fetchSubmodules": boolean
# },
# "insecureSsl": boolean,
# "location": "string",
# "reportBuildStatus": boolean,
# "sourceIdentifier": "string",
# "type": "string"
# },
# "sourceVersion": "string",
# "tags": [
# {
# "key": "string",
# "value": "string"
# }
# ],
# "timeoutInMinutes": number,
# "vpcConfig": {
# "securityGroupIds": [
# "string"
# ],
# "subnets": [
# "string"
# ],
# "vpcId": "string"
# },
# "webhook": {
# "branchFilter": "string",
# "buildType": "string",
# "filterGroups": [
# [
# {
# "excludeMatchedPattern": boolean,
# "pattern": "string",
# "type": "string"
# }
# ]
# ],
# "lastModifiedSecret": number,
# "payloadUrl": "string",
# "secret": "string",
# "url": "string"
# }
# }
# }
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp