Update
This commit is contained in:
151
sdk/go/incus/getNetworkZone.go
generated
Normal file
151
sdk/go/incus/getNetworkZone.go
generated
Normal file
@@ -0,0 +1,151 @@
|
||||
// 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"
|
||||
)
|
||||
|
||||
// ## # NetworkZone
|
||||
//
|
||||
// Provides information about an Incus network zone.
|
||||
// See Incus network zone [configuration reference](https://linuxcontainers.org/incus/docs/main/howto/network_zones/) 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.LookupNetworkZone(ctx, &incus.LookupNetworkZoneArgs{
|
||||
// Name: "default",
|
||||
// }, nil)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// ctx.Export("networkZoneName", this.Name)
|
||||
// return nil
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
func LookupNetworkZone(ctx *pulumi.Context, args *LookupNetworkZoneArgs, opts ...pulumi.InvokeOption) (*LookupNetworkZoneResult, error) {
|
||||
opts = internal.PkgInvokeDefaultOpts(opts)
|
||||
var rv LookupNetworkZoneResult
|
||||
err := ctx.Invoke("incus:index/getNetworkZone:getNetworkZone", args, &rv, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &rv, nil
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getNetworkZone.
|
||||
type LookupNetworkZoneArgs struct {
|
||||
// Description of the network zone.
|
||||
Description *string `pulumi:"description"`
|
||||
// **Required** - Name of the network zone.
|
||||
Name string `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the network zone 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 getNetworkZone.
|
||||
type LookupNetworkZoneResult struct {
|
||||
// Map of key/value pairs of config settings.
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// Description of the network zone.
|
||||
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 LookupNetworkZoneOutput(ctx *pulumi.Context, args LookupNetworkZoneOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkZoneResultOutput {
|
||||
return pulumi.ToOutputWithContext(ctx.Context(), args).
|
||||
ApplyT(func(v interface{}) (LookupNetworkZoneResultOutput, error) {
|
||||
args := v.(LookupNetworkZoneArgs)
|
||||
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
|
||||
return ctx.InvokeOutput("incus:index/getNetworkZone:getNetworkZone", args, LookupNetworkZoneResultOutput{}, options).(LookupNetworkZoneResultOutput), nil
|
||||
}).(LookupNetworkZoneResultOutput)
|
||||
}
|
||||
|
||||
// A collection of arguments for invoking getNetworkZone.
|
||||
type LookupNetworkZoneOutputArgs struct {
|
||||
// Description of the network zone.
|
||||
Description pulumi.StringPtrInput `pulumi:"description"`
|
||||
// **Required** - Name of the network zone.
|
||||
Name pulumi.StringInput `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the network zone 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 (LookupNetworkZoneOutputArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupNetworkZoneArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
// A collection of values returned by getNetworkZone.
|
||||
type LookupNetworkZoneResultOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (LookupNetworkZoneResultOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*LookupNetworkZoneResult)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o LookupNetworkZoneResultOutput) ToLookupNetworkZoneResultOutput() LookupNetworkZoneResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o LookupNetworkZoneResultOutput) ToLookupNetworkZoneResultOutputWithContext(ctx context.Context) LookupNetworkZoneResultOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// Map of key/value pairs of config settings.
|
||||
func (o LookupNetworkZoneResultOutput) Config() pulumi.StringMapOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) map[string]string { return v.Config }).(pulumi.StringMapOutput)
|
||||
}
|
||||
|
||||
// Description of the network zone.
|
||||
func (o LookupNetworkZoneResultOutput) Description() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Description }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// The provider-assigned unique ID for this managed resource.
|
||||
func (o LookupNetworkZoneResultOutput) Id() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Id }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o LookupNetworkZoneResultOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) string { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o LookupNetworkZoneResultOutput) Project() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) *string { return v.Project }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func (o LookupNetworkZoneResultOutput) Remote() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v LookupNetworkZoneResult) *string { return v.Remote }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterOutputType(LookupNetworkZoneResultOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user