217 lines
8.1 KiB
Go
Generated
217 lines
8.1 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"
|
|
)
|
|
|
|
// ## # NetworkPeer
|
|
//
|
|
// Provides information about an Incus network peer.
|
|
// See Incus network peer [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_peers/https://linuxcontainers.org/incus/docs/main/howto/network_ovn_peers/) 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.LookupNetworkPeer(ctx, &incus.LookupNetworkPeerArgs{
|
|
// Name: "default",
|
|
// Network: "parent",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("networkPeerName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupNetworkPeer(ctx *pulumi.Context, args *LookupNetworkPeerArgs, opts ...pulumi.InvokeOption) (*LookupNetworkPeerResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupNetworkPeerResult
|
|
err := ctx.Invoke("incus:index/getNetworkPeer:getNetworkPeer", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetworkPeer.
|
|
type LookupNetworkPeerArgs struct {
|
|
// Description of the network peer.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the network peer.
|
|
Name string `pulumi:"name"`
|
|
// **Required** - Name of the parent network.
|
|
Network string `pulumi:"network"`
|
|
// *Optional* - Name of the project where the network peer 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 peer.
|
|
Status *string `pulumi:"status"`
|
|
// Target integration for the network peer.
|
|
TargetIntegration *string `pulumi:"targetIntegration"`
|
|
// Target network for the network peer.
|
|
TargetNetwork *string `pulumi:"targetNetwork"`
|
|
// Target project for the network peer.
|
|
TargetProject *string `pulumi:"targetProject"`
|
|
// Network peer type.
|
|
Type *string `pulumi:"type"`
|
|
}
|
|
|
|
// A collection of values returned by getNetworkPeer.
|
|
type LookupNetworkPeerResult struct {
|
|
// Map of key/value pairs of config settings.
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the network peer.
|
|
Description string `pulumi:"description"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
Name string `pulumi:"name"`
|
|
Network string `pulumi:"network"`
|
|
Project *string `pulumi:"project"`
|
|
Remote *string `pulumi:"remote"`
|
|
// Status of the network peer.
|
|
Status string `pulumi:"status"`
|
|
// Target integration for the network peer.
|
|
TargetIntegration string `pulumi:"targetIntegration"`
|
|
// Target network for the network peer.
|
|
TargetNetwork string `pulumi:"targetNetwork"`
|
|
// Target project for the network peer.
|
|
TargetProject string `pulumi:"targetProject"`
|
|
// Network peer type.
|
|
Type string `pulumi:"type"`
|
|
}
|
|
|
|
func LookupNetworkPeerOutput(ctx *pulumi.Context, args LookupNetworkPeerOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkPeerResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupNetworkPeerResultOutput, error) {
|
|
args := v.(LookupNetworkPeerArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getNetworkPeer:getNetworkPeer", args, LookupNetworkPeerResultOutput{}, options).(LookupNetworkPeerResultOutput), nil
|
|
}).(LookupNetworkPeerResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetworkPeer.
|
|
type LookupNetworkPeerOutputArgs struct {
|
|
// Description of the network peer.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// **Required** - Name of the network peer.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// **Required** - Name of the parent network.
|
|
Network pulumi.StringInput `pulumi:"network"`
|
|
// *Optional* - Name of the project where the network peer 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 peer.
|
|
Status pulumi.StringPtrInput `pulumi:"status"`
|
|
// Target integration for the network peer.
|
|
TargetIntegration pulumi.StringPtrInput `pulumi:"targetIntegration"`
|
|
// Target network for the network peer.
|
|
TargetNetwork pulumi.StringPtrInput `pulumi:"targetNetwork"`
|
|
// Target project for the network peer.
|
|
TargetProject pulumi.StringPtrInput `pulumi:"targetProject"`
|
|
// Network peer type.
|
|
Type pulumi.StringPtrInput `pulumi:"type"`
|
|
}
|
|
|
|
func (LookupNetworkPeerOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkPeerArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getNetworkPeer.
|
|
type LookupNetworkPeerResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupNetworkPeerResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkPeerResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) ToLookupNetworkPeerResultOutput() LookupNetworkPeerResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) ToLookupNetworkPeerResultOutputWithContext(ctx context.Context) LookupNetworkPeerResultOutput {
|
|
return o
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
func (o LookupNetworkPeerResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the network peer.
|
|
func (o LookupNetworkPeerResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupNetworkPeerResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) Network() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Network }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) Project() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o LookupNetworkPeerResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
// Status of the network peer.
|
|
func (o LookupNetworkPeerResultOutput) Status() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Status }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Target integration for the network peer.
|
|
func (o LookupNetworkPeerResultOutput) TargetIntegration() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetIntegration }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Target network for the network peer.
|
|
func (o LookupNetworkPeerResultOutput) TargetNetwork() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetNetwork }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Target project for the network peer.
|
|
func (o LookupNetworkPeerResultOutput) TargetProject() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.TargetProject }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// Network peer type.
|
|
func (o LookupNetworkPeerResultOutput) Type() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkPeerResult) string { return v.Type }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupNetworkPeerResultOutput{})
|
|
}
|