policy attach

Attach one or more security policies to one or more volumes on a cluster.

Syntax

CLI

Use the maprcli security policy attach command to display the details of the specified security policy.

/opt/mapr/bin/maprcli security policy attach
             -securitypolicy securityPolicyName
             -volumes volumeNames
             [ -cluster cluster ]    
REST
Request Type GET
Request URL
http[s]://<host>:<port>/rest/security/policy/attach?<parameters>

Parameters

Parameter

Description

securitypolicy The name of the security policy to attach. This is a mandatory parameter. You can specify more than one security policies as a comma-separated list to attach to more than one volumes.
volumes The volume or volumes to which the security policy is to be attached. This is a mandatory parameter. You can specify a comma-separated list of volumes if there are more than one volumes to which the specified security policy or security policies must be attached.
cluster The cluster to which the volumes belong. This parameter is optional. The local cluster is the default cluster.

Examples

Attach a security policy named sp_salesdept to volumes, salesdec and salesnov, on cluster sales20.
/opt/mapr/bin/maprcli security policy attach -securitypolicy sp_salesdept -volumes salesdec,salesnov -cluster sales20 --json                     
Attach a security policy named sp_salesold, sp_salesnew to volumes, salesdec and salesnov, on cluster sales20.
/opt/mapr/bin/maprcli security policy attach -securitypolicy sp_salesold,sp_salesnew -volumes salesdec,salesnov -cluster sales20 --json