Azure / Azure/azure-rest-api-specs
Can't find how to get ClusterToken in the Swagger definition.
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
- **Package Name**: azure-mgmt-containerservice
- **Package Version**: 21.1.0
- **Operating System**: Windows11
- **Python Version**: 3.8
**Describe the bug**
An error was given when I used the `begin_run_command` operation of `azure-mgmt-containerservice`:
```
azure.core.exceptions.HttpResponseError: (MissingAADClusterToken) This cluster have Azure Active Directory enabled, .clusterToken is required.
Code: MissingAADClusterToken
Message: This cluster have Azure Active Directory enabled, .clusterToken is required.
```
**by swagger definition, I can't know where and how to get the `clusterToken`**
**To Reproduce**
Steps to reproduce the behavior:
Configure the certificate and run the following code:
```python
result = client.managed_clusters.begin_run_command(
resource_group_name='',
resource_name='',
request_payload={
"command": "kubectl apply -f ns.yaml",
"context": "xxxx",
"clusterToken": ''
}
)
```
**Expected behavior**
Get `clustertoken` information normally.
Contributor guide
Research direction
Start with the Swagger definition for azure-mgmt-containerservice and the managed_clusters.begin_run_command request payload, then compare it with the Azure Kubernetes Service run-command behavior described in the error. Done means the definition or accompanying guidance clearly identifies how clusterToken is obtained and supplied for Azure Active Directory-enabled clusters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, kubernetes, openapi, python
- Domain
- api, cloud, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100