File manager - Edit - /home/u478019808/domains/bestandroidphones.store/public_html/static/img/logo/commands.tar
Back
__pycache__/defacl.cpython-39.pyc 0000644 00000026404 15025166704 0012637 0 ustar 00 a +(Wg: � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm Z dd l mZ dd l mZ ddl m Z ddl mZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl'm)Z) ddl*m+Z+ dZ,dZ-dZ.d Z/d!Z0d"Z1e,e-�2d#� e.�2d#� d$ Z3d%d#�4e/e0 e1 g� Z5ee3e5�Z6ee-e0�Z7ee,e/�Z8ee.e1�Z9G d&d'� d'e�Z:dS )(zFImplementation of default object acl command for Google Cloud Storage.� )�absolute_import)�print_function)�division)�unicode_literalsN)�gcs_json_api)�metrics)�AccessDeniedException)�BadRequestException)� Preconditions)�ServiceException)�Command)�SetAclExceptionHandler)�SetAclFuncWrapper)�CommandArgument)�ApiSelector)�CommandException)�CreateHelpText)�StorageUrlFromString)�UrlsAreForSingleProvider)�storage_v1_messages)� acl_helper)�NO_MAX)�Retry)�GcloudStorageFlag)�GcloudStorageMap)�PRIVATE_DEFAULT_OBJ_ACLzJ gsutil defacl set (<file-path>|<predefined-acl>) gs://<bucket_name>... z( gsutil defacl get gs://<bucket_name> zF gsutil defacl ch [-f] -u|-g|-d|-p <grant>... gs://<bucket_name>... a[ <B>SET</B> The ``defacl set`` command sets default object ACLs for the specified buckets. If you specify a default object ACL for a certain bucket, Cloud Storage applies the default object ACL to all new objects uploaded to that bucket, unless an ACL for that object is separately specified during upload. Similar to the ``acl set`` command, the ``defacl set`` command specifies either a predefined ACL or the path to a file that contains ACL text. See "gsutil help acl" for examples of editing and setting ACLs via the acl command. See `Predefined ACLs <https://cloud.google.com/storage/docs/access-control/lists#predefined-acl>`_ for a list of predefined ACLs. Setting a default object ACL on a bucket provides a convenient way to ensure newly uploaded objects have a specific ACL. If you don't set the bucket's default object ACL, it will default to project-private. If you then upload objects that need a different ACL, you will need to perform a separate ACL update operation for each object. Depending on how many objects require updates, this could be very time-consuming. z{ <B>GET</B> Gets the default ACL text for a bucket, which you can save and edit for use with the "defacl set" command. a� <B>CH</B> The "defacl ch" (or "defacl change") command updates the default object access control list for a bucket. The syntax is shared with the "acl ch" command, so see the "CH" section of "gsutil help acl" for the full help description. <B>CH EXAMPLES</B> Grant anyone on the internet READ access by default to any object created in the bucket example-bucket: gsutil defacl ch -u AllUsers:R gs://example-bucket NOTE: By default, publicly readable objects are served with a Cache-Control header allowing such objects to be cached for 3600 seconds. If you need to ensure that updates become visible immediately, you should set a Cache-Control header of "Cache-Control:private, max-age=0, no-transform" on such objects. For help doing this, see "gsutil help setmeta". Add the user john.doe@example.com to the default object ACL on bucket example-bucket with READ access: gsutil defacl ch -u john.doe@example.com:READ gs://example-bucket Add the group admins@example.com to the default object ACL on bucket example-bucket with OWNER access: gsutil defacl ch -g admins@example.com:O gs://example-bucket Remove the group admins@example.com from the default object ACL on bucket example-bucket: gsutil defacl ch -d admins@example.com gs://example-bucket Add the owners of project example-project-123 to the default object ACL on bucket example-bucket with READ access: gsutil defacl ch -p owners-example-project-123:R gs://example-bucket NOTE: You can replace 'owners' with 'viewers' or 'editors' to grant access to a project's viewers/editors respectively. <B>CH OPTIONS</B> The "ch" sub-command has the following options -d Remove all roles associated with the matching entity. -f Normally gsutil stops at the first error. The -f option causes it to continue when it encounters errors. With this option the gsutil exit status will be 0 even if some ACLs couldn't be changed. -g Add or modify a group entity's role. -p Add or modify a project viewers/editors/owners role. -u Add or modify a user entity's role. � z z. The defacl command has three sub-commands: c s� e Zd ZdZejdg d�ededdddej ej gej e�� e� � ge�d�ge� � gd�d �Zejdg d �ddeeeed �d�Z� fdd�Zdd� Zdd� Zdd� Zdd� Zeeddd�dd� �Zdd� Zdd � Z� Z S )!� DefAclCommandz(Implementation of gsutil defacl command.�defacl)� setdefacl� getdefacl�chdefacl� z fg:u:d:p:F� )�set�get�ch)�command_name_aliases�usage_synopsis�min_args�max_args�supported_sub_args�file_url_ok�provider_url_ok�urls_start_arg�gs_api_support�gs_default_api�argparse_arguments)zdefault aclr r r! �command_helpz*Get, set, or change default ACL on buckets)r% r$ r&