File tree Expand file tree Collapse file tree 15 files changed +38
-38
lines changed Expand file tree Collapse file tree 15 files changed +38
-38
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ function main(
5353    const  rotateEncryptionKeyOptions  =  { 
5454      kmsKeyName, 
5555      // Optional: set a generation-match precondition to avoid potential race 
56-       // conditions and data corruptions. The request to upload  is aborted if the 
56+       // conditions and data corruptions. The request to copy  is aborted if the 
5757      // object's generation number does not match your precondition. 
5858      preconditionOpts : { 
5959        ifGenerationMatch : generationMatchPrecondition , 
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function main(
5454
5555    // Optional: 
5656    // Set a generation-match precondition to avoid potential race conditions 
57-     // and data corruptions. The request to upload  is aborted if the object's 
57+     // and data corruptions. The request to compose  is aborted if the object's 
5858    // generation number does not match your precondition. For a destination 
5959    // object that does not yet exist, set the ifGenerationMatch precondition to 0 
6060    // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ function main(
5454
5555    // Optional: 
5656    // Set a generation-match precondition to avoid potential race conditions 
57-     // and data corruptions. The request to upload  is aborted if the object's 
57+     // and data corruptions. The request to copy  is aborted if the object's 
5858    // generation number does not match your precondition. For a destination 
5959    // object that does not yet exist, set the ifGenerationMatch precondition to 0 
6060    // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ function main(
5757
5858    // Optional: 
5959    // Set a generation-match precondition to avoid potential race conditions 
60-     // and data corruptions. The request to upload  is aborted if the object's 
60+     // and data corruptions. The request to copy  is aborted if the object's 
6161    // generation number does not match your precondition. For a destination 
6262    // object that does not yet exist, set the ifGenerationMatch precondition to 0 
6363    // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ function main(
4343
4444  // Optional: 
4545  // Set a generation-match precondition to avoid potential race conditions 
46-   // and data corruptions. The request to upload  is aborted if the object's 
46+   // and data corruptions. The request to delete  is aborted if the object's 
4747  // generation number does not match your precondition. For a destination 
4848  // object that does not yet exist, set the ifGenerationMatch precondition to 0 
4949  // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function main(
4949  async  function  fileChangeStorageClass ( )  { 
5050    // Optional: 
5151    // Set a generation-match precondition to avoid potential race conditions 
52-     // and data corruptions. The request to upload  is aborted if the object's 
52+     // and data corruptions. The request to copy  is aborted if the object's 
5353    // generation number does not match your precondition. For a destination 
5454    // object that does not yet exist, set the ifGenerationMatch precondition to 0 
5555    // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change 2222function  main ( 
2323  bucketName  =  'my-bucket' , 
2424  fileName  =  'file.txt' , 
25-   generationMatchPrecondition  =  0 
25+   metagenerationMatchPrecondition  =  0 
2626)  { 
2727  // [START storage_set_metadata] 
2828  // Imports the Google Cloud client library 
@@ -41,11 +41,11 @@ function main(
4141  // const fileName = 'your-file-name'; 
4242
4343  async  function  setFileMetadata ( )  { 
44-     // Optional: set a generation-match precondition to avoid potential race 
45-     // conditions and data corruptions. The request to upload  is aborted if the 
46-     // object's generation  number does not match your precondition. 
44+     // Optional: set a meta- generation-match precondition to avoid potential race 
45+     // conditions and data corruptions. The request to set metadata  is aborted if the 
46+     // object's metageneration  number does not match your precondition. 
4747    const  options  =  { 
48-       ifGenerationMatch :  generationMatchPrecondition , 
48+       ifMetagenerationMatch :  metagenerationMatchPrecondition , 
4949    } ; 
5050
5151    // Set file metadata. 
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function main(
4848  async  function  moveFile ( )  { 
4949    // Optional: 
5050    // Set a generation-match precondition to avoid potential race conditions 
51-     // and data corruptions. The request to upload  is aborted if the object's 
51+     // and data corruptions. The request to copy  is aborted if the object's 
5252    // generation number does not match your precondition. For a destination 
5353    // object that does not yet exist, set the ifGenerationMatch precondition to 0 
5454    // If the destination object already exists in your bucket, set instead a 
Original file line number Diff line number Diff line change 2323function  main ( 
2424  bucketName  =  'my-bucket' , 
2525  fileName  =  'test.txt' , 
26-   generationMatchPrecondition  =  0 
26+   metagenerationMatchPrecondition  =  0 
2727)  { 
2828  // [START storage_release_event_based_hold] 
2929  /** 
@@ -42,11 +42,11 @@ function main(
4242  const  storage  =  new  Storage ( ) ; 
4343
4444  async  function  releaseEventBasedHold ( )  { 
45-     // Optional: set a generation-match precondition to avoid potential race 
46-     // conditions and data corruptions. The request to upload  is aborted if the 
47-     // object's generation  number does not match your precondition. 
45+     // Optional: set a meta- generation-match precondition to avoid potential race 
46+     // conditions and data corruptions. The request to set metadata  is aborted if the 
47+     // object's metageneration  number does not match your precondition. 
4848    const  options  =  { 
49-       ifGenerationMatch :  generationMatchPrecondition , 
49+       ifMetagenerationMatch :  metagenerationMatchPrecondition , 
5050    } ; 
5151
5252    await  storage . bucket ( bucketName ) . file ( fileName ) . setMetadata ( 
Original file line number Diff line number Diff line change 2323function  main ( 
2424  bucketName  =  'my-bucket' , 
2525  fileName  =  'test.txt' , 
26-   generationMatchPrecondition  =  0 
26+   metagenerationMatchPrecondition  =  0 
2727)  { 
2828  // [START storage_release_temporary_hold] 
2929  /** 
@@ -42,11 +42,11 @@ function main(
4242  const  storage  =  new  Storage ( ) ; 
4343
4444  async  function  releaseTemporaryHold ( )  { 
45-     // Optional: set a generation-match precondition to avoid potential race 
46-     // conditions and data corruptions. The request to upload  is aborted if the 
47-     // object's generation  number does not match your precondition. 
45+     // Optional: set a meta- generation-match precondition to avoid potential race 
46+     // conditions and data corruptions. The request to set metadata  is aborted if the 
47+     // object's metageneration  number does not match your precondition. 
4848    const  options  =  { 
49-       ifGenerationMatch :  generationMatchPrecondition , 
49+       ifMetagenerationMatch :  metagenerationMatchPrecondition , 
5050    } ; 
5151
5252    await  storage . bucket ( bucketName ) . file ( fileName ) . setMetadata ( 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments