| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 # Copyright 2011 Google Inc. All Rights Reserved. | 2 # Copyright 2011 Google Inc. All Rights Reserved. |
| 3 # | 3 # |
| 4 # Licensed under the Apache License, Version 2.0 (the "License"); | 4 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 # you may not use this file except in compliance with the License. | 5 # you may not use this file except in compliance with the License. |
| 6 # You may obtain a copy of the License at | 6 # You may obtain a copy of the License at |
| 7 # | 7 # |
| 8 # http://www.apache.org/licenses/LICENSE-2.0 | 8 # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 # | 9 # |
| 10 # Unless required by applicable law or agreed to in writing, software | 10 # Unless required by applicable law or agreed to in writing, software |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 gsutil acl set acl.txt gs://bucket/*.jpg | 90 gsutil acl set acl.txt gs://bucket/*.jpg |
| 91 | 91 |
| 92 If you have a large number of ACLs to update you might want to use the | 92 If you have a large number of ACLs to update you might want to use the |
| 93 gsutil -m option, to perform a parallel (multi-threaded/multi-processing) | 93 gsutil -m option, to perform a parallel (multi-threaded/multi-processing) |
| 94 update: | 94 update: |
| 95 | 95 |
| 96 gsutil -m acl set acl.txt gs://bucket/*.jpg | 96 gsutil -m acl set acl.txt gs://bucket/*.jpg |
| 97 | 97 |
| 98 Note that multi-threading/multi-processing is only done when the named URLs | 98 Note that multi-threading/multi-processing is only done when the named URLs |
| 99 refer to objects. gsutil -m acl set gs://bucket1 gs://bucket2 will run the | 99 refer to objects, which happens either if you name specific objects or |
| 100 acl set operations sequentially. | 100 if you enumerate objects by using an object wildcard or specifying |
| 101 the acl -r flag. |
| 101 | 102 |
| 102 | 103 |
| 103 <B>SET OPTIONS</B> | 104 <B>SET OPTIONS</B> |
| 104 The "set" sub-command has the following options | 105 The "set" sub-command has the following options |
| 105 | 106 |
| 106 -R, -r Performs "acl set" request recursively, to all objects under | 107 -R, -r Performs "acl set" request recursively, to all objects under |
| 107 the specified URL. | 108 the specified URL. |
| 108 | 109 |
| 109 -a Performs "acl set" request on all object versions. | 110 -a Performs "acl set" request on all object versions. |
| 110 | 111 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 elif action_subcommand == 'set': | 465 elif action_subcommand == 'set': |
| 465 self._SetAcl() | 466 self._SetAcl() |
| 466 elif action_subcommand in ('ch', 'change'): | 467 elif action_subcommand in ('ch', 'change'): |
| 467 self._ChAcl() | 468 self._ChAcl() |
| 468 else: | 469 else: |
| 469 raise CommandException(('Invalid subcommand "%s" for the %s command.\n' | 470 raise CommandException(('Invalid subcommand "%s" for the %s command.\n' |
| 470 'See "gsutil help acl".') % | 471 'See "gsutil help acl".') % |
| 471 (action_subcommand, self.command_name)) | 472 (action_subcommand, self.command_name)) |
| 472 | 473 |
| 473 return 0 | 474 return 0 |
| OLD | NEW |