airflow.contrib.operators.gcs_acl_operator

Module Contents

class airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageBucketCreateAclEntryOperator(bucket, entity, role, user_project=None, google_cloud_storage_conn_id='google_cloud_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates a new ACL entry on the specified bucket.

See also

For more information on how to use this operator, take a look at the guide: GoogleCloudStorageBucketCreateAclEntryOperator

Parameters
  • bucket (str) – Name of a bucket.

  • entity (str) – The entity holding the permission, in one of the following forms: user-userId, user-email, group-groupId, group-email, domain-domain, project-team-projectId, allUsers, allAuthenticatedUsers

  • role (str) – The access permission for the entity. Acceptable values are: “OWNER”, “READER”, “WRITER”.

  • user_project (str) – (Optional) The project to be billed for this request. Required for Requester Pays buckets.

  • google_cloud_storage_conn_id (str) – The connection ID to use when connecting to Google Cloud Storage.

template_fields = ['bucket', 'entity', 'role', 'user_project'][source]
execute(self, context)[source]
class airflow.contrib.operators.gcs_acl_operator.GoogleCloudStorageObjectCreateAclEntryOperator(bucket, object_name, entity, role, generation=None, user_project=None, google_cloud_storage_conn_id='google_cloud_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates a new ACL entry on the specified object.

See also

For more information on how to use this operator, take a look at the guide: GoogleCloudStorageObjectCreateAclEntryOperator

Parameters
  • bucket (str) – Name of a bucket.

  • object_name (str) – Name of the object. For information about how to URL encode object names to be path safe, see: https://cloud.google.com/storage/docs/json_api/#encoding

  • entity (str) – The entity holding the permission, in one of the following forms: user-userId, user-email, group-groupId, group-email, domain-domain, project-team-projectId, allUsers, allAuthenticatedUsers

  • role (str) – The access permission for the entity. Acceptable values are: “OWNER”, “READER”.

  • generation (str) – (Optional) If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • user_project (str) – (Optional) The project to be billed for this request. Required for Requester Pays buckets.

  • google_cloud_storage_conn_id (str) – The connection ID to use when connecting to Google Cloud Storage.

template_fields = ['bucket', 'object_name', 'entity', 'role', 'generation', 'user_project'][source]
execute(self, context)[source]