Closed MarcoipPolo closed 2 days ago
I am trying to use the REST API to generate service connections to an Azure kubernetes cluster using this culr command:
curl --request POST ` --url https://dev.azure.com/{project_name}/_apis/serviceendpoint/endpoints?api-version=7.2-preview.4 ` --user {user_name}:{password}` --header 'Content-Type: application/json' ` --data $scData $scData = "{ `"data`": { `"authorizationType`": `"ServiceAccount`", `"acceptUntrustedCerts`": true }, `"name`": `"$($json.name)`", `"type`": `"kubernetes`", `"url`": `"$clusterUrl`", `"authorization`": { `"scheme`": `"Token`", `"parameters`": { `"apiToken`": `"$token`", `"serviceAccountCertificate`": `"$certificate`", `"isCreatedFromSecretYaml`": false } }, `"serviceEndpointProjectReferences`": [ { `"name`": `"$($json.name)`", `"projectReference`": { `"id`": `"$($json.devops.projectId)`", `"name`": `"`" } } ] }"
However i am getting this error message:
{ "$id": "1", "innerException": null, "message": "The String length exceeds maximum limit.\r\nParameter name: endpoint.Authorization.Parameters[apitoken]", "typeName": "System.ArgumentException, mscorlib", "typeKey": "ArgumentException", "errorCode": 0, "eventId": 0 }
Questions?
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
I am trying to use the REST API to generate service connections to an Azure kubernetes cluster using this culr command:
However i am getting this error message:
Questions?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.