sedai.account
Get all accounts that are integrated with Sedai
Returns
A list of accounts Each account is an object with the following fields:
- id - the account id in Sedai
- name - the name of the account as specified by the user
- accountDetails.cloudProvider - the cloud provider of the account. Values are:
AWS
,AZURE
,GCP
,KUBERNETES
,VMWARE
- accountDetails.integrationType - the type of integration. Values are:
AGENTLESS
,AGENT_BASED
Sample code:
models.to_json(account.get_all_accounts())
Output:
[
{
"id": "5f4f5d3a-9c6e-4b3e-8a5a-1e4b6b5b2a7e",
"name": "test env",
"accountDetails": {
"cloudProvider": "AWS",
"integrationType": "AGENTLESS"
}
}
]
Search for all accounts that are integrated with Sedai that match the given name
Parameters
- name: The name of the account to search for
Returns
A list of accounts that match the given name. Output is in the same structure as
get_all_accounts()
Search for all accounts that are integrated with Sedai that match the given id
Parameters
- id: The accountId of the account to search for
Returns
A list of accounts that match the given id. Output is in the same structure as
get_all_accounts()
Create an account in Sedai
Parameters
- name: The name of the account
- cloud_provider: Cloud provider of the account. Valid values are:
AWS
,AZURE
,GCP
,KUBERNETES
- credentials: Credentials for the account. See :ref:
credentials
for more details - integration_type: Type of integration for Kubernetes accounts. Valid values are:
AGENTLESS
,AGENT_BASED
- cluster_provider: Cluster provider for Kubernetes accounts. Required when adding Kubernetes clusters. Valid values are:
AWS
,AZURE
,GCP
,SELF_MANAGED
- cluster_url: URL of the Kubernetes cluster. Required when adding agentless Kubernetes clusters.
- ca_certificate: Optional Certifying Authority Certificate for connecting agentlessly to Kubernetes clusters.
Returns
True if the account was created successfully, False otherwise
Delete an account in Sedai
Parameters
- name: Name of the account to delete
Returns
True if the account was deleted successfully, False otherwise
Get the agent installation command for the given account
Parameters
- name: Name of tMhe account
Returns
The agent installation command details Contains the following fields:
- accountId - The Sedai account id
- apiKey - The Sedai API key used for the command
- kubeInstallCmd - The kubectl command to install the agent on Kubernetes clusters
- helmInstallCmd - The helm command to install the agent on Kubernetes clusters
Output:
{
"accountId": "n9dngzfd",
"apiKey": "eyJhbGciOiJSUzI1NiJ9...[Truncated]",
"kubeInstallCmd": "kubectl apply -f “https://[Truncated. URL for the YAML file]“",
"helmInstallCmd": "helm upgrade --install sedai-smart-agent-abc oci://[...] --version 1.21.36 -f “https://[Truncated. URL for the YAML file]“]"
}