AWS Glue

2018/08/28 - AWS Glue - 3 new api methods

Changes  Update glue client to latest version

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

If a value of MUST_EXIST is used here, the call will fail unless a policy has already been set. If a value of NOT_Exist is used, the call will fail if a policy has already been set. 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.