Hadoop Security Guide
Also available as:
PDF
loading table of contents...
Update Service Definition by ID
API NameUpdate Service Definition
Request TypePUT
Request URLservice/public/v2/api/servicedef/{id}
Request Params
{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [],
            "itemId": 5,
            "label": "Index",
            "name": "index"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop",
                "index"
            ],
            "itemId": 6,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "description": "Test Component",
    "enums": [],
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ]
}
Response
{
    "accessTypes": [
        {
            "impliedGrants": [],
            "itemId": 1,
            "label": "select",
            "name": "select"
        },
        {
            "impliedGrants": [],
            "itemId": 2,
            "label": "update",
            "name": "update"
        },
        {
            "impliedGrants": [],
            "itemId": 3,
            "label": "Create",
            "name": "create"
        },
        {
            "impliedGrants": [],
            "itemId": 4,
            "label": "Drop",
            "name": "drop"
        },
        {
            "impliedGrants": [],
            "itemId": 5,
            "label": "Index",
            "name": "index"
        },
        {
            "impliedGrants": [
                "select",
                "update",
                "create",
                "drop",
                "index"
            ],
            "itemId": 6,
            "label": "All",
            "name": "all"
        }
    ],
    "configs": [
        {
            "itemId": 1,
            "label": "Username",
            "mandatory": true,
            "name": "username",
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "itemId": 2,
            "label": "Password",
            "mandatory": true,
            "name": "password",
            "type": "password",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "contextEnrichers": [],
    "createTime": 1451347301000,
    "createdBy": "Admin",
    "description": "Test Component",
    "enums": [],
    "guid": "f889f2d3-920a-4504-9905-809bbc417902",
    "id": 101,
    "implClass": "org.apache.ranger.services.test.RangerServiceTest",
    "isEnabled": true,
    "label": "Test Component",
    "name": "test",
    "options": {},
    "policyConditions": [],
    "resources": [
        {
            "description": "Root Of Resource Hierarchy for Test Component",
            "excludesSupported": true,
            "itemId": 1,
            "label": "Test Root Resource",
            "level": 10,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        },
        {
            "description": "Sub Resource for Test Component",
            "excludesSupported": true,
            "itemId": 2,
            "label": "Test sub resource",
            "level": 20,
            "lookupSupported": true,
            "mandatory": true,
            "matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher",
            "matcherOptions": {
                "ignoreCase": "true",
                "wildCard": "true"
            },
            "name": "sub",
            "parent": "root",
            "recursiveSupported": false,
            "type": "string",
            "uiHint": "",
            "validationMessage": "",
            "validationRegEx": ""
        }
    ],
    "updateTime": 1451351474321,
    "updatedBy": "Admin",
    "version": 2
}