// This file is autogenerated, DO NOT EDIT
// rest-api/security/update-cross-cluster-api-key.asciidoc:89

[source, python]
----
resp = client.perform_request(
    "POST",
    "/_security/cross_cluster/api_key",
    headers={"Content-Type": "application/json"},
    body={
        "name": "my-cross-cluster-api-key",
        "access": {
            "search": [
                {
                    "names": [
                        "logs*"
                    ]
                }
            ]
        },
        "metadata": {
            "application": "search"
        }
    },
)
print(resp)
----
