144 lines
4.7 KiB
Go
Generated
144 lines
4.7 KiB
Go
Generated
// Code generated by pulumi-language-go DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package incus
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
// ## # Project
|
|
//
|
|
// Provides information about an Incus project.
|
|
//
|
|
// ## Example Usage
|
|
//
|
|
// ```go
|
|
// package main
|
|
//
|
|
// import (
|
|
//
|
|
// "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus"
|
|
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
//
|
|
// )
|
|
//
|
|
// func main() {
|
|
// pulumi.Run(func(ctx *pulumi.Context) error {
|
|
// this, err := incus.LookupProject(ctx, &incus.LookupProjectArgs{
|
|
// Name: "default",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("projectName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi.InvokeOption) (*LookupProjectResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupProjectResult
|
|
err := ctx.Invoke("incus:index/getProject:getProject", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getProject.
|
|
type LookupProjectArgs struct {
|
|
// Description of the project.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the project.
|
|
Name string `pulumi:"name"`
|
|
// *Optional* - The remote in which the resource was created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote *string `pulumi:"remote"`
|
|
}
|
|
|
|
// A collection of values returned by getProject.
|
|
type LookupProjectResult struct {
|
|
// Map of key/value pairs of config settings.
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/)
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the project.
|
|
Description string `pulumi:"description"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
Name string `pulumi:"name"`
|
|
Remote *string `pulumi:"remote"`
|
|
}
|
|
|
|
func LookupProjectOutput(ctx *pulumi.Context, args LookupProjectOutputArgs, opts ...pulumi.InvokeOption) LookupProjectResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupProjectResultOutput, error) {
|
|
args := v.(LookupProjectArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getProject:getProject", args, LookupProjectResultOutput{}, options).(LookupProjectResultOutput), nil
|
|
}).(LookupProjectResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getProject.
|
|
type LookupProjectOutputArgs struct {
|
|
// Description of the project.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// **Required** - Name of the project.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// *Optional* - The remote in which the resource was created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote pulumi.StringPtrInput `pulumi:"remote"`
|
|
}
|
|
|
|
func (LookupProjectOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupProjectArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getProject.
|
|
type LookupProjectResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupProjectResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupProjectResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupProjectResultOutput) ToLookupProjectResultOutput() LookupProjectResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx context.Context) LookupProjectResultOutput {
|
|
return o
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
// [instance config settings](https://linuxcontainers.org/incus/docs/main/reference/instance_options/)
|
|
func (o LookupProjectResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupProjectResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the project.
|
|
func (o LookupProjectResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupProjectResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupProjectResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupProjectResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupProjectResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupProjectResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupProjectResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupProjectResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupProjectResultOutput{})
|
|
}
|