AWS Glue

2018/10/16 - AWS Glue - 3 new api methods

Changes  New Glue APIs for creating, updating, reading and deleting Data Catalog resource-based policies.

PutResourcePolicy (new) Link ¶

Sets the Data Catalog resource policy for access control.

See also: AWS API Documentation

Request Syntax

client.put_resource_policy(
    PolicyInJson='string',
    PolicyHashCondition='string',
    PolicyExistsCondition='MUST_EXIST'|'NOT_EXIST'|'NONE'
)
type PolicyInJson

string

param PolicyInJson

[REQUIRED]

Contains the policy document to set, in JSON format.

type PolicyHashCondition

string

param PolicyHashCondition

This is the hash value returned when the previous policy was set using PutResourcePolicy. Its purpose is to prevent concurrent modifications of a policy. Do not use this parameter if no previous policy has been set.

type PolicyExistsCondition

string

param PolicyExistsCondition

A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is used to create a new policy. If a value of NONE or a null value is used, the call will not depend on the existence of a policy.

rtype

dict

returns

Response Syntax

{
    'PolicyHash': 'string'
}

Response Structure

  • (dict) --

    • PolicyHash (string) --

      A hash of the policy that has just been set. This must be included in a subsequent call that overwrites or updates this policy.

DeleteResourcePolicy (new) Link ¶

Deletes a specified policy.

See also: AWS API Documentation

Request Syntax

client.delete_resource_policy(
    PolicyHashCondition='string'
)
type PolicyHashCondition

string

param PolicyHashCondition

The hash value returned when this policy was set.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetResourcePolicy (new) Link ¶

Retrieves a specified resource policy.

See also: AWS API Documentation

Request Syntax

client.get_resource_policy()
rtype

dict

returns

Response Syntax

{
    'PolicyInJson': 'string',
    'PolicyHash': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'UpdateTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • PolicyInJson (string) --

      Contains the requested policy document, in JSON format.

    • PolicyHash (string) --

      Contains the hash value associated with this policy.

    • CreateTime (datetime) --

      The date and time at which the policy was created.

    • UpdateTime (datetime) --

      The date and time at which the policy was last updated.