OpenStack

Pulumi Official
Package maintained by Pulumi
v3.9.0 published on Thursday, Aug 4, 2022 by Pulumi

getProject

Use this data source to get the ID of an OpenStack project.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var project1 = Output.Create(OpenStack.Identity.GetProject.InvokeAsync(new OpenStack.Identity.GetProjectArgs
        {
            Name = "demo",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.LookupProject(ctx, &identity.LookupProjectArgs{
			Name: pulumi.StringRef("demo"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.identity.IdentityFunctions;
import com.pulumi.openstack.identity.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 project1 = IdentityFunctions.getProject(GetProjectArgs.builder()
            .name("demo")
            .build());

    }
}
import pulumi
import pulumi_openstack as openstack

project1 = openstack.identity.get_project(name="demo")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const project1 = pulumi.output(openstack.identity.getProject({
    name: "demo",
}));
variables:
  project1:
    Fn::Invoke:
      Function: openstack:identity:getProject
      Arguments:
        name: demo

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(domain_id: Optional[str] = None,
                enabled: Optional[bool] = None,
                is_domain: Optional[bool] = None,
                name: Optional[str] = None,
                parent_id: Optional[str] = None,
                region: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(domain_id: Optional[pulumi.Input[str]] = None,
                enabled: Optional[pulumi.Input[bool]] = None,
                is_domain: Optional[pulumi.Input[bool]] = None,
                name: Optional[pulumi.Input[str]] = None,
                parent_id: Optional[pulumi.Input[str]] = None,
                region: 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: openstack:identity/getProject:getProject
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DomainId string

The domain this project belongs to.

Enabled bool

Whether the project is enabled or disabled. Valid values are true and false.

IsDomain bool

Whether this project is a domain. Valid values are true and false.

Name string

The name of the project.

ParentId string

The parent of this project.

Region string

The region the project is located in.

DomainId string

The domain this project belongs to.

Enabled bool

Whether the project is enabled or disabled. Valid values are true and false.

IsDomain bool

Whether this project is a domain. Valid values are true and false.

Name string

The name of the project.

ParentId string

The parent of this project.

Region string

The region the project is located in.

domainId String

The domain this project belongs to.

enabled Boolean

Whether the project is enabled or disabled. Valid values are true and false.

isDomain Boolean

Whether this project is a domain. Valid values are true and false.

name String

The name of the project.

parentId String

The parent of this project.

region String

The region the project is located in.

domainId string

The domain this project belongs to.

enabled boolean

Whether the project is enabled or disabled. Valid values are true and false.

isDomain boolean

Whether this project is a domain. Valid values are true and false.

name string

The name of the project.

parentId string

The parent of this project.

region string

The region the project is located in.

domain_id str

The domain this project belongs to.

enabled bool

Whether the project is enabled or disabled. Valid values are true and false.

is_domain bool

Whether this project is a domain. Valid values are true and false.

name str

The name of the project.

parent_id str

The parent of this project.

region str

The region the project is located in.

domainId String

The domain this project belongs to.

enabled Boolean

Whether the project is enabled or disabled. Valid values are true and false.

isDomain Boolean

Whether this project is a domain. Valid values are true and false.

name String

The name of the project.

parentId String

The parent of this project.

region String

The region the project is located in.

getProject Result

The following output properties are available:

Description string

The description of the project.

DomainId string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

Region string

The region the project is located in.

Tags List<string>

See Argument Reference above.

Enabled bool

See Argument Reference above.

IsDomain bool

See Argument Reference above.

Name string

See Argument Reference above.

ParentId string

See Argument Reference above.

Description string

The description of the project.

DomainId string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

Region string

The region the project is located in.

Tags []string

See Argument Reference above.

Enabled bool

See Argument Reference above.

IsDomain bool

See Argument Reference above.

Name string

See Argument Reference above.

ParentId string

See Argument Reference above.

description String

The description of the project.

domainId String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

region String

The region the project is located in.

tags List<String>

See Argument Reference above.

enabled Boolean

See Argument Reference above.

isDomain Boolean

See Argument Reference above.

name String

See Argument Reference above.

parentId String

See Argument Reference above.

description string

The description of the project.

domainId string

See Argument Reference above.

id string

The provider-assigned unique ID for this managed resource.

region string

The region the project is located in.

tags string[]

See Argument Reference above.

enabled boolean

See Argument Reference above.

isDomain boolean

See Argument Reference above.

name string

See Argument Reference above.

parentId string

See Argument Reference above.

description str

The description of the project.

domain_id str

See Argument Reference above.

id str

The provider-assigned unique ID for this managed resource.

region str

The region the project is located in.

tags Sequence[str]

See Argument Reference above.

enabled bool

See Argument Reference above.

is_domain bool

See Argument Reference above.

name str

See Argument Reference above.

parent_id str

See Argument Reference above.

description String

The description of the project.

domainId String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

region String

The region the project is located in.

tags List<String>

See Argument Reference above.

enabled Boolean

See Argument Reference above.

isDomain Boolean

See Argument Reference above.

name String

See Argument Reference above.

parentId String

See Argument Reference above.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes

This Pulumi package is based on the openstack Terraform Provider.