https://help.tago.io/portal/en/kb/articles/183-access-management Access Management
If receive an error "Authorization Denied", check policy Access Management / Create in Access Management.
const newAccess = await Resources.accessManagement.create({
active: true,
name: "My Access Policy",
permissions: [
{
effect: "allow",
action: ["access"],
resource: ["access_management"],
},
],
targets: [["analysis", "id", "analysis-id-123"]],
tags: [{ key: "type", value: "admin" }],
});
console.log(newAccess.am_id); // access-id-123
Removes an access policy from your application.
https://help.tago.io/portal/en/kb/articles/183-access-management Access Management
Modifies an existing access policy.
https://help.tago.io/portal/en/kb/articles/183-access-management Access Management
If receive an error "Authorization Denied", check policy Access Management / Edit in Access Management.
const result = await Resources.accessManagement.edit("access-id-123", {
name: "Updated Access Policy",
permissions: [
{
effect: "allow",
action: ["edit"],
resource: ["access_management"],
},
],
tags: [{ key: "type", value: "user" }]
});
console.log(result); // Access Management Successfully Updated
Retrieves detailed information about a specific access policy.
https://help.tago.io/portal/en/kb/articles/183-access-management Access Management
Lists all access rules from the application with pagination support. Use this to retrieve and manage access policies for your application.
Optional
queryObj: AccessQueryhttps://help.tago.io/portal/en/kb/articles/183-access-management Access Management
If receive an error "Authorization Denied", check policy Access Management / Access in Access Management.
const result = await Resources.accessManagement.list({
page: 1,
fields: ["id", "name"],
amount: 10,
orderBy: ["name", "asc"]
});
console.log(result); // [ { id: 'access-id-123', name: '[Analysis] - Test', ...} ]
Creates a new access policy in your application.