// 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" "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type NetworkZone 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"` // **Required** - Name of the network zone. Name pulumi.StringOutput `pulumi:"name"` // *Optional* - Name of the project where the network zone 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"` } // NewNetworkZone registers a new resource with the given unique name, arguments, and options. func NewNetworkZone(ctx *pulumi.Context, name string, args *NetworkZoneArgs, opts ...pulumi.ResourceOption) (*NetworkZone, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Name == nil { return nil, errors.New("invalid value for required argument 'Name'") } if args.Project == nil { args.Project = pulumi.StringPtr("default") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkZone err := ctx.RegisterResource("incus:index/networkZone:NetworkZone", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkZone gets an existing NetworkZone 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 GetNetworkZone(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkZoneState, opts ...pulumi.ResourceOption) (*NetworkZone, error) { var resource NetworkZone err := ctx.ReadResource("incus:index/networkZone:NetworkZone", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkZone resources. type networkZoneState 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"` // **Required** - Name of the network zone. Name *string `pulumi:"name"` // *Optional* - Name of the project where the network zone 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"` } type NetworkZoneState 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 // **Required** - Name of the network zone. Name pulumi.StringPtrInput // *Optional* - Name of the project where the network zone 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 } func (NetworkZoneState) ElementType() reflect.Type { return reflect.TypeOf((*networkZoneState)(nil)).Elem() } type networkZoneArgs 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"` // **Required** - Name of the network zone. Name string `pulumi:"name"` // *Optional* - Name of the project where the network zone 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"` } // The set of arguments for constructing a NetworkZone resource. type NetworkZoneArgs 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 // **Required** - Name of the network zone. Name pulumi.StringInput // *Optional* - Name of the project where the network zone 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 } func (NetworkZoneArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkZoneArgs)(nil)).Elem() } type NetworkZoneInput interface { pulumi.Input ToNetworkZoneOutput() NetworkZoneOutput ToNetworkZoneOutputWithContext(ctx context.Context) NetworkZoneOutput } func (*NetworkZone) ElementType() reflect.Type { return reflect.TypeOf((**NetworkZone)(nil)).Elem() } func (i *NetworkZone) ToNetworkZoneOutput() NetworkZoneOutput { return i.ToNetworkZoneOutputWithContext(context.Background()) } func (i *NetworkZone) ToNetworkZoneOutputWithContext(ctx context.Context) NetworkZoneOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneOutput) } // NetworkZoneArrayInput is an input type that accepts NetworkZoneArray and NetworkZoneArrayOutput values. // You can construct a concrete instance of `NetworkZoneArrayInput` via: // // NetworkZoneArray{ NetworkZoneArgs{...} } type NetworkZoneArrayInput interface { pulumi.Input ToNetworkZoneArrayOutput() NetworkZoneArrayOutput ToNetworkZoneArrayOutputWithContext(context.Context) NetworkZoneArrayOutput } type NetworkZoneArray []NetworkZoneInput func (NetworkZoneArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkZone)(nil)).Elem() } func (i NetworkZoneArray) ToNetworkZoneArrayOutput() NetworkZoneArrayOutput { return i.ToNetworkZoneArrayOutputWithContext(context.Background()) } func (i NetworkZoneArray) ToNetworkZoneArrayOutputWithContext(ctx context.Context) NetworkZoneArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneArrayOutput) } // NetworkZoneMapInput is an input type that accepts NetworkZoneMap and NetworkZoneMapOutput values. // You can construct a concrete instance of `NetworkZoneMapInput` via: // // NetworkZoneMap{ "key": NetworkZoneArgs{...} } type NetworkZoneMapInput interface { pulumi.Input ToNetworkZoneMapOutput() NetworkZoneMapOutput ToNetworkZoneMapOutputWithContext(context.Context) NetworkZoneMapOutput } type NetworkZoneMap map[string]NetworkZoneInput func (NetworkZoneMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkZone)(nil)).Elem() } func (i NetworkZoneMap) ToNetworkZoneMapOutput() NetworkZoneMapOutput { return i.ToNetworkZoneMapOutputWithContext(context.Background()) } func (i NetworkZoneMap) ToNetworkZoneMapOutputWithContext(ctx context.Context) NetworkZoneMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkZoneMapOutput) } type NetworkZoneOutput struct{ *pulumi.OutputState } func (NetworkZoneOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkZone)(nil)).Elem() } func (o NetworkZoneOutput) ToNetworkZoneOutput() NetworkZoneOutput { return o } func (o NetworkZoneOutput) ToNetworkZoneOutputWithContext(ctx context.Context) NetworkZoneOutput { 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 NetworkZoneOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkZone) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } // *Optional* - Description of the network zone. func (o NetworkZoneOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *NetworkZone) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // **Required** - Name of the network zone. func (o NetworkZoneOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkZone) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // *Optional* - Name of the project where the network zone will be created. func (o NetworkZoneOutput) Project() pulumi.StringOutput { return o.ApplyT(func(v *NetworkZone) 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 NetworkZoneOutput) Remote() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkZone) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) } type NetworkZoneArrayOutput struct{ *pulumi.OutputState } func (NetworkZoneArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkZone)(nil)).Elem() } func (o NetworkZoneArrayOutput) ToNetworkZoneArrayOutput() NetworkZoneArrayOutput { return o } func (o NetworkZoneArrayOutput) ToNetworkZoneArrayOutputWithContext(ctx context.Context) NetworkZoneArrayOutput { return o } func (o NetworkZoneArrayOutput) Index(i pulumi.IntInput) NetworkZoneOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkZone { return vs[0].([]*NetworkZone)[vs[1].(int)] }).(NetworkZoneOutput) } type NetworkZoneMapOutput struct{ *pulumi.OutputState } func (NetworkZoneMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkZone)(nil)).Elem() } func (o NetworkZoneMapOutput) ToNetworkZoneMapOutput() NetworkZoneMapOutput { return o } func (o NetworkZoneMapOutput) ToNetworkZoneMapOutputWithContext(ctx context.Context) NetworkZoneMapOutput { return o } func (o NetworkZoneMapOutput) MapIndex(k pulumi.StringInput) NetworkZoneOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkZone { return vs[0].(map[string]*NetworkZone)[vs[1].(string)] }).(NetworkZoneOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneInput)(nil)).Elem(), &NetworkZone{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneArrayInput)(nil)).Elem(), NetworkZoneArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkZoneMapInput)(nil)).Elem(), NetworkZoneMap{}) pulumi.RegisterOutputType(NetworkZoneOutput{}) pulumi.RegisterOutputType(NetworkZoneArrayOutput{}) pulumi.RegisterOutputType(NetworkZoneMapOutput{}) }