wip: init go provider
This commit is contained in:
323
sdk/go/incus/networkZoneRecord.go
generated
Normal file
323
sdk/go/incus/networkZoneRecord.go
generated
Normal file
@@ -0,0 +1,323 @@
|
||||
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package incus
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"errors"
|
||||
"git.kalinow.ski/nimbus/pulumi-incus/sdk/go/incus/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
)
|
||||
|
||||
type NetworkZoneRecord struct {
|
||||
pulumi.CustomResourceState
|
||||
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
Config pulumi.StringMapOutput `pulumi:"config"`
|
||||
// *Optional* - Description of the network zone.
|
||||
Description pulumi.StringOutput `pulumi:"description"`
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
Entries NetworkZoneRecordEntryArrayOutput `pulumi:"entries"`
|
||||
// **Required** - Name of the network zone record.
|
||||
Name pulumi.StringOutput `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
Project pulumi.StringOutput `pulumi:"project"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrOutput `pulumi:"remote"`
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
Zone pulumi.StringOutput `pulumi:"zone"`
|
||||
}
|
||||
|
||||
// NewNetworkZoneRecord registers a new resource with the given unique name, arguments, and options.
|
||||
func NewNetworkZoneRecord(ctx *pulumi.Context,
|
||||
name string, args *NetworkZoneRecordArgs, opts ...pulumi.ResourceOption) (*NetworkZoneRecord, error) {
|
||||
if args == nil {
|
||||
return nil, errors.New("missing one or more required arguments")
|
||||
}
|
||||
|
||||
if args.Zone == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Zone'")
|
||||
}
|
||||
if args.Project == nil {
|
||||
args.Project = pulumi.StringPtr("default")
|
||||
}
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource NetworkZoneRecord
|
||||
err := ctx.RegisterResource("incus:index/networkZoneRecord:NetworkZoneRecord", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// GetNetworkZoneRecord gets an existing NetworkZoneRecord resource's state with the given name, ID, and optional
|
||||
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
||||
func GetNetworkZoneRecord(ctx *pulumi.Context,
|
||||
name string, id pulumi.IDInput, state *NetworkZoneRecordState, opts ...pulumi.ResourceOption) (*NetworkZoneRecord, error) {
|
||||
var resource NetworkZoneRecord
|
||||
err := ctx.ReadResource("incus:index/networkZoneRecord:NetworkZoneRecord", name, id, state, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// Input properties used for looking up and filtering NetworkZoneRecord resources.
|
||||
type networkZoneRecordState struct {
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// *Optional* - Description of the network zone.
|
||||
Description *string `pulumi:"description"`
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
Entries []NetworkZoneRecordEntry `pulumi:"entries"`
|
||||
// **Required** - Name of the network zone record.
|
||||
Name *string `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
Project *string `pulumi:"project"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote *string `pulumi:"remote"`
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
Zone *string `pulumi:"zone"`
|
||||
}
|
||||
|
||||
type NetworkZoneRecordState struct {
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
Config pulumi.StringMapInput
|
||||
// *Optional* - Description of the network zone.
|
||||
Description pulumi.StringPtrInput
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
Entries NetworkZoneRecordEntryArrayInput
|
||||
// **Required** - Name of the network zone record.
|
||||
Name pulumi.StringPtrInput
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
Project pulumi.StringPtrInput
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrInput
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
Zone pulumi.StringPtrInput
|
||||
}
|
||||
|
||||
func (NetworkZoneRecordState) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*networkZoneRecordState)(nil)).Elem()
|
||||
}
|
||||
|
||||
type networkZoneRecordArgs struct {
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
Config map[string]string `pulumi:"config"`
|
||||
// *Optional* - Description of the network zone.
|
||||
Description *string `pulumi:"description"`
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
Entries []NetworkZoneRecordEntry `pulumi:"entries"`
|
||||
// **Required** - Name of the network zone record.
|
||||
Name *string `pulumi:"name"`
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
Project *string `pulumi:"project"`
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote *string `pulumi:"remote"`
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
Zone string `pulumi:"zone"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a NetworkZoneRecord resource.
|
||||
type NetworkZoneRecordArgs struct {
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
Config pulumi.StringMapInput
|
||||
// *Optional* - Description of the network zone.
|
||||
Description pulumi.StringPtrInput
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
Entries NetworkZoneRecordEntryArrayInput
|
||||
// **Required** - Name of the network zone record.
|
||||
Name pulumi.StringPtrInput
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
Project pulumi.StringPtrInput
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
Remote pulumi.StringPtrInput
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
Zone pulumi.StringInput
|
||||
}
|
||||
|
||||
func (NetworkZoneRecordArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*networkZoneRecordArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type NetworkZoneRecordInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToNetworkZoneRecordOutput() NetworkZoneRecordOutput
|
||||
ToNetworkZoneRecordOutputWithContext(ctx context.Context) NetworkZoneRecordOutput
|
||||
}
|
||||
|
||||
func (*NetworkZoneRecord) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i *NetworkZoneRecord) ToNetworkZoneRecordOutput() NetworkZoneRecordOutput {
|
||||
return i.ToNetworkZoneRecordOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i *NetworkZoneRecord) ToNetworkZoneRecordOutputWithContext(ctx context.Context) NetworkZoneRecordOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneRecordOutput)
|
||||
}
|
||||
|
||||
// NetworkZoneRecordArrayInput is an input type that accepts NetworkZoneRecordArray and NetworkZoneRecordArrayOutput values.
|
||||
// You can construct a concrete instance of `NetworkZoneRecordArrayInput` via:
|
||||
//
|
||||
// NetworkZoneRecordArray{ NetworkZoneRecordArgs{...} }
|
||||
type NetworkZoneRecordArrayInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToNetworkZoneRecordArrayOutput() NetworkZoneRecordArrayOutput
|
||||
ToNetworkZoneRecordArrayOutputWithContext(context.Context) NetworkZoneRecordArrayOutput
|
||||
}
|
||||
|
||||
type NetworkZoneRecordArray []NetworkZoneRecordInput
|
||||
|
||||
func (NetworkZoneRecordArray) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i NetworkZoneRecordArray) ToNetworkZoneRecordArrayOutput() NetworkZoneRecordArrayOutput {
|
||||
return i.ToNetworkZoneRecordArrayOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i NetworkZoneRecordArray) ToNetworkZoneRecordArrayOutputWithContext(ctx context.Context) NetworkZoneRecordArrayOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneRecordArrayOutput)
|
||||
}
|
||||
|
||||
// NetworkZoneRecordMapInput is an input type that accepts NetworkZoneRecordMap and NetworkZoneRecordMapOutput values.
|
||||
// You can construct a concrete instance of `NetworkZoneRecordMapInput` via:
|
||||
//
|
||||
// NetworkZoneRecordMap{ "key": NetworkZoneRecordArgs{...} }
|
||||
type NetworkZoneRecordMapInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToNetworkZoneRecordMapOutput() NetworkZoneRecordMapOutput
|
||||
ToNetworkZoneRecordMapOutputWithContext(context.Context) NetworkZoneRecordMapOutput
|
||||
}
|
||||
|
||||
type NetworkZoneRecordMap map[string]NetworkZoneRecordInput
|
||||
|
||||
func (NetworkZoneRecordMap) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i NetworkZoneRecordMap) ToNetworkZoneRecordMapOutput() NetworkZoneRecordMapOutput {
|
||||
return i.ToNetworkZoneRecordMapOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i NetworkZoneRecordMap) ToNetworkZoneRecordMapOutputWithContext(ctx context.Context) NetworkZoneRecordMapOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneRecordMapOutput)
|
||||
}
|
||||
|
||||
type NetworkZoneRecordOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (NetworkZoneRecordOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordOutput) ToNetworkZoneRecordOutput() NetworkZoneRecordOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordOutput) ToNetworkZoneRecordOutputWithContext(ctx context.Context) NetworkZoneRecordOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
// *Optional* - Map of key/value pairs of
|
||||
// [network zoneConfig settings](https://linuxcontainers.org/incus/docs/main/howto/network_zones/#configuration-options).
|
||||
func (o NetworkZoneRecordOutput) Config() pulumi.StringMapOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput)
|
||||
}
|
||||
|
||||
// *Optional* - Description of the network zone.
|
||||
func (o NetworkZoneRecordOutput) Description() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// *Optional* - Entry in network zone record - see below.
|
||||
func (o NetworkZoneRecordOutput) Entries() NetworkZoneRecordEntryArrayOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) NetworkZoneRecordEntryArrayOutput { return v.Entries }).(NetworkZoneRecordEntryArrayOutput)
|
||||
}
|
||||
|
||||
// **Required** - Name of the network zone record.
|
||||
func (o NetworkZoneRecordOutput) Name() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// *Optional* - Name of the project where the network zone record will be created.
|
||||
func (o NetworkZoneRecordOutput) Project() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// *Optional* - The remote in which the resource will be created. If
|
||||
// not provided, the provider's default remote will be used.
|
||||
func (o NetworkZoneRecordOutput) Remote() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// **Required** - Name of the zone to add the entries of this record.
|
||||
func (o NetworkZoneRecordOutput) Zone() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *NetworkZoneRecord) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
type NetworkZoneRecordArrayOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (NetworkZoneRecordArrayOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]*NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordArrayOutput) ToNetworkZoneRecordArrayOutput() NetworkZoneRecordArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordArrayOutput) ToNetworkZoneRecordArrayOutputWithContext(ctx context.Context) NetworkZoneRecordArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordArrayOutput) Index(i pulumi.IntInput) NetworkZoneRecordOutput {
|
||||
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkZoneRecord {
|
||||
return vs[0].([]*NetworkZoneRecord)[vs[1].(int)]
|
||||
}).(NetworkZoneRecordOutput)
|
||||
}
|
||||
|
||||
type NetworkZoneRecordMapOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (NetworkZoneRecordMapOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*map[string]*NetworkZoneRecord)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordMapOutput) ToNetworkZoneRecordMapOutput() NetworkZoneRecordMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordMapOutput) ToNetworkZoneRecordMapOutputWithContext(ctx context.Context) NetworkZoneRecordMapOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkZoneRecordMapOutput) MapIndex(k pulumi.StringInput) NetworkZoneRecordOutput {
|
||||
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkZoneRecord {
|
||||
return vs[0].(map[string]*NetworkZoneRecord)[vs[1].(string)]
|
||||
}).(NetworkZoneRecordOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneRecordInput)(nil)).Elem(), &NetworkZoneRecord{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneRecordArrayInput)(nil)).Elem(), NetworkZoneRecordArray{})
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneRecordMapInput)(nil)).Elem(), NetworkZoneRecordMap{})
|
||||
pulumi.RegisterOutputType(NetworkZoneRecordOutput{})
|
||||
pulumi.RegisterOutputType(NetworkZoneRecordArrayOutput{})
|
||||
pulumi.RegisterOutputType(NetworkZoneRecordMapOutput{})
|
||||
}
|
||||
Reference in New Issue
Block a user