211 lines
7.7 KiB
Go
Generated
211 lines
7.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"
|
|
)
|
|
|
|
// ## # Network
|
|
//
|
|
// Provides information about an Incus network.
|
|
// See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details.
|
|
//
|
|
// ## 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.LookupNetwork(ctx, &incus.LookupNetworkArgs{
|
|
// Name: "default",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("networkName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupNetwork(ctx *pulumi.Context, args *LookupNetworkArgs, opts ...pulumi.InvokeOption) (*LookupNetworkResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupNetworkResult
|
|
err := ctx.Invoke("incus:index/getNetwork:getNetwork", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetwork.
|
|
type LookupNetworkArgs struct {
|
|
// Description of the network.
|
|
Description *string `pulumi:"description"`
|
|
// Locations of the network.
|
|
Locations []string `pulumi:"locations"`
|
|
// Whether the network is managed by Incus.
|
|
Managed *bool `pulumi:"managed"`
|
|
// **Required** - Name of the network.
|
|
Name string `pulumi:"name"`
|
|
// *Optional* - Name of the project where the network is be stored.
|
|
Project *string `pulumi:"project"`
|
|
// *Optional* - The remote in which the resource was created. If
|
|
// not provided, the provider's default remote will be used.
|
|
Remote *string `pulumi:"remote"`
|
|
// Status of the network.
|
|
Status *string `pulumi:"status"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target *string `pulumi:"target"`
|
|
// Network type.
|
|
// [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
Type *string `pulumi:"type"`
|
|
}
|
|
|
|
// A collection of values returned by getNetwork.
|
|
type LookupNetworkResult struct {
|
|
// Map of key/value pairs of config settings.
|
|
// [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the network.
|
|
Description string `pulumi:"description"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
// Locations of the network.
|
|
Locations []string `pulumi:"locations"`
|
|
// Whether the network is managed by Incus.
|
|
Managed bool `pulumi:"managed"`
|
|
Name string `pulumi:"name"`
|
|
Project *string `pulumi:"project"`
|
|
Remote *string `pulumi:"remote"`
|
|
// Status of the network.
|
|
Status string `pulumi:"status"`
|
|
Target *string `pulumi:"target"`
|
|
// Network type.
|
|
// [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
Type string `pulumi:"type"`
|
|
}
|
|
|
|
func LookupNetworkOutput(ctx *pulumi.Context, args LookupNetworkOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupNetworkResultOutput, error) {
|
|
args := v.(LookupNetworkArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getNetwork:getNetwork", args, LookupNetworkResultOutput{}, options).(LookupNetworkResultOutput), nil
|
|
}).(LookupNetworkResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetwork.
|
|
type LookupNetworkOutputArgs struct {
|
|
// Description of the network.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// Locations of the network.
|
|
Locations pulumi.StringArrayInput `pulumi:"locations"`
|
|
// Whether the network is managed by Incus.
|
|
Managed pulumi.BoolPtrInput `pulumi:"managed"`
|
|
// **Required** - Name of the network.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// *Optional* - Name of the project where the network is be stored.
|
|
Project pulumi.StringPtrInput `pulumi:"project"`
|
|
// *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"`
|
|
// Status of the network.
|
|
Status pulumi.StringPtrInput `pulumi:"status"`
|
|
// *Optional* - Specify a target node in a cluster.
|
|
Target pulumi.StringPtrInput `pulumi:"target"`
|
|
// Network type.
|
|
// [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
Type pulumi.StringPtrInput `pulumi:"type"`
|
|
}
|
|
|
|
func (LookupNetworkOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getNetwork.
|
|
type LookupNetworkResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupNetworkResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) ToLookupNetworkResultOutput() LookupNetworkResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) ToLookupNetworkResultOutputWithContext(ctx context.Context) LookupNetworkResultOutput {
|
|
return o
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
// [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
func (o LookupNetworkResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the network.
|
|
func (o LookupNetworkResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupNetworkResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Locations of the network.
|
|
func (o LookupNetworkResultOutput) Locations() pulumi.StringArrayOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) []string { return v.Locations }).(pulumi.StringArrayOutput)
|
|
}
|
|
|
|
// Whether the network is managed by Incus.
|
|
func (o LookupNetworkResultOutput) Managed() pulumi.BoolOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) bool { return v.Managed }).(pulumi.BoolOutput)
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) Project() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Status of the network.
|
|
func (o LookupNetworkResultOutput) Status() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) string { return v.Status }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkResultOutput) Target() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) *string { return v.Target }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Network type.
|
|
// [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
|
|
func (o LookupNetworkResultOutput) Type() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkResult) string { return v.Type }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupNetworkResultOutput{})
|
|
}
|