La seguente tabella elenca le autorizzazioni Identity and Access Management (IAM)
necessarie per eseguire i comandi gcloud storage. Le autorizzazioni IAM
sono raggruppate per formare i ruoli. Concedi ruoli alle entità.
Consulta le sezioni sotto la tabella per le note sull'utilizzo dei caratteri jolly, del flag --recursive
e del flag --billing-project.
| Comando | Flag | Autorizzazioni IAM obbligatorie |
|---|---|---|
batch-operations jobs create |
storagebatchoperations.jobs.create |
|
batch-operations jobs cancel |
storagebatchoperations.jobs.cancel |
|
batch-operations jobs delete |
storagebatchoperations.jobs.delete |
|
batch-operations jobs get |
storagebatchoperations.jobs.get |
|
batch-operations jobs list |
storagebatchoperations.jobs.list |
|
buckets add-iam-policy-binding |
storage.buckets.getstorage.buckets.getIamPolicystorage.buckets.setIamPolicystorage.buckets.update |
|
buckets anywhere-caches create |
storage.anywhereCaches.create |
|
buckets anywhere-caches describe |
storage.anywhereCaches.get |
|
buckets anywhere-caches list |
storage.anywhereCaches.list |
|
buckets anywhere-caches update |
storage.anywhereCaches.update |
|
buckets anywhere-caches pause |
storage.anywhereCaches.pause |
|
buckets anywhere-caches resume |
storage.anywhereCaches.resume |
|
buckets anywhere-caches disable |
storage.anywhereCaches.disable |
|
buckets create |
storage.buckets.create
storage.buckets.setIpFilter14 |
|
buckets delete |
storage.buckets.delete |
|
buckets describe |
storage.buckets.getstorage.buckets.getIamPolicy1storage.buckets.getIpFilter15 |
|
buckets get-iam-policy |
storage.buckets.getstorage.buckets.getIamPolicy |
|
buckets list |
storage.buckets.liststorage.buckets.getIamPolicy1 |
|
buckets notifications create |
storage.buckets.getstorage.buckets.updatepubsub.topics.get (per il progetto contenente l'argomento Pub/Sub)pubsub.topics.create3 (per il progetto contenente l'argomento Pub/Sub)pubsub.topics.getIamPolicy (per l'argomento Pub/Sub che riceve le notifiche)pubsub.topics.setIamPolicy3 (per l'argomento Pub/Sub che riceve le notifiche) |
|
buckets notifications create |
--skip-topic-setup |
storage.buckets.getstorage.buckets.update |
buckets notifications delete |
storage.buckets.getstorage.buckets.update |
|
buckets notifications describe |
storage.buckets.get |
|
buckets notifications list |
storage.buckets.get |
|
buckets relocate |
storage.buckets.relocate |
|
buckets remove-iam-policy-binding |
storage.buckets.getstorage.buckets.getIamPolicystorage.buckets.setIamPolicystorage.buckets.update |
|
buckets set-iam-policy |
storage.buckets.setIamPolicystorage.buckets.update |
|
buckets update |
storage.buckets.updatestorage.buckets.setIpFilter14 |
|
buckets update |
--no-requester-pays |
storage.buckets.updateresourcemanager.projects.createBillingAssignment2 |
buckets update |
--recovery-point-objective--rpo--[no-]uniform-bucket-level-access |
storage.buckets.getstorage.buckets.update |
buckets update |
--clear-pap--clear-public-access-prevention--[no-]pap--[no-]public-access-prevention |
storage.buckets.getstorage.buckets.updatestorage.buckets.setIamPolicy |
cat |
storage.objects.get |
|
cp |
storage.objects.getstorage.objects.createstorage.objects.list4 (per il bucket di destinazione)
storage.objects.delete5storage.buckets.get12 |
|
du |
storage.objects.list |
|
folders create |
storage.folders.create |
|
folders delete |
storage.folders.delete |
|
folders describe |
storage.folders.get |
|
folders list |
storage.folders.list |
|
folders rename |
storage.folders.renamestorage.folders.create |
|
hash |
storage.objects.get |
|
hmac create |
storage.hmacKeys.create |
|
hmac delete |
storage.hmacKeys.delete |
|
hmac describe |
storage.hmacKeys.get |
|
hmac list |
storage.hmacKeys.list |
|
hmac update |
storage.hmacKeys.update |
|
insights dataset-configs create |
storageinsights.datasetConfigs.create |
|
insights dataset-configs create-link |
storageinsights.datasetConfigs.linkDataset |
|
insights dataset-configs delete |
storageinsights.datasetConfigs.delete |
|
insights dataset-configs delete-link |
storageinsights.datasetConfigs.unlinkDataset |
|
insights dataset-configs describe |
storageinsights.datasetConfigs.get |
|
insights dataset-configs list |
storageinsights.datasetConfigs.list |
|
insights dataset-configs update |
storageinsights.datasetConfigs.update |
|
insights inventory-reports create |
storageinsights.reportConfigs.create |
|
insights inventory-reports delete |
storageinsights.reportConfigs.delete |
|
insights inventory-reports details list |
storageinsights.reportDetails.list |
|
insights inventory-reports details describe |
storageinsights.reportDetails.get |
|
insights inventory-reports list |
storageinsights.reportConfigs.list |
|
insights inventory-reports update |
storageinsights.reportConfigs.getstorageinsights.reportConfigs.update |
|
ls (per l'elenco dei bucket) |
storage.buckets.liststorage.buckets.getIamPolicy6 |
|
ls (per l'elenco degli oggetti) |
storage.objects.get7storage.objects.liststorage.objects.getIamPolicy8 |
|
ls |
--buckets |
storage.buckets.getstorage.buckets.getIamPolicy6 |
storage intelligence-config enable |
storage.intelligenceConfigs.update |
|
storage-intelligence disable |
storage.intelligenceConfigs.update |
|
storage-intelligence describe |
storage.intelligenceConfigs.get |
|
storage-intelligence update |
storage.intelligenceConfigs.update |
|
mv |
storage.objects.getstorage.objects.deletestorage.objects.createstorage.objects.list4storage.objects.delete5storage.buckets.get12 |
|
objects compose |
storage.objects.getstorage.objects.createstorage.objects.delete9 |
|
objects describe |
storage.objects.getstorage.objects.getIamPolicy8 |
|
objects list |
storage.objects.liststorage.objects.getIamPolicy8 |
|
objects update |
storage.objects.getstorage.objects.liststorage.objects.update |
|
objects update |
--storage-class--encryption-key--clear-encryption-key |
storage.objects.getstorage.objects.liststorage.objects.createstorage.objects.delete |
objects update |
--retention-mode--retain-until--clear-retention |
storage.objects.getstorage.objects.liststorage.objects.updatestorage.objects.setRetentionstorage.objects.overrideUnlockedRetention11 |
operations cancel |
storage.bucketOperations.cancel |
|
operations describe |
storage.bucketOperations.get |
|
operations list |
storage.bucketOperations.list |
|
restore |
storage.objects.createstorage.objects.delete9storage.objects.restore |
|
restore |
--async |
storage.objects.createstorage.objects.delete13storage.objects.restorestorage.buckets.restore |
rm |
storage.buckets.deletestorage.objects.deletestorage.objects.list |
|
rsync |
storage.objects.liststorage.objects.getstorage.objects.liststorage.objects.getstorage.objects.createstorage.objects.delete10storage.buckets.get12 |
|
rsync |
--dry-run |
storage.objects.list (per i bucket di origine e di destinazione) |
service-agent |
resourceManager.projects.get |
|
sign-url |
Nessuno; tuttavia, il account di servizio la cui chiave viene utilizzata come parte di questo comando deve disporre dell'autorizzazione per eseguire la richiesta codificata nell'URL firmato. |
1Questa autorizzazione è necessaria solo se vuoi includere le norme IAM nei dettagli.
3Queste autorizzazioni non sono necessarie se l'argomento esiste già e ilaccount di serviziot pertinente ha accesso.
4Questa autorizzazione è obbligatoria solo quando la destinazione nel comando contiene un percorso dell'oggetto.
5Questa autorizzazione è necessaria solo se utilizzi
caricamenti compositi paralleli o se non utilizzi il flag --no-clobber, ma
inserisci un oggetto con lo stesso nome di un oggetto già esistente nel
bucket.
6Questa autorizzazione è necessaria solo se vuoi includere le norme IAM nei dettagli.
7Questa autorizzazione è necessaria solo se utilizzi il flag
--fetch-encrypted-object-hashes.
8Questa autorizzazione è necessaria solo se vuoi includere i criteri IAM nei dettagli e non si applica ai bucket con l'accesso uniforme a livello di bucket attivato.
9 Questa autorizzazione è necessaria solo se l'operazione crea un oggetto con lo stesso nome di un oggetto già esistente nel bucket.
10Questa autorizzazione è necessaria solo se utilizzi il
flag --delete-unmatched-destination-objects o se inserisci un oggetto che
ha lo stesso nome, ma dati diversi, di un oggetto che esiste già
nel bucket.
11Questa autorizzazione è necessaria solo se la richiesta richiede anche l'utilizzo del flag --override-unlocked-retention.
12Questa autorizzazione è necessaria per eseguire
caricamenti compositi paralleli se la proprietà gcloud CLI
storage/parallel_composite_upload_compatibility_check è impostata su True.
13Questa autorizzazione è necessaria solo se la richiesta include il
flag --allow-overwrite e l'operazione crea un oggetto con lo stesso nome
di un oggetto già esistente nel bucket.
14Questa autorizzazione è richiesta solo se la richiesta include il flag --ip-filter-file per creare, aggiornare o eliminare le regole di filtro IP
su un bucket.
15Questa autorizzazione è necessaria solo se vuoi ottenere la configurazione del filtro IP del bucket come parte della risposta.
Il flag di primo livello --billing-project
Se utilizzi il flag globale --billing-project per specificare un progetto a cui
deve essere fatturata la richiesta, devi disporre dell'autorizzazione serviceusage.services.use
per il progetto specificato. Il flag --billing-project viene utilizzato,
ad esempio, quando si accede a un bucket con l'opzione Pagamenti a carico del richiedente attivata.
Caratteri jolly, espressioni regolari e flag ricorsivi
Se utilizzi caratteri jolly URI o espressioni regolari per selezionare più oggetti
in un comando, devi disporre dell'autorizzazione storage.objects.list per il bucket contenente gli
oggetti. Analogamente, se utilizzi caratteri jolly URI o espressioni regolari per selezionare più bucket
in un comando, devi disporre dell'autorizzazione storage.buckets.list per i
progetti contenenti i bucket.
Se utilizzi il flag --recursive, devi disporre dell'autorizzazione storage.objects.list
per il bucket pertinente, oltre alle autorizzazioni richieste per
il comando specifico che stai utilizzando.
Passaggi successivi
- Concedi ruoli IAM a livello di progetto e bucket.
- Esamina i ruoli IAM che contengono le autorizzazioni Cloud Storage.