La tabella seguente elenca le autorizzazioni di 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 richieste |
---|---|---|
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.get storage.buckets.getIamPolicy storage.buckets.setIamPolicy storage.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.setIpFilter 15 |
|
buckets delete |
storage.buckets.delete |
|
buckets describe |
storage.buckets.get storage.buckets.getIamPolicy 1storage.buckets.getIpFilter 16 |
|
buckets get-iam-policy |
storage.buckets.get storage.buckets.getIamPolicy |
|
buckets list |
storage.buckets.list storage.buckets.getIamPolicy 1 |
|
buckets notifications create |
storage.buckets.get storage.buckets.update pubsub.topics.get (per il progetto contenente l'argomento Pub/Sub)pubsub.topics.create 3 (per il progetto contenente l'argomento Pub/Sub)pubsub.topics.getIamPolicy (per l'argomento Pub/Sub che riceve le notifiche)pubsub.topics.setIamPolicy 3 (per l'argomento Pub/Sub che riceve le notifiche) |
|
buckets notifications create |
--skip-topic-setup |
storage.buckets.get storage.buckets.update |
buckets notifications delete |
storage.buckets.get storage.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.get storage.buckets.getIamPolicy storage.buckets.setIamPolicy storage.buckets.update |
|
buckets set-iam-policy |
storage.buckets.setIamPolicy storage.buckets.update |
|
buckets update |
storage.buckets.update storage.buckets.setIpFilter 15 |
|
buckets update |
--no-requester-pays |
storage.buckets.update resourcemanager.projects.createBillingAssignment 2 |
buckets update |
--recovery-point-objective --rpo --[no-]uniform-bucket-level-access |
storage.buckets.get storage.buckets.update |
buckets update |
--clear-pap --clear-public-access-prevention --[no-]pap --[no-]public-access-prevention |
storage.buckets.get storage.buckets.update storage.buckets.setIamPolicy |
cat |
storage.objects.get storage.objects.list 13 |
|
cp |
storage.objects.get storage.objects.create storage.objects.list 4 (per il bucket di destinazione)
storage.objects.delete 5storage.buckets.get 12 |
|
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.rename storage.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.get storageinsights.reportConfigs.update |
|
ls (per l'elenco dei bucket) |
storage.buckets.list storage.buckets.getIamPolicy 6 |
|
ls (per l'elenco degli oggetti) |
storage.objects.get 7storage.objects.list storage.objects.getIamPolicy 8 |
|
ls |
--buckets |
storage.buckets.get storage.buckets.getIamPolicy 6 |
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.get storage.objects.delete storage.objects.create storage.objects.list 4storage.objects.delete 5storage.buckets.get 12 |
|
objects compose |
storage.objects.get storage.objects.create storage.objects.delete 9 |
|
objects describe |
storage.objects.get storage.objects.getIamPolicy 8 |
|
objects list |
storage.objects.list storage.objects.getIamPolicy 8 |
|
objects update |
storage.objects.get storage.objects.list storage.objects.update |
|
objects update |
--storage-class --encryption-key --clear-encryption-key |
storage.objects.get storage.objects.list storage.objects.create storage.objects.delete |
objects update |
--retention-mode --retain-until --clear-retention |
storage.objects.get storage.objects.list storage.objects.update storage.objects.setRetention storage.objects.overrideUnlockedRetention 11 |
operations cancel |
storage.bucketOperations.cancel |
|
operations describe |
storage.bucketOperations.get |
|
operations list |
storage.bucketOperations.list |
|
restore |
storage.objects.create storage.objects.delete 9storage.objects.restore |
|
restore |
--async |
storage.objects.create storage.objects.delete 14storage.objects.restore storage.buckets.restore |
rm |
storage.buckets.delete storage.objects.delete storage.objects.list |
|
rsync |
storage.objects.list storage.objects.get storage.objects.list storage.objects.get storage.objects.create storage.objects.delete 10storage.buckets.get 12 |
|
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.
2 Questa autorizzazione è necessaria solo se non includi un progetto di fatturazione nella richiesta. Per ulteriori informazioni, consulta i requisiti di utilizzo e accesso per i pagamenti a carico del richiedente.
3Queste autorizzazioni non sono necessarie se l'argomento esiste già e ilaccount di serviziot pertinente ha accesso.
4 Questa 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 è obbligatoria 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 già
esistente nel bucket.
11Questa autorizzazione è richiesta solo se la richiesta prevede 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 vuoi utilizzare le espressioni regolari per recuperare gli oggetti.
14Questa 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.
15Questa autorizzazione è richiesta solo se la richiesta include il flag --ip-filter-file
per creare, aggiornare o eliminare le regole di filtro IP
in un bucket.
16Questa 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 che
deve essere fatturato per la tua 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 pagamenti a carico del richiedente abilitati.
Caratteri jolly e flag ricorsivi
Se utilizzi caratteri jolly URI 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 per selezionare più bucket
in un comando, devi disporre dell'autorizzazione storage.buckets.list
per i
progetti che contengono 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.