getBucketObject

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());
}
}

Return

A collection of values returned by getBucketObject.

Parameters

argument

A collection of arguments for invoking getBucketObject.


suspend fun getBucketObject(bucket: String? = null, name: String? = null): GetBucketObjectResult

Return

A collection of values returned by getBucketObject.

Parameters

bucket

The name of the containing bucket.

name

The name of the object.

See also


Return

A collection of values returned by getBucketObject.

Parameters

argument

Builder for com.pulumi.gcp.storage.kotlin.inputs.GetBucketObjectPlainArgs.

See also