update_asset_security

Set an asset's security (inherit from parent, or explicit groups/users).

update_asset_security

Set an asset's security (inherit from parent, or explicit groups/users).

Set security on a confined asset (inherit by default).

Safety class: B · API type: admin · Min version:

📘

Confinement

Class B: asset_id must be within your run-root anchor. Prefer inherit_security=True so the asset stays scoped to its (confined) parent.

Signatures

def update_asset_security(sdk, asset_id, inherit_security=True,
                          security_groups=None, security_users=None):
    """Set asset_id's security; return the response dict or None."""
    return sdk.update_asset_security(asset_id, inherit_security, security_groups, security_users)
export async function updateAssetSecurity(sdk, assetId, inheritSecurity = true,
        securityGroups = null, securityUsers = null) {
    // Set security on a confined asset (inherit by default).
    return await sdk.updateAssetSecurity(assetId, inheritSecurity, securityGroups, securityUsers);
}

Parameters

Parameter (Python)Parameter (JS)TypeRequiredNotes
sdksdkNomad_SDKyes
asset_idassetIdstryese.g. <asset-uuid>
inherit_securityinheritSecuritybool | Nonenoinherit from parent folder
security_groupssecurityGroupslist[dict] | Nonenoe.g. [{"id": "<group-uuid>"}]
security_userssecurityUserslist[dict] | Nonenoe.g. [{"id": "<user-uuid>"}]

Returns

dict | None — updated security info; None on failure.

Errors

  • 401 unauthenticated
  • 404 asset not found

See also: Python ↔ JS naming map · Return shapes.