163 lines
6.2 KiB
Go
Generated
163 lines
6.2 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"
|
|
)
|
|
|
|
// ## # NetworkAddressSet
|
|
//
|
|
// Provides information about an Incus network address set.
|
|
// See Incus network address set [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_address_sets/) 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.LookupNetworkAddressSet(ctx, &incus.LookupNetworkAddressSetArgs{
|
|
// Name: "default",
|
|
// }, nil)
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// ctx.Export("networkAddressSetName", this.Name)
|
|
// return nil
|
|
// })
|
|
// }
|
|
//
|
|
// ```
|
|
func LookupNetworkAddressSet(ctx *pulumi.Context, args *LookupNetworkAddressSetArgs, opts ...pulumi.InvokeOption) (*LookupNetworkAddressSetResult, error) {
|
|
opts = internal.PkgInvokeDefaultOpts(opts)
|
|
var rv LookupNetworkAddressSetResult
|
|
err := ctx.Invoke("incus:index/getNetworkAddressSet:getNetworkAddressSet", args, &rv, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &rv, nil
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetworkAddressSet.
|
|
type LookupNetworkAddressSetArgs struct {
|
|
// List of network addresses.
|
|
Addresses []string `pulumi:"addresses"`
|
|
// Description of the network address set.
|
|
Description *string `pulumi:"description"`
|
|
// **Required** - Name of the network address set.
|
|
Name string `pulumi:"name"`
|
|
// *Optional* - Name of the project where the network address set 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"`
|
|
}
|
|
|
|
// A collection of values returned by getNetworkAddressSet.
|
|
type LookupNetworkAddressSetResult struct {
|
|
// List of network addresses.
|
|
Addresses []string `pulumi:"addresses"`
|
|
// Map of key/value pairs of config settings.
|
|
Config map[string]string `pulumi:"config"`
|
|
// Description of the network address set.
|
|
Description string `pulumi:"description"`
|
|
// The provider-assigned unique ID for this managed resource.
|
|
Id string `pulumi:"id"`
|
|
Name string `pulumi:"name"`
|
|
Project *string `pulumi:"project"`
|
|
Remote *string `pulumi:"remote"`
|
|
}
|
|
|
|
func LookupNetworkAddressSetOutput(ctx *pulumi.Context, args LookupNetworkAddressSetOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkAddressSetResultOutput {
|
|
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
|
ApplyT(func(v interface{}) (LookupNetworkAddressSetResultOutput, error) {
|
|
args := v.(LookupNetworkAddressSetArgs)
|
|
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
|
return ctx.InvokeOutput("incus:index/getNetworkAddressSet:getNetworkAddressSet", args, LookupNetworkAddressSetResultOutput{}, options).(LookupNetworkAddressSetResultOutput), nil
|
|
}).(LookupNetworkAddressSetResultOutput)
|
|
}
|
|
|
|
// A collection of arguments for invoking getNetworkAddressSet.
|
|
type LookupNetworkAddressSetOutputArgs struct {
|
|
// List of network addresses.
|
|
Addresses pulumi.StringArrayInput `pulumi:"addresses"`
|
|
// Description of the network address set.
|
|
Description pulumi.StringPtrInput `pulumi:"description"`
|
|
// **Required** - Name of the network address set.
|
|
Name pulumi.StringInput `pulumi:"name"`
|
|
// *Optional* - Name of the project where the network address set 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"`
|
|
}
|
|
|
|
func (LookupNetworkAddressSetOutputArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkAddressSetArgs)(nil)).Elem()
|
|
}
|
|
|
|
// A collection of values returned by getNetworkAddressSet.
|
|
type LookupNetworkAddressSetResultOutput struct{ *pulumi.OutputState }
|
|
|
|
func (LookupNetworkAddressSetResultOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*LookupNetworkAddressSetResult)(nil)).Elem()
|
|
}
|
|
|
|
func (o LookupNetworkAddressSetResultOutput) ToLookupNetworkAddressSetResultOutput() LookupNetworkAddressSetResultOutput {
|
|
return o
|
|
}
|
|
|
|
func (o LookupNetworkAddressSetResultOutput) ToLookupNetworkAddressSetResultOutputWithContext(ctx context.Context) LookupNetworkAddressSetResultOutput {
|
|
return o
|
|
}
|
|
|
|
// List of network addresses.
|
|
func (o LookupNetworkAddressSetResultOutput) Addresses() pulumi.StringArrayOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) []string { return v.Addresses }).(pulumi.StringArrayOutput)
|
|
}
|
|
|
|
// Map of key/value pairs of config settings.
|
|
func (o LookupNetworkAddressSetResultOutput) Config() pulumi.StringMapOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
|
}
|
|
|
|
// Description of the network address set.
|
|
func (o LookupNetworkAddressSetResultOutput) Description() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Description }).(pulumi.StringOutput)
|
|
}
|
|
|
|
// The provider-assigned unique ID for this managed resource.
|
|
func (o LookupNetworkAddressSetResultOutput) Id() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Id }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkAddressSetResultOutput) Name() pulumi.StringOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) string { return v.Name }).(pulumi.StringOutput)
|
|
}
|
|
|
|
func (o LookupNetworkAddressSetResultOutput) Project() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o LookupNetworkAddressSetResultOutput) Remote() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v LookupNetworkAddressSetResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterOutputType(LookupNetworkAddressSetResultOutput{})
|
|
}
|