Assigning a role in a Cloudera Data Engineering Virtual Cluster
Assign a new role for a user or a group in a Cloudera Data Engineering Virtual Cluster.
- You must retrieve the following information as described in Prerequisites for managing access roles using
Cloudera Data Engineering API:
- The
roleCrnfor the resource role you want to assign. - The
crnfor the user or group receiving the assignment. - The authenticated
cdpcurlenvironment.
- The
Assign a role for a user or a group in a Cloudera Data Engineering
Virtual Cluster.
cdpcurl -X POST https://[***CONTROL-PLANE-HOST***]/dex/api/v1/cluster/[***CLUSTER-ID***]/instance/[***INSTANCE-ID***]/role/assign -d '{
"assigneeCrn": "[***crn of the user or group***]",
"resourceRoleCrn": "[***crn of the role***]"
}' \
--access_key [***ACCESS-KEY***] --private_key [***PRIVATE-KEY***]
Replace the placeholders with the following values:
- The
assigneeCrnvalue is the previously retrieved CRN of the user who needs to be assigned a role. - The
resourceRoleCrnvalue is the previously retrieved CRN of the resource role.
Example:
cdpcurl -X POST https://console-cdp.apps.example.vpc.cloudera.com/dex/api/v1/cluster/cluster-mk2w5fs7/instance/dex-app-kjdfdkg/role/assign -d '{
"assigneeCrn": "crn:altus:iam:us-west-1:bc9b45e9-e962-49b9-9c81-58a40723a3a2:user:1f8ef572-736d-45a0-8e9c-a01c0e4ce07a",
"resourceRoleCrn": "crn:altus:iam:us-west-1:altus:resourceRole:DEVirtualClusterAdmin"
}' \
--access_key 2349bee7-3b8b-474f-ad61-7d78f7c206a9 --private_key vX2M8S4ZWlELiBjgu+vETtWxx40eS1xzaIVe6gIblS8=
