get Bucket Object
Gets an existing object inside an existing bucket in Google Cloud Storage service (GCS). See the official documentation and API.
Example Usage
Example picture stored within a folder.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.storage.StorageFunctions;
import com.pulumi.gcp.storage.inputs.GetBucketObjectArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var picture = StorageFunctions.getBucketObject(GetBucketObjectArgs.builder()
.bucket("image-store")
.name("folder/butterfly01.jpg")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getBucketObject.
Parameters
argument
A collection of arguments for invoking getBucketObject.
Return
A collection of values returned by getBucketObject.
Parameters
bucket
The name of the containing bucket.
name
The name of the object.
See also
suspend fun getBucketObject(argument: suspend GetBucketObjectPlainArgsBuilder.() -> Unit): GetBucketObjectResult
Return
A collection of values returned by getBucketObject.
Parameters
argument
Builder for com.pulumi.gcp.storage.kotlin.inputs.GetBucketObjectPlainArgs.