dbt Cloud v0.1.20 published on Friday, Sep 27, 2024 by Pulumi
dbtcloud.getProject
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
// projects data sources can use the project_id parameter (preferred uniqueness is ensured)
const testProject = dbtcloud.getProject({
projectId: dbtCloudProjectId,
});
// or they can use project names
// the provider will raise an error if more than one project is found with the same name
const anotherTestProject = dbtcloud.getProject({
name: "My other project name",
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# projects data sources can use the project_id parameter (preferred uniqueness is ensured)
test_project = dbtcloud.get_project(project_id=dbt_cloud_project_id)
# or they can use project names
# the provider will raise an error if more than one project is found with the same name
another_test_project = dbtcloud.get_project(name="My other project name")
package main
import (
"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// projects data sources can use the project_id parameter (preferred uniqueness is ensured)
_, err := dbtcloud.LookupProject(ctx, &dbtcloud.LookupProjectArgs{
ProjectId: pulumi.IntRef(dbtCloudProjectId),
}, nil)
if err != nil {
return err
}
// or they can use project names
// the provider will raise an error if more than one project is found with the same name
_, err = dbtcloud.LookupProject(ctx, &dbtcloud.LookupProjectArgs{
Name: pulumi.StringRef("My other project name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;
return await Deployment.RunAsync(() =>
{
// projects data sources can use the project_id parameter (preferred uniqueness is ensured)
var testProject = DbtCloud.GetProject.Invoke(new()
{
ProjectId = dbtCloudProjectId,
});
// or they can use project names
// the provider will raise an error if more than one project is found with the same name
var anotherTestProject = DbtCloud.GetProject.Invoke(new()
{
Name = "My other project name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.DbtcloudFunctions;
import com.pulumi.dbtcloud.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) {
// projects data sources can use the project_id parameter (preferred uniqueness is ensured)
final var testProject = DbtcloudFunctions.getProject(GetProjectArgs.builder()
.projectId(dbtCloudProjectId)
.build());
// or they can use project names
// the provider will raise an error if more than one project is found with the same name
final var anotherTestProject = DbtcloudFunctions.getProject(GetProjectArgs.builder()
.name("My other project name")
.build());
}
}
variables:
# projects data sources can use the project_id parameter (preferred uniqueness is ensured)
testProject:
fn::invoke:
Function: dbtcloud:getProject
Arguments:
projectId: ${dbtCloudProjectId}
# or they can use project names
# // the provider will raise an error if more than one project is found with the same name
anotherTestProject:
fn::invoke:
Function: dbtcloud:getProject
Arguments:
name: My other project name
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,
project_id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[int]] = 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: dbtcloud:index/getProject:getProject
arguments:
# arguments dictionary
The following arguments are supported:
- name str
- Given name for project
- project_
id int - ID of the project to represent
getProject Result
The following output properties are available:
- Connection
Id int - ID of the connection associated with the project
- Docs
Job intId - ID of Job for the documentation
- Freshness
Job intId - ID of Job for source freshness
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Given name for project
- Repository
Id int - ID of the repository associated with the project
- State int
- Project state should be 1 = active, as 2 = deleted
- Project
Id int - ID of the project to represent
- Connection
Id int - ID of the connection associated with the project
- Docs
Job intId - ID of Job for the documentation
- Freshness
Job intId - ID of Job for source freshness
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Given name for project
- Repository
Id int - ID of the repository associated with the project
- State int
- Project state should be 1 = active, as 2 = deleted
- Project
Id int - ID of the project to represent
- connection
Id Integer - ID of the connection associated with the project
- docs
Job IntegerId - ID of Job for the documentation
- freshness
Job IntegerId - ID of Job for source freshness
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Given name for project
- repository
Id Integer - ID of the repository associated with the project
- state Integer
- Project state should be 1 = active, as 2 = deleted
- project
Id Integer - ID of the project to represent
- connection
Id number - ID of the connection associated with the project
- docs
Job numberId - ID of Job for the documentation
- freshness
Job numberId - ID of Job for source freshness
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Given name for project
- repository
Id number - ID of the repository associated with the project
- state number
- Project state should be 1 = active, as 2 = deleted
- project
Id number - ID of the project to represent
- connection_
id int - ID of the connection associated with the project
- docs_
job_ intid - ID of Job for the documentation
- freshness_
job_ intid - ID of Job for source freshness
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Given name for project
- repository_
id int - ID of the repository associated with the project
- state int
- Project state should be 1 = active, as 2 = deleted
- project_
id int - ID of the project to represent
- connection
Id Number - ID of the connection associated with the project
- docs
Job NumberId - ID of Job for the documentation
- freshness
Job NumberId - ID of Job for source freshness
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Given name for project
- repository
Id Number - ID of the repository associated with the project
- state Number
- Project state should be 1 = active, as 2 = deleted
- project
Id Number - ID of the project to represent
Package Details
- Repository
- dbtcloud pulumi/pulumi-dbtcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dbtcloud
Terraform Provider.