1. Packages
  2. Impart Security
  3. API Docs
  4. ApiBinding
Impart Security v0.4.0 published on Wednesday, Apr 10, 2024 by Impart Security

impart.ApiBinding

Explore with Pulumi AI

impart logo
Impart Security v0.4.0 published on Wednesday, Apr 10, 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,
                   base_path: Optional[str] = None,
                   hostname: Optional[str] = None,
                   name: Optional[str] = None,
                   port: Optional[int] = None,
                   spec_id: Optional[str] = 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,
                   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.

    Example

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

    var apiBindingResource = new Impart.ApiBinding("apiBindingResource", new()
    {
        BasePath = "string",
        Hostname = "string",
        Name = "string",
        Port = 0,
        SpecId = "string",
        ForwardedFors = new[]
        {
            "string",
        },
        ForwardedHosts = new[]
        {
            "string",
        },
        ForwardedIds = new[]
        {
            "string",
        },
        ForwardedProtos = new[]
        {
            "string",
        },
        Hops = 0,
        UpstreamOrigin = "string",
        UseForwarded = false,
    });
    
    example, err := impart.NewApiBinding(ctx, "apiBindingResource", &impart.ApiBindingArgs{
    	BasePath: pulumi.String("string"),
    	Hostname: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Port:     pulumi.Int(0),
    	SpecId:   pulumi.String("string"),
    	ForwardedFors: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForwardedHosts: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForwardedIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ForwardedProtos: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Hops:           pulumi.Int(0),
    	UpstreamOrigin: pulumi.String("string"),
    	UseForwarded:   pulumi.Bool(false),
    })
    
    var apiBindingResource = new ApiBinding("apiBindingResource", ApiBindingArgs.builder()        
        .basePath("string")
        .hostname("string")
        .name("string")
        .port(0)
        .specId("string")
        .forwardedFors("string")
        .forwardedHosts("string")
        .forwardedIds("string")
        .forwardedProtos("string")
        .hops(0)
        .upstreamOrigin("string")
        .useForwarded(false)
        .build());
    
    api_binding_resource = impart.ApiBinding("apiBindingResource",
        base_path="string",
        hostname="string",
        name="string",
        port=0,
        spec_id="string",
        forwarded_fors=["string"],
        forwarded_hosts=["string"],
        forwarded_ids=["string"],
        forwarded_protos=["string"],
        hops=0,
        upstream_origin="string",
        use_forwarded=False)
    
    const apiBindingResource = new impart.ApiBinding("apiBindingResource", {
        basePath: "string",
        hostname: "string",
        name: "string",
        port: 0,
        specId: "string",
        forwardedFors: ["string"],
        forwardedHosts: ["string"],
        forwardedIds: ["string"],
        forwardedProtos: ["string"],
        hops: 0,
        upstreamOrigin: "string",
        useForwarded: false,
    });
    
    type: impart:ApiBinding
    properties:
        basePath: string
        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

    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.
    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.
    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.
    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.
    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.
    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.
    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,
            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.
    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.
    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.
    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.
    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.
    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.
    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.4.0 published on Wednesday, Apr 10, 2024 by Impart Security