security iam resource urn

Generates the unique resource name (URN) for a cluster/fabric resource.

You can use the security iam resource urn command to generate a resource URN that is an essential element of an IAM policy statement. See IAM Policy JSON Format for information about the format in which an IAM policy must be written.

The inputs required are clustergroup name, cluster name, resource name and the resource path.

The standard resource URN format is <CLUSTER-GROUP>:<CLUSTER-NAME>:<RESOURCE-TYPE>:<RESOURCE-NAME/PATH>. See Fabric Resource URN Format for details.

Syntax

CLI
maprcli security iam resource urn -clustergroup <Cluster Group> -cluster <Cluster Name> -type <Resource Type> [ -name <Resource
Name> | -path <Resource Path> ]
REST
Request Type PUT
Request URL
http[s]://<host>:<port>/rest/iam/resource/urn?<parameters>

Parameters

Parameter Description
clustergroup (Required) Name of the cluster group.
cluster (Required) Name of the cluster that belongs to the cluster group specified in the command.
type (Required) Cluster/fabric resource type. For example, volume, s3bucket.
path (Required) The path to the resource in the cluster specified in the command, for which you want to generate the resource URN.

Examples for different Resource types

Example 1: Generate resource URN for a volume vol1-1 with path /opt/mapr/vol-1 from the cluster clusterB in the clustergroup cgrpA.
maprcli security iam resource urn -clustergroup cgrpA -cluster clusterB -type volume -path /opt/mapr/vol-1 -json
{
"timestamp":1726152308319,
"timeofday":"2024-09-12 07:45:08.319 GMT-0700 AM",
"status":"OK",
"total":1,
"data":[
{
"ResourceURN":"urn:cgrpA:clusterB:volume:/opt/mapr/vol-1"
}
]
}
Example 2: s3bucket
maprcli security iam resource urn -clustergroup cg1 -cluster clusterX -type s3bucket -name testbucket-1 -json
{
"timestamp":1726152308319,
"timeofday":"2024-09-12 07:45:08.319 GMT-0700 AM",
"status":"OK",
"total":1,
"data":[
{
"ResourceURN":"urn:cg1:clusterX:s3bucket:testbucket-1"
}
]
}
Example 3: Cluster

maprcli security iam resource urn -clustergroup cgrpX -cluster primary -type cluster -json
{
"timestamp":1726152308319,
"timeofday":"2024-09-12 07:45:08.319 GMT-0700 AM",
"status":"OK",
"total":1,
"data":[
{
"ResourceURN":"urn:cgrpX:primary"
}
]
}