Skip to content

Can't find how to get ClusterToken in the Swagger definition. #22467

Open
@Wzb123456789

Description

@Wzb123456789
  • 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:

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions