getSpacesBucket

Get information on a Spaces bucket for use in other resources. This is useful if the Spaces bucket in question is not managed by the provider or you need to utilize any of the bucket's data.

Example Usage

Get the bucket by name:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DigitaloceanFunctions;
import com.pulumi.digitalocean.inputs.GetSpacesBucketArgs;
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 example = DigitaloceanFunctions.getSpacesBucket(GetSpacesBucketArgs.builder()
.name("my-spaces-bucket")
.region("nyc3")
.build());
ctx.export("bucketDomainName", example.applyValue(getSpacesBucketResult -> getSpacesBucketResult.bucketDomainName()));
}
}

Return

A collection of values returned by getSpacesBucket.

Parameters

argument

A collection of arguments for invoking getSpacesBucket.


suspend fun getSpacesBucket(name: String, region: String): GetSpacesBucketResult

Return

A collection of values returned by getSpacesBucket.

See also

Parameters

name

The name of the Spaces bucket.

region

The slug of the region where the bucket is stored.


Return

A collection of values returned by getSpacesBucket.

See also

Parameters

argument

Builder for com.pulumi.digitalocean.kotlin.inputs.GetSpacesBucketPlainArgs.