json

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericApi

type GenericApi struct {
	pulumi.CustomResourceState

	// The argument is optional, if it is set, when its value changes, the resource will be re-created. It is usually used when the return value needs to be forced to update.
	ForceRecreate pulumi.StringPtrOutput `pulumi:"forceRecreate"`
	// Body data in JSON format.
	Json pulumi.StringPtrOutput `pulumi:"json"`
	// HTTP method.
	Method pulumi.StringOutput `pulumi:"method"`
	// FortiAPI URL path.
	Path pulumi.StringOutput `pulumi:"path"`
	// FortiAPI returns results.
	Response pulumi.StringOutput `pulumi:"response"`
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path.
	Specialparams pulumi.StringPtrOutput `pulumi:"specialparams"`
	Vdomparam     pulumi.StringPtrOutput `pulumi:"vdomparam"`
}

FortiAPI Generic Interface.

## Example Usage

<!--Start PulumiCodeChooser --> ```go package main

import (

"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/json"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test1, err := json.NewGenericApi(ctx, "test1", &json.GenericApiArgs{
			Json:   pulumi.String(""),
			Method: pulumi.String("GET"),
			Path:   pulumi.String("/api/v2/cmdb/firewall/address"),
		})
		if err != nil {
			return err
		}
		ctx.Export("response1", test1.Response)
		test2, err := json.NewGenericApi(ctx, "test2", &json.GenericApiArgs{
			Json: pulumi.String(`{
  "name": "11221",
  "type": "geography",
  "fqdn": "",
  "country": "AL",
  "comment": "ccc",
  "visibility": "enable",
  "associated-interface": "port1",
  "allow-routing": "disable"
}

`),

			Method: pulumi.String("POST"),
			Path:   pulumi.String("/api/v2/cmdb/firewall/address"),
		})
		if err != nil {
			return err
		}
		ctx.Export("response2", test2.Response)
		test3, err := json.NewGenericApi(ctx, "test3", &json.GenericApiArgs{
			Json:          pulumi.String(""),
			Method:        pulumi.String("PUT"),
			Path:          pulumi.String("/api/v2/cmdb/firewall/policy/3"),
			Specialparams: pulumi.String("action=move&after=1"),
		})
		if err != nil {
			return err
		}
		ctx.Export("response3", test3.Response)
		return nil
	})
}

``` <!--End PulumiCodeChooser -->

func GetGenericApi

func GetGenericApi(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GenericApiState, opts ...pulumi.ResourceOption) (*GenericApi, error)

GetGenericApi gets an existing GenericApi 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 NewGenericApi

func NewGenericApi(ctx *pulumi.Context,
	name string, args *GenericApiArgs, opts ...pulumi.ResourceOption) (*GenericApi, error)

NewGenericApi registers a new resource with the given unique name, arguments, and options.

func (*GenericApi) ElementType

func (*GenericApi) ElementType() reflect.Type

func (*GenericApi) ToGenericApiOutput

func (i *GenericApi) ToGenericApiOutput() GenericApiOutput

func (*GenericApi) ToGenericApiOutputWithContext

func (i *GenericApi) ToGenericApiOutputWithContext(ctx context.Context) GenericApiOutput

type GenericApiArgs

type GenericApiArgs struct {
	// The argument is optional, if it is set, when its value changes, the resource will be re-created. It is usually used when the return value needs to be forced to update.
	ForceRecreate pulumi.StringPtrInput
	// Body data in JSON format.
	Json pulumi.StringPtrInput
	// HTTP method.
	Method pulumi.StringInput
	// FortiAPI URL path.
	Path pulumi.StringInput
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path.
	Specialparams pulumi.StringPtrInput
	Vdomparam     pulumi.StringPtrInput
}

The set of arguments for constructing a GenericApi resource.

func (GenericApiArgs) ElementType

func (GenericApiArgs) ElementType() reflect.Type

type GenericApiArray

type GenericApiArray []GenericApiInput

func (GenericApiArray) ElementType

func (GenericApiArray) ElementType() reflect.Type

func (GenericApiArray) ToGenericApiArrayOutput

func (i GenericApiArray) ToGenericApiArrayOutput() GenericApiArrayOutput

func (GenericApiArray) ToGenericApiArrayOutputWithContext

func (i GenericApiArray) ToGenericApiArrayOutputWithContext(ctx context.Context) GenericApiArrayOutput

type GenericApiArrayInput

type GenericApiArrayInput interface {
	pulumi.Input

	ToGenericApiArrayOutput() GenericApiArrayOutput
	ToGenericApiArrayOutputWithContext(context.Context) GenericApiArrayOutput
}

GenericApiArrayInput is an input type that accepts GenericApiArray and GenericApiArrayOutput values. You can construct a concrete instance of `GenericApiArrayInput` via:

GenericApiArray{ GenericApiArgs{...} }

type GenericApiArrayOutput

type GenericApiArrayOutput struct{ *pulumi.OutputState }

func (GenericApiArrayOutput) ElementType

func (GenericApiArrayOutput) ElementType() reflect.Type

func (GenericApiArrayOutput) Index

func (GenericApiArrayOutput) ToGenericApiArrayOutput

func (o GenericApiArrayOutput) ToGenericApiArrayOutput() GenericApiArrayOutput

func (GenericApiArrayOutput) ToGenericApiArrayOutputWithContext

func (o GenericApiArrayOutput) ToGenericApiArrayOutputWithContext(ctx context.Context) GenericApiArrayOutput

type GenericApiInput

type GenericApiInput interface {
	pulumi.Input

	ToGenericApiOutput() GenericApiOutput
	ToGenericApiOutputWithContext(ctx context.Context) GenericApiOutput
}

type GenericApiMap

type GenericApiMap map[string]GenericApiInput

func (GenericApiMap) ElementType

func (GenericApiMap) ElementType() reflect.Type

func (GenericApiMap) ToGenericApiMapOutput

func (i GenericApiMap) ToGenericApiMapOutput() GenericApiMapOutput

func (GenericApiMap) ToGenericApiMapOutputWithContext

func (i GenericApiMap) ToGenericApiMapOutputWithContext(ctx context.Context) GenericApiMapOutput

type GenericApiMapInput

type GenericApiMapInput interface {
	pulumi.Input

	ToGenericApiMapOutput() GenericApiMapOutput
	ToGenericApiMapOutputWithContext(context.Context) GenericApiMapOutput
}

GenericApiMapInput is an input type that accepts GenericApiMap and GenericApiMapOutput values. You can construct a concrete instance of `GenericApiMapInput` via:

GenericApiMap{ "key": GenericApiArgs{...} }

type GenericApiMapOutput

type GenericApiMapOutput struct{ *pulumi.OutputState }

func (GenericApiMapOutput) ElementType

func (GenericApiMapOutput) ElementType() reflect.Type

func (GenericApiMapOutput) MapIndex

func (GenericApiMapOutput) ToGenericApiMapOutput

func (o GenericApiMapOutput) ToGenericApiMapOutput() GenericApiMapOutput

func (GenericApiMapOutput) ToGenericApiMapOutputWithContext

func (o GenericApiMapOutput) ToGenericApiMapOutputWithContext(ctx context.Context) GenericApiMapOutput

type GenericApiOutput

type GenericApiOutput struct{ *pulumi.OutputState }

func (GenericApiOutput) ElementType

func (GenericApiOutput) ElementType() reflect.Type

func (GenericApiOutput) ForceRecreate

func (o GenericApiOutput) ForceRecreate() pulumi.StringPtrOutput

The argument is optional, if it is set, when its value changes, the resource will be re-created. It is usually used when the return value needs to be forced to update.

func (GenericApiOutput) Json

Body data in JSON format.

func (GenericApiOutput) Method

HTTP method.

func (GenericApiOutput) Path

FortiAPI URL path.

func (GenericApiOutput) Response

func (o GenericApiOutput) Response() pulumi.StringOutput

FortiAPI returns results.

func (GenericApiOutput) Specialparams

func (o GenericApiOutput) Specialparams() pulumi.StringPtrOutput

URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path.

func (GenericApiOutput) ToGenericApiOutput

func (o GenericApiOutput) ToGenericApiOutput() GenericApiOutput

func (GenericApiOutput) ToGenericApiOutputWithContext

func (o GenericApiOutput) ToGenericApiOutputWithContext(ctx context.Context) GenericApiOutput

func (GenericApiOutput) Vdomparam

func (o GenericApiOutput) Vdomparam() pulumi.StringPtrOutput

type GenericApiState

type GenericApiState struct {
	// The argument is optional, if it is set, when its value changes, the resource will be re-created. It is usually used when the return value needs to be forced to update.
	ForceRecreate pulumi.StringPtrInput
	// Body data in JSON format.
	Json pulumi.StringPtrInput
	// HTTP method.
	Method pulumi.StringPtrInput
	// FortiAPI URL path.
	Path pulumi.StringPtrInput
	// FortiAPI returns results.
	Response pulumi.StringPtrInput
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path.
	Specialparams pulumi.StringPtrInput
	Vdomparam     pulumi.StringPtrInput
}

func (GenericApiState) ElementType

func (GenericApiState) ElementType() reflect.Type

type LookupGenericApiArgs

type LookupGenericApiArgs struct {
	// FortiAPI URL path.
	Path string `pulumi:"path"`
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path..
	Specialparams *string `pulumi:"specialparams"`
	Vdomparam     *string `pulumi:"vdomparam"`
}

A collection of arguments for invoking getGenericApi.

type LookupGenericApiOutputArgs

type LookupGenericApiOutputArgs struct {
	// FortiAPI URL path.
	Path pulumi.StringInput `pulumi:"path"`
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path..
	Specialparams pulumi.StringPtrInput `pulumi:"specialparams"`
	Vdomparam     pulumi.StringPtrInput `pulumi:"vdomparam"`
}

A collection of arguments for invoking getGenericApi.

func (LookupGenericApiOutputArgs) ElementType

func (LookupGenericApiOutputArgs) ElementType() reflect.Type

type LookupGenericApiResult

type LookupGenericApiResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// FortiAPI URL path.
	Path string `pulumi:"path"`
	// FortiAPI returns results.
	Response string `pulumi:"response"`
	// URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path..
	Specialparams *string `pulumi:"specialparams"`
	Vdomparam     *string `pulumi:"vdomparam"`
}

A collection of values returned by getGenericApi.

func LookupGenericApi

func LookupGenericApi(ctx *pulumi.Context, args *LookupGenericApiArgs, opts ...pulumi.InvokeOption) (*LookupGenericApiResult, error)

Provides a FortiAPI Generic Interface data source.

type LookupGenericApiResultOutput

type LookupGenericApiResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getGenericApi.

func (LookupGenericApiResultOutput) ElementType

func (LookupGenericApiResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (LookupGenericApiResultOutput) Path

FortiAPI URL path.

func (LookupGenericApiResultOutput) Response

FortiAPI returns results.

func (LookupGenericApiResultOutput) Specialparams

URL parameters, in addition to the URL path, user can specify URL parameters which are appended to the URL path..

func (LookupGenericApiResultOutput) ToLookupGenericApiResultOutput

func (o LookupGenericApiResultOutput) ToLookupGenericApiResultOutput() LookupGenericApiResultOutput

func (LookupGenericApiResultOutput) ToLookupGenericApiResultOutputWithContext

func (o LookupGenericApiResultOutput) ToLookupGenericApiResultOutputWithContext(ctx context.Context) LookupGenericApiResultOutput

func (LookupGenericApiResultOutput) Vdomparam

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL