vkcs.LbL7policy
Explore with Pulumi AI
Manages a Load Balancer L7 Policy resource within VKCS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const appRedirect = new vkcs.LbL7policy("appRedirect", {
description: "Policy for tf lb testing",
action: "REDIRECT_TO_POOL",
position: 1,
listenerId: vkcs_lb_listener.app_http.id,
redirectPoolId: vkcs_lb_pool.http.id,
});
import pulumi
import pulumi_vkcs as vkcs
app_redirect = vkcs.LbL7policy("appRedirect",
description="Policy for tf lb testing",
action="REDIRECT_TO_POOL",
position=1,
listener_id=vkcs_lb_listener["app_http"]["id"],
redirect_pool_id=vkcs_lb_pool["http"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.NewLbL7policy(ctx, "appRedirect", &vkcs.LbL7policyArgs{
Description: pulumi.String("Policy for tf lb testing"),
Action: pulumi.String("REDIRECT_TO_POOL"),
Position: pulumi.Float64(1),
ListenerId: pulumi.Any(vkcs_lb_listener.App_http.Id),
RedirectPoolId: pulumi.Any(vkcs_lb_pool.Http.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var appRedirect = new Vkcs.LbL7policy("appRedirect", new()
{
Description = "Policy for tf lb testing",
Action = "REDIRECT_TO_POOL",
Position = 1,
ListenerId = vkcs_lb_listener.App_http.Id,
RedirectPoolId = vkcs_lb_pool.Http.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.LbL7policy;
import com.pulumi.vkcs.LbL7policyArgs;
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 appRedirect = new LbL7policy("appRedirect", LbL7policyArgs.builder()
.description("Policy for tf lb testing")
.action("REDIRECT_TO_POOL")
.position(1)
.listenerId(vkcs_lb_listener.app_http().id())
.redirectPoolId(vkcs_lb_pool.http().id())
.build());
}
}
resources:
appRedirect:
type: vkcs:LbL7policy
properties:
description: Policy for tf lb testing
action: REDIRECT_TO_POOL
position: 1
listenerId: ${vkcs_lb_listener.app_http.id}
redirectPoolId: ${vkcs_lb_pool.http.id}
Create LbL7policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LbL7policy(name: string, args: LbL7policyArgs, opts?: CustomResourceOptions);
@overload
def LbL7policy(resource_name: str,
args: LbL7policyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LbL7policy(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
listener_id: Optional[str] = None,
admin_state_up: Optional[bool] = None,
description: Optional[str] = None,
lb_l7policy_id: Optional[str] = None,
name: Optional[str] = None,
position: Optional[float] = None,
redirect_pool_id: Optional[str] = None,
redirect_url: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[LbL7policyTimeoutsArgs] = None)
func NewLbL7policy(ctx *Context, name string, args LbL7policyArgs, opts ...ResourceOption) (*LbL7policy, error)
public LbL7policy(string name, LbL7policyArgs args, CustomResourceOptions? opts = null)
public LbL7policy(String name, LbL7policyArgs args)
public LbL7policy(String name, LbL7policyArgs args, CustomResourceOptions options)
type: vkcs:LbL7policy
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 LbL7policyArgs
- 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 LbL7policyArgs
- 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 LbL7policyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LbL7policyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LbL7policyArgs
- 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 lbL7policyResource = new Vkcs.LbL7policy("lbL7policyResource", new()
{
Action = "string",
ListenerId = "string",
AdminStateUp = false,
Description = "string",
LbL7policyId = "string",
Name = "string",
Position = 0,
RedirectPoolId = "string",
RedirectUrl = "string",
Region = "string",
Timeouts = new Vkcs.Inputs.LbL7policyTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := vkcs.NewLbL7policy(ctx, "lbL7policyResource", &vkcs.LbL7policyArgs{
Action: pulumi.String("string"),
ListenerId: pulumi.String("string"),
AdminStateUp: pulumi.Bool(false),
Description: pulumi.String("string"),
LbL7policyId: pulumi.String("string"),
Name: pulumi.String("string"),
Position: pulumi.Float64(0),
RedirectPoolId: pulumi.String("string"),
RedirectUrl: pulumi.String("string"),
Region: pulumi.String("string"),
Timeouts: &.LbL7policyTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var lbL7policyResource = new LbL7policy("lbL7policyResource", LbL7policyArgs.builder()
.action("string")
.listenerId("string")
.adminStateUp(false)
.description("string")
.lbL7policyId("string")
.name("string")
.position(0)
.redirectPoolId("string")
.redirectUrl("string")
.region("string")
.timeouts(LbL7policyTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
lb_l7policy_resource = vkcs.LbL7policy("lbL7policyResource",
action="string",
listener_id="string",
admin_state_up=False,
description="string",
lb_l7policy_id="string",
name="string",
position=0,
redirect_pool_id="string",
redirect_url="string",
region="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const lbL7policyResource = new vkcs.LbL7policy("lbL7policyResource", {
action: "string",
listenerId: "string",
adminStateUp: false,
description: "string",
lbL7policyId: "string",
name: "string",
position: 0,
redirectPoolId: "string",
redirectUrl: "string",
region: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: vkcs:LbL7policy
properties:
action: string
adminStateUp: false
description: string
lbL7policyId: string
listenerId: string
name: string
position: 0
redirectPoolId: string
redirectUrl: string
region: string
timeouts:
create: string
delete: string
update: string
LbL7policy 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 LbL7policy resource accepts the following input properties:
- Action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Admin
State boolUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
- optional string → Human-readable description for the L7 Policy.
- Lb
L7policy stringId - string → ID of the resource.
- Name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- Position double
- optional number → The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - Timeouts
Lb
L7policy Timeouts
- Action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Admin
State boolUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
- optional string → Human-readable description for the L7 Policy.
- Lb
L7policy stringId - string → ID of the resource.
- Name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- Position float64
- optional number → The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - Timeouts
Lb
L7policy Timeouts Args
- action String
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener
Id String - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin
State BooleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description String
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy StringId - string → ID of the resource.
- name String
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position Double
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool StringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url String - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region String
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts
- action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin
State booleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description string
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy stringId - string → ID of the resource.
- name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position number
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts
- action str
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener_
id str - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin_
state_ boolup - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description str
- optional string → Human-readable description for the L7 Policy.
- lb_
l7policy_ strid - string → ID of the resource.
- name str
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position float
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect_
pool_ strid - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect_
url str - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region str
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts Args
- action String
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- listener
Id String - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- admin
State BooleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description String
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy StringId - string → ID of the resource.
- name String
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position Number
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool StringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url String - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region String
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the LbL7policy 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 LbL7policy Resource
Get an existing LbL7policy 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?: LbL7policyState, opts?: CustomResourceOptions): LbL7policy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
admin_state_up: Optional[bool] = None,
description: Optional[str] = None,
lb_l7policy_id: Optional[str] = None,
listener_id: Optional[str] = None,
name: Optional[str] = None,
position: Optional[float] = None,
redirect_pool_id: Optional[str] = None,
redirect_url: Optional[str] = None,
region: Optional[str] = None,
timeouts: Optional[LbL7policyTimeoutsArgs] = None) -> LbL7policy
func GetLbL7policy(ctx *Context, name string, id IDInput, state *LbL7policyState, opts ...ResourceOption) (*LbL7policy, error)
public static LbL7policy Get(string name, Input<string> id, LbL7policyState? state, CustomResourceOptions? opts = null)
public static LbL7policy get(String name, Output<String> id, LbL7policyState state, CustomResourceOptions options)
resources: _: type: vkcs:LbL7policy get: id: ${id}
- 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.
- Action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Admin
State boolUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
- optional string → Human-readable description for the L7 Policy.
- Lb
L7policy stringId - string → ID of the resource.
- Listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- Position double
- optional number → The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - Timeouts
Lb
L7policy Timeouts
- Action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- Admin
State boolUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- Description string
- optional string → Human-readable description for the L7 Policy.
- Lb
L7policy stringId - string → ID of the resource.
- Listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- Name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- Position float64
- optional number → The position of this policy on the listener. Positions start at 1.
- Redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- Redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- Region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - Timeouts
Lb
L7policy Timeouts Args
- action String
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin
State BooleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description String
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy StringId - string → ID of the resource.
- listener
Id String - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name String
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position Double
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool StringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url String - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region String
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts
- action string
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin
State booleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description string
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy stringId - string → ID of the resource.
- listener
Id string - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name string
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position number
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool stringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url string - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region string
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts
- action str
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin_
state_ boolup - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description str
- optional string → Human-readable description for the L7 Policy.
- lb_
l7policy_ strid - string → ID of the resource.
- listener_
id str - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name str
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position float
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect_
pool_ strid - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect_
url str - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region str
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts
Lb
L7policy Timeouts Args
- action String
- required string → The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.
- admin
State BooleanUp - optional boolean → The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
- description String
- optional string → Human-readable description for the L7 Policy.
- lb
L7policy StringId - string → ID of the resource.
- listener
Id String - required string → The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
- name String
- optional string → Human-readable name for the L7 Policy. Does not have to be unique.
- position Number
- optional number → The position of this policy on the listener. Positions start at 1.
- redirect
Pool StringId - optional string → Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.
- redirect
Url String - optional string → Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.
- region String
- optional string → The region in which to obtain the Loadbalancer client. If omitted, the
region
argument of the provider is used. Changing this creates a new L7 Policy. - timeouts Property Map
Supporting Types
LbL7policyTimeouts, LbL7policyTimeoutsArgs
Import
Load Balancer L7 Policy can be imported using the L7 Policy ID, e.g.:
$ pulumi import vkcs:index/lbL7policy:LbL7policy l7policy_1 8a7a79c2-cf17-4e65-b2ae-ddc8bfcf6c74
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.