authzrule attach

Attaches an authorization rule to the specified protected object.

Requires authentication (administrator ID and password) to use this command.

Syntax

authzrule attach protobjid ruleid

Description

At most, one rule can be attached to a given protected object. If the object already has a rule that is attached to it, the specified rule replaces the existing one. The same rule can be attached to multiple protected objects. Ensure that the protected object exists in the protected object space before you attach a rule.

Options

protobjid
Specifies the fully qualified name of the protected object to which the authorization rule is attached. The object must exist, or an error is displayed.
ruleid
Specifies the name of the authorization rule to attach. The rule must exist, or an error is displayed.

Return codes

0
The command completed successfully.
1
The command failed. When a command fails, the pdadmin command provides a description of the error and an error status code in hexadecimal format (for example, 0x14c012f2). See "Error messages" in the IBM Knowledge Center. This reference provides a list of the Security Access Manager error messages by decimal or hexadecimal codes.

Example

The following example attaches the r1 rule to the /Test-Space/folder1 protected object named:
pdadmin sec_master> authzrule attach /Test-Space/folder1 r1

See also