Skip to main content

Get policy for a metadata object

GET 

/metalakes/:metalake/objects/:metadataObjectType/:metadataObjectFullName/policies/:policy

Returns a policy that is attached to a metadata object or inherited from one of its parent objects, with inherited set accordingly. Returns 404 when the policy is attached to neither.

Sign in with a bearer token or a local user's password; see Authentication.

Request​

Path Parameters

    metalake stringrequired

    The name of the metalake

    metadataObjectType stringrequired

    Possible values: [CATALOG, SCHEMA, FILESET, TABLE, VIEW, TOPIC, MODEL, FUNCTION]

    The type of the metadata object. Policies can be associated with these types only; associating a policy with any other type fails with IllegalArgumentException. The server matches the value case-insensitively.

    metadataObjectFullName stringrequired

    The full name of the metadata object

    policy stringrequired

    The name of the policy

Responses​

The policy, with inherited set to true when it comes from a parent object rather than the object itself.

Schema

    code int32

    Possible values: [0]

    Status code of the response

    policy

    object

    A policy whose content is determined by its policy type.

    oneOf

    A policy with custom content

    name stringrequired

    The name of the policy

    comment stringnullable

    A comment about the policy

    policyType stringrequired

    Possible values: [custom]

    The type of the policy

    enabled booleanrequired

    Whether the policy is enabled

    audit

    object

    required

    Audit information for a Gravitino resource.

    creator string

    The user who created the resource

    createTime date-time

    The time the resource was created

    lastModifier string

    The user who last modified the resource

    lastModifiedTime date-time

    The time the resource was last modified

    inherited booleannullable

    Whether the policy is inherited from the parent metadata object

    content

    object

    required

    Content for a custom policy type.

    supportedObjectTypes string[]required

    Possible values: [catalog, schema, fileset, table, view, topic, model, function], >= 1

    Declares the metadata object types the policy's rules are intended for, limited to the types a policy can be associated with. The field is not enforced: associating a policy does not check it, and object policy lookup does not filter by it. Consumers decide whether a policy type applies to the object they are processing. Responses return the values in lowercase; requests accept any case.

    properties

    object

    A map of string-to-string properties for the policy content.

    property name* string
    customRules object

    A map of custom rules where the key is the rule name and the value can be of any type.

Loading...