get Volume
Use this data source to get information about an EBS volume for use in other resources.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ebs.EbsFunctions;
import com.pulumi.aws.ebs.inputs.GetVolumeArgs;
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 ebsVolume = EbsFunctions.getVolume(GetVolumeArgs.builder()
.filters(
GetVolumeFilterArgs.builder()
.name("volume-type")
.values("gp2")
.build(),
GetVolumeFilterArgs.builder()
.name("tag:Name")
.values("Example")
.build())
.mostRecent(true)
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getVolume.
Parameters
argument
A collection of arguments for invoking getVolume.
suspend fun getVolume(filters: List<GetVolumeFilter>? = null, mostRecent: Boolean? = null, tags: Map<String, String>? = null): GetVolumeResult
Return
A collection of values returned by getVolume.
Parameters
filters
One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out 1.
most Recent
If more than one result is returned, use the most recent Volume.
tags
Map of tags for the resource.
See also
Return
A collection of values returned by getVolume.
Parameters
argument
Builder for com.pulumi.aws.ebs.kotlin.inputs.GetVolumePlainArgs.