harbor.getProject
Explore with Pulumi AI
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harbor = Pulumi.Harbor;
return await Deployment.RunAsync(() =>
{
var main = Harbor.GetProject.Invoke(new()
{
Name = "library",
});
return new Dictionary<string, object?>
{
["projectId"] = main.Apply(getProjectResult => getProjectResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
main, err := harbor.LookupProject(ctx, &harbor.LookupProjectArgs{
Name: "library",
}, nil)
if err != nil {
return err
}
ctx.Export("projectId", main.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harbor.HarborFunctions;
import com.pulumi.harbor.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 main = HarborFunctions.getProject(GetProjectArgs.builder()
.name("library")
.build());
ctx.export("projectId", main.applyValue(getProjectResult -> getProjectResult.id()));
}
}
import pulumi
import pulumi_harbor as harbor
main = harbor.get_project(name="library")
pulumi.export("projectId", main.id)
import * as pulumi from "@pulumi/pulumi";
import * as harbor from "@pulumi/harbor";
const main = harbor.getProject({
name: "library",
});
export const projectId = main.then(main => main.id);
variables:
main:
fn::invoke:
Function: harbor:getProject
Arguments:
name: library
outputs:
projectId: ${main.id}
Using getProject
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
def get_project(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput
> Note: This function is named LookupProject
in the Go SDK.
public static class GetProject
{
public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: harbor:index/getProject:getProject
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name string
- name String
- name string
- name str
- name String
getProject Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Project
Id int - Public bool
- Vulnerability
Scanning bool
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Project
Id int - Public bool
- Vulnerability
Scanning bool
- id String
The provider-assigned unique ID for this managed resource.
- name String
- project
Id Integer - public_ Boolean
- vulnerability
Scanning Boolean
- id string
The provider-assigned unique ID for this managed resource.
- name string
- project
Id number - public boolean
- vulnerability
Scanning boolean
- id str
The provider-assigned unique ID for this managed resource.
- name str
- project_
id int - public bool
- vulnerability_
scanning bool
- id String
The provider-assigned unique ID for this managed resource.
- name String
- project
Id Number - public Boolean
- vulnerability
Scanning Boolean
Package Details
- Repository
- harbor pulumiverse/pulumi-harbor
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
harbor
Terraform Provider.