1. Packages
  2. Fortios
  3. API Docs
  4. system
  5. ApiuserSetting
Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse

fortios.system.ApiuserSetting

Explore with Pulumi AI

fortios logo
Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse

    Provides a resource to configure API users of FortiOS. The API user of the token for this feature should have a super admin profile, It can be set in CLI while GUI does not allow.

    !> Warning: The resource will be deprecated and replaced by new resource fortios.system.Apiuser, we recommend that you use the new resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fortios from "@pulumiverse/fortios";
    
    const test2 = new fortios.system.ApiuserSetting("test2", {
        accprofile: "restAPIprofile",
        trusthosts: [
            {
                ipv4Trusthost: "61.149.0.0 255.255.0.0",
                type: "ipv4-trusthost",
            },
            {
                ipv4Trusthost: "22.22.0.0 255.255.0.0",
                type: "ipv4-trusthost",
            },
        ],
        vdoms: ["root"],
    });
    
    import pulumi
    import pulumiverse_fortios as fortios
    
    test2 = fortios.system.ApiuserSetting("test2",
        accprofile="restAPIprofile",
        trusthosts=[
            fortios.system.ApiuserSettingTrusthostArgs(
                ipv4_trusthost="61.149.0.0 255.255.0.0",
                type="ipv4-trusthost",
            ),
            fortios.system.ApiuserSettingTrusthostArgs(
                ipv4_trusthost="22.22.0.0 255.255.0.0",
                type="ipv4-trusthost",
            ),
        ],
        vdoms=["root"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/system"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := system.NewApiuserSetting(ctx, "test2", &system.ApiuserSettingArgs{
    			Accprofile: pulumi.String("restAPIprofile"),
    			Trusthosts: system.ApiuserSettingTrusthostArray{
    				&system.ApiuserSettingTrusthostArgs{
    					Ipv4Trusthost: pulumi.String("61.149.0.0 255.255.0.0"),
    					Type:          pulumi.String("ipv4-trusthost"),
    				},
    				&system.ApiuserSettingTrusthostArgs{
    					Ipv4Trusthost: pulumi.String("22.22.0.0 255.255.0.0"),
    					Type:          pulumi.String("ipv4-trusthost"),
    				},
    			},
    			Vdoms: pulumi.StringArray{
    				pulumi.String("root"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fortios = Pulumiverse.Fortios;
    
    return await Deployment.RunAsync(() => 
    {
        var test2 = new Fortios.System.ApiuserSetting("test2", new()
        {
            Accprofile = "restAPIprofile",
            Trusthosts = new[]
            {
                new Fortios.System.Inputs.ApiuserSettingTrusthostArgs
                {
                    Ipv4Trusthost = "61.149.0.0 255.255.0.0",
                    Type = "ipv4-trusthost",
                },
                new Fortios.System.Inputs.ApiuserSettingTrusthostArgs
                {
                    Ipv4Trusthost = "22.22.0.0 255.255.0.0",
                    Type = "ipv4-trusthost",
                },
            },
            Vdoms = new[]
            {
                "root",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fortios.system.ApiuserSetting;
    import com.pulumi.fortios.system.ApiuserSettingArgs;
    import com.pulumi.fortios.system.inputs.ApiuserSettingTrusthostArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test2 = new ApiuserSetting("test2", ApiuserSettingArgs.builder()        
                .accprofile("restAPIprofile")
                .trusthosts(            
                    ApiuserSettingTrusthostArgs.builder()
                        .ipv4Trusthost("61.149.0.0 255.255.0.0")
                        .type("ipv4-trusthost")
                        .build(),
                    ApiuserSettingTrusthostArgs.builder()
                        .ipv4Trusthost("22.22.0.0 255.255.0.0")
                        .type("ipv4-trusthost")
                        .build())
                .vdoms("root")
                .build());
    
        }
    }
    
    resources:
      test2:
        type: fortios:system:ApiuserSetting
        properties:
          accprofile: restAPIprofile
          trusthosts:
            - ipv4Trusthost: 61.149.0.0 255.255.0.0
              type: ipv4-trusthost
            - ipv4Trusthost: 22.22.0.0 255.255.0.0
              type: ipv4-trusthost
          vdoms:
            - root
    

    Create ApiuserSetting Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiuserSetting(name: string, args: ApiuserSettingArgs, opts?: CustomResourceOptions);
    @overload
    def ApiuserSetting(resource_name: str,
                       args: ApiuserSettingArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiuserSetting(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       accprofile: Optional[str] = None,
                       trusthosts: Optional[Sequence[ApiuserSettingTrusthostArgs]] = None,
                       vdoms: Optional[Sequence[str]] = None,
                       comments: Optional[str] = None,
                       name: Optional[str] = None)
    func NewApiuserSetting(ctx *Context, name string, args ApiuserSettingArgs, opts ...ResourceOption) (*ApiuserSetting, error)
    public ApiuserSetting(string name, ApiuserSettingArgs args, CustomResourceOptions? opts = null)
    public ApiuserSetting(String name, ApiuserSettingArgs args)
    public ApiuserSetting(String name, ApiuserSettingArgs args, CustomResourceOptions options)
    
    type: fortios:system:ApiuserSetting
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApiuserSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApiuserSettingArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApiuserSettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiuserSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiuserSettingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apiuserSettingResource = new Fortios.System.ApiuserSetting("apiuserSettingResource", new()
    {
        Accprofile = "string",
        Trusthosts = new[]
        {
            new Fortios.System.Inputs.ApiuserSettingTrusthostArgs
            {
                Ipv4Trusthost = "string",
                Type = "string",
            },
        },
        Vdoms = new[]
        {
            "string",
        },
        Comments = "string",
        Name = "string",
    });
    
    example, err := system.NewApiuserSetting(ctx, "apiuserSettingResource", &system.ApiuserSettingArgs{
    	Accprofile: pulumi.String("string"),
    	Trusthosts: system.ApiuserSettingTrusthostArray{
    		&system.ApiuserSettingTrusthostArgs{
    			Ipv4Trusthost: pulumi.String("string"),
    			Type:          pulumi.String("string"),
    		},
    	},
    	Vdoms: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Comments: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    })
    
    var apiuserSettingResource = new ApiuserSetting("apiuserSettingResource", ApiuserSettingArgs.builder()
        .accprofile("string")
        .trusthosts(ApiuserSettingTrusthostArgs.builder()
            .ipv4Trusthost("string")
            .type("string")
            .build())
        .vdoms("string")
        .comments("string")
        .name("string")
        .build());
    
    apiuser_setting_resource = fortios.system.ApiuserSetting("apiuserSettingResource",
        accprofile="string",
        trusthosts=[fortios.system.ApiuserSettingTrusthostArgs(
            ipv4_trusthost="string",
            type="string",
        )],
        vdoms=["string"],
        comments="string",
        name="string")
    
    const apiuserSettingResource = new fortios.system.ApiuserSetting("apiuserSettingResource", {
        accprofile: "string",
        trusthosts: [{
            ipv4Trusthost: "string",
            type: "string",
        }],
        vdoms: ["string"],
        comments: "string",
        name: "string",
    });
    
    type: fortios:system:ApiuserSetting
    properties:
        accprofile: string
        comments: string
        name: string
        trusthosts:
            - ipv4Trusthost: string
              type: string
        vdoms:
            - string
    

    ApiuserSetting Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ApiuserSetting resource accepts the following input properties:

    Accprofile string
    Admin user access profile.
    Trusthosts List<Pulumiverse.Fortios.System.Inputs.ApiuserSettingTrusthost>
    Vdoms List<string>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    Comments string
    Comment.
    Name string
    User name.
    Accprofile string
    Admin user access profile.
    Trusthosts []ApiuserSettingTrusthostArgs
    Vdoms []string
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    Comments string
    Comment.
    Name string
    User name.
    accprofile String
    Admin user access profile.
    trusthosts List<ApiuserSettingTrusthost>
    vdoms List<String>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    comments String
    Comment.
    name String
    User name.
    accprofile string
    Admin user access profile.
    trusthosts ApiuserSettingTrusthost[]
    vdoms string[]
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    comments string
    Comment.
    name string
    User name.
    accprofile str
    Admin user access profile.
    trusthosts Sequence[ApiuserSettingTrusthostArgs]
    vdoms Sequence[str]
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    comments str
    Comment.
    name str
    User name.
    accprofile String
    Admin user access profile.
    trusthosts List<Property Map>
    vdoms List<String>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    comments String
    Comment.
    name String
    User name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiuserSetting resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApiuserSetting Resource

    Get an existing ApiuserSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApiuserSettingState, opts?: CustomResourceOptions): ApiuserSetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accprofile: Optional[str] = None,
            comments: Optional[str] = None,
            name: Optional[str] = None,
            trusthosts: Optional[Sequence[ApiuserSettingTrusthostArgs]] = None,
            vdoms: Optional[Sequence[str]] = None) -> ApiuserSetting
    func GetApiuserSetting(ctx *Context, name string, id IDInput, state *ApiuserSettingState, opts ...ResourceOption) (*ApiuserSetting, error)
    public static ApiuserSetting Get(string name, Input<string> id, ApiuserSettingState? state, CustomResourceOptions? opts = null)
    public static ApiuserSetting get(String name, Output<String> id, ApiuserSettingState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Accprofile string
    Admin user access profile.
    Comments string
    Comment.
    Name string
    User name.
    Trusthosts List<Pulumiverse.Fortios.System.Inputs.ApiuserSettingTrusthost>
    Vdoms List<string>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    Accprofile string
    Admin user access profile.
    Comments string
    Comment.
    Name string
    User name.
    Trusthosts []ApiuserSettingTrusthostArgs
    Vdoms []string
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    accprofile String
    Admin user access profile.
    comments String
    Comment.
    name String
    User name.
    trusthosts List<ApiuserSettingTrusthost>
    vdoms List<String>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    accprofile string
    Admin user access profile.
    comments string
    Comment.
    name string
    User name.
    trusthosts ApiuserSettingTrusthost[]
    vdoms string[]
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    accprofile str
    Admin user access profile.
    comments str
    Comment.
    name str
    User name.
    trusthosts Sequence[ApiuserSettingTrusthostArgs]
    vdoms Sequence[str]
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.
    accprofile String
    Admin user access profile.
    comments String
    Comment.
    name String
    User name.
    trusthosts List<Property Map>
    vdoms List<String>
    Virtual domains.

    • trusthost-Type - (Required) Trusthost type.
    • trusthost-ipv4_trusthost - (Required) IPv4 trusted host address.

    Supporting Types

    ApiuserSettingTrusthost, ApiuserSettingTrusthostArgs

    Ipv4Trusthost string
    Type string
    Ipv4Trusthost string
    Type string
    ipv4Trusthost String
    type String
    ipv4Trusthost string
    type string
    ipv4Trusthost String
    type String

    Package Details

    Repository
    fortios pulumiverse/pulumi-fortios
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fortios Terraform Provider.
    fortios logo
    Fortios v0.0.5 published on Tuesday, Apr 9, 2024 by pulumiverse