playbook

class lakeformation.pb.playbook.Playbook(boto_ses: Optional[boto3.session.Session] = None, workspace_dir: Optional[Union[pathlib.Path, str]] = None, _skip_validation: bool = False)[source]

[CN]

Playbook 是一个用于管理 LakeFormation Object 的抽象类. 也可以理解为一个数据容器.

每一个 Playbook 只能负责一个 AWS Account 的一个 Region.

Parameters

_skip_validation – internal parameter for testing. If true, skip validation for boto session and workspace directory.

validate()[source]

Validate playbook arguments.

property deployed_pb_json: pathlib.Path

Return the path of the deployed playbook json file.

classmethod deserialize(data: dict) lakeformation.pb.playbook.Playbook[source]

Note

When you serialize, all LF tag instance are managed by playbook, When you deserialize, you should manually associate Lf tag instance with playbook

Parameters

data

Returns

load_deployed_playbook()[source]

Load deployed LakeFormation object from the Playbook.deployed_pb_json file.

If it is not exists, then initiate an empty Playbook and serialize it to Playbook.deployed_pb_json` file

property tag_mapper: Dict[str, ordered_set.OrderedSet]

Aggregate tag by key, and put values for the same key into a set.

apply(verbose=True, dry_run=False)[source]
Parameters
  • verbose

  • dry_run

Returns

**

apply_tags(verbose=True, dry_run=False)[source]

Ref:

apply_tag_attachment(verbose=True, dry_run=False)[source]

Ref:

apply_dl_permission(verbose=True, dry_run=False)[source]
Parameters
  • verbose

  • dry_run

Returns