impart.ApiBinding
Explore with Pulumi AI
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:
- Base
Path 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.
- Spec
Id string - The specification id.
- Disabled bool
- The disabled for this api binding.
- Forwarded
Fors List<string> - The forwarded_for for this api binding.
- Forwarded
Hosts List<string> - The forwarded_host for this api binding.
- Forwarded
Ids List<string> - The forwarded_id for this api binding.
- Forwarded
Protos List<string> - The forwarded_proto for this api binding.
- Hops int
- The hops for this api binding.
- Upstream
Origin string - The upstream_origin for this api binding.
- Use
Forwarded bool - The use_forwarded for this api binding.
- Base
Path 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.
- Spec
Id string - The specification id.
- Disabled bool
- The disabled for this api binding.
- Forwarded
Fors []string - The forwarded_for for this api binding.
- Forwarded
Hosts []string - The forwarded_host for this api binding.
- Forwarded
Ids []string - The forwarded_id for this api binding.
- Forwarded
Protos []string - The forwarded_proto for this api binding.
- Hops int
- The hops for this api binding.
- Upstream
Origin string - The upstream_origin for this api binding.
- Use
Forwarded bool - The use_forwarded for this api binding.
- base
Path 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.
- spec
Id String - The specification id.
- disabled Boolean
- The disabled for this api binding.
- forwarded
Fors List<String> - The forwarded_for for this api binding.
- forwarded
Hosts List<String> - The forwarded_host for this api binding.
- forwarded
Ids List<String> - The forwarded_id for this api binding.
- forwarded
Protos List<String> - The forwarded_proto for this api binding.
- hops Integer
- The hops for this api binding.
- upstream
Origin String - The upstream_origin for this api binding.
- use
Forwarded Boolean - The use_forwarded for this api binding.
- base
Path 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.
- spec
Id string - The specification id.
- disabled boolean
- The disabled for this api binding.
- forwarded
Fors string[] - The forwarded_for for this api binding.
- forwarded
Hosts string[] - The forwarded_host for this api binding.
- forwarded
Ids string[] - The forwarded_id for this api binding.
- forwarded
Protos string[] - The forwarded_proto for this api binding.
- hops number
- The hops for this api binding.
- upstream
Origin string - The upstream_origin for this api binding.
- use
Forwarded 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.
- base
Path 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.
- spec
Id String - The specification id.
- disabled Boolean
- The disabled for this api binding.
- forwarded
Fors List<String> - The forwarded_for for this api binding.
- forwarded
Hosts List<String> - The forwarded_host for this api binding.
- forwarded
Ids List<String> - The forwarded_id for this api binding.
- forwarded
Protos List<String> - The forwarded_proto for this api binding.
- hops Number
- The hops for this api binding.
- upstream
Origin String - The upstream_origin for this api binding.
- use
Forwarded 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.
- Base
Path string - The base_path for this api binding.
- Disabled bool
- The disabled for this api binding.
- Forwarded
Fors List<string> - The forwarded_for for this api binding.
- Forwarded
Hosts List<string> - The forwarded_host for this api binding.
- Forwarded
Ids List<string> - The forwarded_id for this api binding.
- Forwarded
Protos 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.
- Spec
Id string - The specification id.
- Upstream
Origin string - The upstream_origin for this api binding.
- Use
Forwarded bool - The use_forwarded for this api binding.
- Base
Path string - The base_path for this api binding.
- Disabled bool
- The disabled for this api binding.
- Forwarded
Fors []string - The forwarded_for for this api binding.
- Forwarded
Hosts []string - The forwarded_host for this api binding.
- Forwarded
Ids []string - The forwarded_id for this api binding.
- Forwarded
Protos []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.
- Spec
Id string - The specification id.
- Upstream
Origin string - The upstream_origin for this api binding.
- Use
Forwarded bool - The use_forwarded for this api binding.
- base
Path String - The base_path for this api binding.
- disabled Boolean
- The disabled for this api binding.
- forwarded
Fors List<String> - The forwarded_for for this api binding.
- forwarded
Hosts List<String> - The forwarded_host for this api binding.
- forwarded
Ids List<String> - The forwarded_id for this api binding.
- forwarded
Protos 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.
- spec
Id String - The specification id.
- upstream
Origin String - The upstream_origin for this api binding.
- use
Forwarded Boolean - The use_forwarded for this api binding.
- base
Path string - The base_path for this api binding.
- disabled boolean
- The disabled for this api binding.
- forwarded
Fors string[] - The forwarded_for for this api binding.
- forwarded
Hosts string[] - The forwarded_host for this api binding.
- forwarded
Ids string[] - The forwarded_id for this api binding.
- forwarded
Protos 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.
- spec
Id string - The specification id.
- upstream
Origin string - The upstream_origin for this api binding.
- use
Forwarded 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.
- base
Path String - The base_path for this api binding.
- disabled Boolean
- The disabled for this api binding.
- forwarded
Fors List<String> - The forwarded_for for this api binding.
- forwarded
Hosts List<String> - The forwarded_host for this api binding.
- forwarded
Ids List<String> - The forwarded_id for this api binding.
- forwarded
Protos 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.
- spec
Id String - The specification id.
- upstream
Origin String - The upstream_origin for this api binding.
- use
Forwarded 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.