1. Packages
  2. Impart Security
  3. API Docs
  4. ApiBinding
Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security

impart.ApiBinding

Explore with Pulumi AI

impart logo
Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security

    Manage an api binding.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as impart from "@impart-security/pulumi-impart";
    
    // Create a new api binding
    const example = new impart.ApiBinding("example", {
        name: "api_binding_example",
        port: 443,
        specId: resource.impart_spec.example.id,
        hostname: "example.com",
        basePath: "/",
    });
    
    import pulumi
    import pulumi_impart as impart
    
    # Create a new api binding
    example = impart.ApiBinding("example",
        name="api_binding_example",
        port=443,
        spec_id=resource["impart_spec"]["example"]["id"],
        hostname="example.com",
        base_path="/")
    
    package main
    
    import (
    	"github.com/impart-security/pulumi-impart/sdk/go/impart"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new api binding
    		_, err := impart.NewApiBinding(ctx, "example", &impart.ApiBindingArgs{
    			Name:     pulumi.String("api_binding_example"),
    			Port:     pulumi.Int(443),
    			SpecId:   pulumi.Any(resource.Impart_spec.Example.Id),
    			Hostname: pulumi.String("example.com"),
    			BasePath: pulumi.String("/"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Impart = Pulumi.Impart;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new api binding
        var example = new Impart.ApiBinding("example", new()
        {
            Name = "api_binding_example",
            Port = 443,
            SpecId = resource.Impart_spec.Example.Id,
            Hostname = "example.com",
            BasePath = "/",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.impart.ApiBinding;
    import com.pulumi.impart.ApiBindingArgs;
    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) {
            // Create a new api binding
            var example = new ApiBinding("example", ApiBindingArgs.builder()
                .name("api_binding_example")
                .port(443)
                .specId(resource.impart_spec().example().id())
                .hostname("example.com")
                .basePath("/")
                .build());
    
        }
    }
    
    resources:
      # Create a new api binding
      example:
        type: impart:ApiBinding
        properties:
          name: api_binding_example
          port: 443
          specId: ${resource.impart_spec.example.id}
          hostname: example.com
          basePath: /
    

    Create ApiBinding Resource

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

    Constructor syntax

    new ApiBinding(name: string, args: ApiBindingArgs, opts?: CustomResourceOptions);
    @overload
    def ApiBinding(resource_name: str,
                   args: ApiBindingArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiBinding(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   hostname: Optional[str] = None,
                   spec_id: Optional[str] = None,
                   port: Optional[int] = None,
                   base_path: Optional[str] = None,
                   name: Optional[str] = None,
                   forwarded_hosts: Optional[Sequence[str]] = None,
                   hops: Optional[int] = None,
                   forwarded_protos: Optional[Sequence[str]] = None,
                   forwarded_ids: Optional[Sequence[str]] = None,
                   forwarded_fors: Optional[Sequence[str]] = None,
                   disabled: Optional[bool] = None,
                   upstream_origin: Optional[str] = None,
                   use_forwarded: Optional[bool] = None)
    func NewApiBinding(ctx *Context, name string, args ApiBindingArgs, opts ...ResourceOption) (*ApiBinding, error)
    public ApiBinding(string name, ApiBindingArgs args, CustomResourceOptions? opts = null)
    public ApiBinding(String name, ApiBindingArgs args)
    public ApiBinding(String name, ApiBindingArgs args, CustomResourceOptions options)
    
    type: impart:ApiBinding
    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 ApiBindingArgs
    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 ApiBindingArgs
    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 ApiBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiBindingArgs
    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 apiBindingResource = new Impart.ApiBinding("apiBindingResource", new()
    {
        Hostname = "string",
        SpecId = "string",
        Port = 0,
        BasePath = "string",
        Name = "string",
        ForwardedHosts = new[]
        {
            "string",
        },
        Hops = 0,
        ForwardedProtos = new[]
        {
            "string",
        },
        ForwardedIds = new[]
        {
            "string",
        },
        ForwardedFors = new[]
        {
            "string",
        },
        Disabled = false,
        UpstreamOrigin = "string",
        UseForwarded = false,
    });
    
    example, err := impart.NewApiBinding(ctx, "apiBindingResource", &impart.ApiBindingArgs{
    	Hostname: pulumi.String("string"),
    	SpecId:   pulumi.String("string"),
    	Port:     pulumi.Int(0),
    	BasePath: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	ForwardedHosts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Hops: pulumi.Int(0),
    	ForwardedProtos: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForwardedIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForwardedFors: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Disabled:       pulumi.Bool(false),
    	UpstreamOrigin: pulumi.String("string"),
    	UseForwarded:   pulumi.Bool(false),
    })
    
    var apiBindingResource = new ApiBinding("apiBindingResource", ApiBindingArgs.builder()
        .hostname("string")
        .specId("string")
        .port(0)
        .basePath("string")
        .name("string")
        .forwardedHosts("string")
        .hops(0)
        .forwardedProtos("string")
        .forwardedIds("string")
        .forwardedFors("string")
        .disabled(false)
        .upstreamOrigin("string")
        .useForwarded(false)
        .build());
    
    api_binding_resource = impart.ApiBinding("apiBindingResource",
        hostname="string",
        spec_id="string",
        port=0,
        base_path="string",
        name="string",
        forwarded_hosts=["string"],
        hops=0,
        forwarded_protos=["string"],
        forwarded_ids=["string"],
        forwarded_fors=["string"],
        disabled=False,
        upstream_origin="string",
        use_forwarded=False)
    
    const apiBindingResource = new impart.ApiBinding("apiBindingResource", {
        hostname: "string",
        specId: "string",
        port: 0,
        basePath: "string",
        name: "string",
        forwardedHosts: ["string"],
        hops: 0,
        forwardedProtos: ["string"],
        forwardedIds: ["string"],
        forwardedFors: ["string"],
        disabled: false,
        upstreamOrigin: "string",
        useForwarded: false,
    });
    
    type: impart:ApiBinding
    properties:
        basePath: string
        disabled: false
        forwardedFors:
            - string
        forwardedHosts:
            - string
        forwardedIds:
            - string
        forwardedProtos:
            - string
        hops: 0
        hostname: string
        name: string
        port: 0
        specId: string
        upstreamOrigin: string
        useForwarded: false
    

    ApiBinding Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiBinding resource accepts the following input properties:

    BasePath string
    The base_path for this api binding.
    Hostname string
    The hostname for this api binding.
    Name string
    The name for this api binding.
    Port int
    The port for this api binding.
    SpecId string
    The specification id.
    Disabled bool
    The disabled for this api binding.
    ForwardedFors List<string>
    The forwarded_for for this api binding.
    ForwardedHosts List<string>
    The forwarded_host for this api binding.
    ForwardedIds List<string>
    The forwarded_id for this api binding.
    ForwardedProtos List<string>
    The forwarded_proto for this api binding.
    Hops int
    The hops for this api binding.
    UpstreamOrigin string
    The upstream_origin for this api binding.
    UseForwarded bool
    The use_forwarded for this api binding.
    BasePath string
    The base_path for this api binding.
    Hostname string
    The hostname for this api binding.
    Name string
    The name for this api binding.
    Port int
    The port for this api binding.
    SpecId string
    The specification id.
    Disabled bool
    The disabled for this api binding.
    ForwardedFors []string
    The forwarded_for for this api binding.
    ForwardedHosts []string
    The forwarded_host for this api binding.
    ForwardedIds []string
    The forwarded_id for this api binding.
    ForwardedProtos []string
    The forwarded_proto for this api binding.
    Hops int
    The hops for this api binding.
    UpstreamOrigin string
    The upstream_origin for this api binding.
    UseForwarded bool
    The use_forwarded for this api binding.
    basePath String
    The base_path for this api binding.
    hostname String
    The hostname for this api binding.
    name String
    The name for this api binding.
    port Integer
    The port for this api binding.
    specId String
    The specification id.
    disabled Boolean
    The disabled for this api binding.
    forwardedFors List<String>
    The forwarded_for for this api binding.
    forwardedHosts List<String>
    The forwarded_host for this api binding.
    forwardedIds List<String>
    The forwarded_id for this api binding.
    forwardedProtos List<String>
    The forwarded_proto for this api binding.
    hops Integer
    The hops for this api binding.
    upstreamOrigin String
    The upstream_origin for this api binding.
    useForwarded Boolean
    The use_forwarded for this api binding.
    basePath string
    The base_path for this api binding.
    hostname string
    The hostname for this api binding.
    name string
    The name for this api binding.
    port number
    The port for this api binding.
    specId string
    The specification id.
    disabled boolean
    The disabled for this api binding.
    forwardedFors string[]
    The forwarded_for for this api binding.
    forwardedHosts string[]
    The forwarded_host for this api binding.
    forwardedIds string[]
    The forwarded_id for this api binding.
    forwardedProtos string[]
    The forwarded_proto for this api binding.
    hops number
    The hops for this api binding.
    upstreamOrigin string
    The upstream_origin for this api binding.
    useForwarded boolean
    The use_forwarded for this api binding.
    base_path str
    The base_path for this api binding.
    hostname str
    The hostname for this api binding.
    name str
    The name for this api binding.
    port int
    The port for this api binding.
    spec_id str
    The specification id.
    disabled bool
    The disabled for this api binding.
    forwarded_fors Sequence[str]
    The forwarded_for for this api binding.
    forwarded_hosts Sequence[str]
    The forwarded_host for this api binding.
    forwarded_ids Sequence[str]
    The forwarded_id for this api binding.
    forwarded_protos Sequence[str]
    The forwarded_proto for this api binding.
    hops int
    The hops for this api binding.
    upstream_origin str
    The upstream_origin for this api binding.
    use_forwarded bool
    The use_forwarded for this api binding.
    basePath String
    The base_path for this api binding.
    hostname String
    The hostname for this api binding.
    name String
    The name for this api binding.
    port Number
    The port for this api binding.
    specId String
    The specification id.
    disabled Boolean
    The disabled for this api binding.
    forwardedFors List<String>
    The forwarded_for for this api binding.
    forwardedHosts List<String>
    The forwarded_host for this api binding.
    forwardedIds List<String>
    The forwarded_id for this api binding.
    forwardedProtos List<String>
    The forwarded_proto for this api binding.
    hops Number
    The hops for this api binding.
    upstreamOrigin String
    The upstream_origin for this api binding.
    useForwarded Boolean
    The use_forwarded for this api binding.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiBinding 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 ApiBinding Resource

    Get an existing ApiBinding 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?: ApiBindingState, opts?: CustomResourceOptions): ApiBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            base_path: Optional[str] = None,
            disabled: Optional[bool] = None,
            forwarded_fors: Optional[Sequence[str]] = None,
            forwarded_hosts: Optional[Sequence[str]] = None,
            forwarded_ids: Optional[Sequence[str]] = None,
            forwarded_protos: Optional[Sequence[str]] = None,
            hops: Optional[int] = None,
            hostname: Optional[str] = None,
            name: Optional[str] = None,
            port: Optional[int] = None,
            spec_id: Optional[str] = None,
            upstream_origin: Optional[str] = None,
            use_forwarded: Optional[bool] = None) -> ApiBinding
    func GetApiBinding(ctx *Context, name string, id IDInput, state *ApiBindingState, opts ...ResourceOption) (*ApiBinding, error)
    public static ApiBinding Get(string name, Input<string> id, ApiBindingState? state, CustomResourceOptions? opts = null)
    public static ApiBinding get(String name, Output<String> id, ApiBindingState 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:
    BasePath string
    The base_path for this api binding.
    Disabled bool
    The disabled for this api binding.
    ForwardedFors List<string>
    The forwarded_for for this api binding.
    ForwardedHosts List<string>
    The forwarded_host for this api binding.
    ForwardedIds List<string>
    The forwarded_id for this api binding.
    ForwardedProtos List<string>
    The forwarded_proto for this api binding.
    Hops int
    The hops for this api binding.
    Hostname string
    The hostname for this api binding.
    Name string
    The name for this api binding.
    Port int
    The port for this api binding.
    SpecId string
    The specification id.
    UpstreamOrigin string
    The upstream_origin for this api binding.
    UseForwarded bool
    The use_forwarded for this api binding.
    BasePath string
    The base_path for this api binding.
    Disabled bool
    The disabled for this api binding.
    ForwardedFors []string
    The forwarded_for for this api binding.
    ForwardedHosts []string
    The forwarded_host for this api binding.
    ForwardedIds []string
    The forwarded_id for this api binding.
    ForwardedProtos []string
    The forwarded_proto for this api binding.
    Hops int
    The hops for this api binding.
    Hostname string
    The hostname for this api binding.
    Name string
    The name for this api binding.
    Port int
    The port for this api binding.
    SpecId string
    The specification id.
    UpstreamOrigin string
    The upstream_origin for this api binding.
    UseForwarded bool
    The use_forwarded for this api binding.
    basePath String
    The base_path for this api binding.
    disabled Boolean
    The disabled for this api binding.
    forwardedFors List<String>
    The forwarded_for for this api binding.
    forwardedHosts List<String>
    The forwarded_host for this api binding.
    forwardedIds List<String>
    The forwarded_id for this api binding.
    forwardedProtos List<String>
    The forwarded_proto for this api binding.
    hops Integer
    The hops for this api binding.
    hostname String
    The hostname for this api binding.
    name String
    The name for this api binding.
    port Integer
    The port for this api binding.
    specId String
    The specification id.
    upstreamOrigin String
    The upstream_origin for this api binding.
    useForwarded Boolean
    The use_forwarded for this api binding.
    basePath string
    The base_path for this api binding.
    disabled boolean
    The disabled for this api binding.
    forwardedFors string[]
    The forwarded_for for this api binding.
    forwardedHosts string[]
    The forwarded_host for this api binding.
    forwardedIds string[]
    The forwarded_id for this api binding.
    forwardedProtos string[]
    The forwarded_proto for this api binding.
    hops number
    The hops for this api binding.
    hostname string
    The hostname for this api binding.
    name string
    The name for this api binding.
    port number
    The port for this api binding.
    specId string
    The specification id.
    upstreamOrigin string
    The upstream_origin for this api binding.
    useForwarded boolean
    The use_forwarded for this api binding.
    base_path str
    The base_path for this api binding.
    disabled bool
    The disabled for this api binding.
    forwarded_fors Sequence[str]
    The forwarded_for for this api binding.
    forwarded_hosts Sequence[str]
    The forwarded_host for this api binding.
    forwarded_ids Sequence[str]
    The forwarded_id for this api binding.
    forwarded_protos Sequence[str]
    The forwarded_proto for this api binding.
    hops int
    The hops for this api binding.
    hostname str
    The hostname for this api binding.
    name str
    The name for this api binding.
    port int
    The port for this api binding.
    spec_id str
    The specification id.
    upstream_origin str
    The upstream_origin for this api binding.
    use_forwarded bool
    The use_forwarded for this api binding.
    basePath String
    The base_path for this api binding.
    disabled Boolean
    The disabled for this api binding.
    forwardedFors List<String>
    The forwarded_for for this api binding.
    forwardedHosts List<String>
    The forwarded_host for this api binding.
    forwardedIds List<String>
    The forwarded_id for this api binding.
    forwardedProtos List<String>
    The forwarded_proto for this api binding.
    hops Number
    The hops for this api binding.
    hostname String
    The hostname for this api binding.
    name String
    The name for this api binding.
    port Number
    The port for this api binding.
    specId String
    The specification id.
    upstreamOrigin String
    The upstream_origin for this api binding.
    useForwarded Boolean
    The use_forwarded for this api binding.

    Package Details

    Repository
    impart impart-security/pulumi-impart
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the impart Terraform Provider.
    impart logo
    Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security