createSshKey
Create SSH key
Details
- Method:
POST - Path:
/ssh-keys - Operation ID:
create-ssh-key
Parameters
{
"name": {
"description": "The user-supplied name for this SSH Key.",
"required": true,
"location": "body",
"type": "string"
},
"ssh_key": {
"description": "The SSH Key.",
"required": true,
"location": "body",
"type": "string"
}
}Response Schema
{
"type": "object",
"properties": {
"ssh_key": {
"title": "ssh",
"type": "object",
"x-examples": {
"ssh-key": {
"id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60",
"date_created": "2020-10-10T01:56:20+00:00",
"name": "Example SSH Key",
"ssh_key": "ssh-rsa AA... user@example.com"
}
},
"description": "SSH Key information.",
"x-tags": [
"ssh"
],
"properties": {
"id": {
"type": "string",
"description": "A unique ID for the SSH Key."
},
"date_created": {
"type": "string",
"description": "The date this SSH Key was created."
},
"name": {
"type": "string",
"description": "The user-supplied name for this SSH Key."
},
"ssh_key": {
"type": "string",
"description": "The SSH Key."
}
}
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('vultr')
# Call this tool
result = await agent.call_tool('createSshKey', {
# Add required parameters here
})