OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi
openstack.identity.getProject
Explore with Pulumi AI
Use this data source to get the ID of an OpenStack project.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var project1 = OpenStack.Identity.GetProject.Invoke(new()
{
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 = 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,
project_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,
project_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:
- Domain
Id string - The domain this project belongs to.
- Enabled bool
- Whether the project is enabled or disabled. Valid
values are
true
andfalse
. - Is
Domain bool - Whether this project is a domain. Valid values
are
true
andfalse
. - Name string
- The name of the project.
- Parent
Id string - The parent of this project.
- Project
Id string - The id of the project. Conflicts with any of the above arguments.
- Region string
- The region the project is located in.
- Domain
Id string - The domain this project belongs to.
- Enabled bool
- Whether the project is enabled or disabled. Valid
values are
true
andfalse
. - Is
Domain bool - Whether this project is a domain. Valid values
are
true
andfalse
. - Name string
- The name of the project.
- Parent
Id string - The parent of this project.
- Project
Id string - The id of the project. Conflicts with any of the above arguments.
- Region string
- The region the project is located in.
- domain
Id String - The domain this project belongs to.
- enabled Boolean
- Whether the project is enabled or disabled. Valid
values are
true
andfalse
. - is
Domain Boolean - Whether this project is a domain. Valid values
are
true
andfalse
. - name String
- The name of the project.
- parent
Id String - The parent of this project.
- project
Id String - The id of the project. Conflicts with any of the above arguments.
- region String
- The region the project is located in.
- domain
Id string - The domain this project belongs to.
- enabled boolean
- Whether the project is enabled or disabled. Valid
values are
true
andfalse
. - is
Domain boolean - Whether this project is a domain. Valid values
are
true
andfalse
. - name string
- The name of the project.
- parent
Id string - The parent of this project.
- project
Id string - The id of the project. Conflicts with any of the above arguments.
- 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
andfalse
. - is_
domain bool - Whether this project is a domain. Valid values
are
true
andfalse
. - name str
- The name of the project.
- parent_
id str - The parent of this project.
- project_
id str - The id of the project. Conflicts with any of the above arguments.
- region str
- The region the project is located in.
- domain
Id String - The domain this project belongs to.
- enabled Boolean
- Whether the project is enabled or disabled. Valid
values are
true
andfalse
. - is
Domain Boolean - Whether this project is a domain. Valid values
are
true
andfalse
. - name String
- The name of the project.
- parent
Id String - The parent of this project.
- project
Id String - The id of the project. Conflicts with any of the above arguments.
- region String
- The region the project is located in.
getProject Result
The following output properties are available:
- Description string
- The description of the project.
- Domain
Id 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.
- List<string>
- See Argument Reference above.
- Enabled bool
- See Argument Reference above.
- Is
Domain bool - See Argument Reference above.
- Name string
- See Argument Reference above.
- Parent
Id string - See Argument Reference above.
- Project
Id string - See Argument Reference above.
- Description string
- The description of the project.
- Domain
Id 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.
- []string
- See Argument Reference above.
- Enabled bool
- See Argument Reference above.
- Is
Domain bool - See Argument Reference above.
- Name string
- See Argument Reference above.
- Parent
Id string - See Argument Reference above.
- Project
Id string - See Argument Reference above.
- description String
- The description of the project.
- domain
Id 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.
- List<String>
- See Argument Reference above.
- enabled Boolean
- See Argument Reference above.
- is
Domain Boolean - See Argument Reference above.
- name String
- See Argument Reference above.
- parent
Id String - See Argument Reference above.
- project
Id String - See Argument Reference above.
- description string
- The description of the project.
- domain
Id 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.
- string[]
- See Argument Reference above.
- enabled boolean
- See Argument Reference above.
- is
Domain boolean - See Argument Reference above.
- name string
- See Argument Reference above.
- parent
Id string - See Argument Reference above.
- project
Id 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.
- 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.
- project_
id str - See Argument Reference above.
- description String
- The description of the project.
- domain
Id 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.
- List<String>
- See Argument Reference above.
- enabled Boolean
- See Argument Reference above.
- is
Domain Boolean - See Argument Reference above.
- name String
- See Argument Reference above.
- parent
Id String - See Argument Reference above.
- project
Id String - See Argument Reference above.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.