get Project
Get information on a single DigitalOcean project. If neither the id
nor name
attributes are provided, then this data source returns the default project.
Example Usage
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.GetProjectArgs;
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 default = DigitaloceanFunctions.getProject();
final var staging = DigitaloceanFunctions.getProject(GetProjectArgs.builder()
.name("My Staging Project")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getProject.
Parameters
argument
A collection of arguments for invoking getProject.
Return
A collection of values returned by getProject.
See also
Parameters
id
the ID of the project to retrieve
name
the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.
Return
A collection of values returned by getProject.
See also
Parameters
argument
Builder for com.pulumi.digitalocean.kotlin.inputs.GetProjectPlainArgs.