1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getLbL7policy
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

edgecenter.getLbL7policy

Explore with Pulumi AI

edgecenter logo
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

    An L7 Policy is a set of L7 rules, as well as a defined action applied to L7 network traffic. The action is taken if all the rules associated with the policy match

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as edgecenter from "@pulumi/edgecenter";
    
    const pr = edgecenter.getProject({
        name: "test",
    });
    const rg = edgecenter.getRegion({
        name: "ED-10 Preprod",
    });
    const lbL7policy = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getLbL7policy({
        id: "59b2eabc-c0a8-4545-8081-979bd963c6ab",
        regionId: rg.id,
        projectId: pr.id,
    }));
    export const view = lbL7policy;
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    pr = edgecenter.get_project(name="test")
    rg = edgecenter.get_region(name="ED-10 Preprod")
    lb_l7policy = edgecenter.get_lb_l7policy(id="59b2eabc-c0a8-4545-8081-979bd963c6ab",
        region_id=rg.id,
        project_id=pr.id)
    pulumi.export("view", lb_l7policy)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
    			Name: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
    			Name: "ED-10 Preprod",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		lbL7policy, err := edgecenter.LookupLbL7policy(ctx, &edgecenter.LookupLbL7policyArgs{
    			Id:        pulumi.StringRef("59b2eabc-c0a8-4545-8081-979bd963c6ab"),
    			RegionId:  pulumi.Float64Ref(rg.Id),
    			ProjectId: pulumi.Float64Ref(pr.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", lbL7policy)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Edgecenter = Pulumi.Edgecenter;
    
    return await Deployment.RunAsync(() => 
    {
        var pr = Edgecenter.GetProject.Invoke(new()
        {
            Name = "test",
        });
    
        var rg = Edgecenter.GetRegion.Invoke(new()
        {
            Name = "ED-10 Preprod",
        });
    
        var lbL7policy = Edgecenter.GetLbL7policy.Invoke(new()
        {
            Id = "59b2eabc-c0a8-4545-8081-979bd963c6ab",
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
            ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = lbL7policy,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.edgecenter.EdgecenterFunctions;
    import com.pulumi.edgecenter.inputs.GetProjectArgs;
    import com.pulumi.edgecenter.inputs.GetRegionArgs;
    import com.pulumi.edgecenter.inputs.GetLbL7policyArgs;
    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) {
            final var pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
                .name("test")
                .build());
    
            final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
                .name("ED-10 Preprod")
                .build());
    
            final var lbL7policy = EdgecenterFunctions.getLbL7policy(GetLbL7policyArgs.builder()
                .id("59b2eabc-c0a8-4545-8081-979bd963c6ab")
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
            ctx.export("view", lbL7policy.applyValue(getLbL7policyResult -> getLbL7policyResult));
        }
    }
    
    variables:
      pr:
        fn::invoke:
          function: edgecenter:getProject
          arguments:
            name: test
      rg:
        fn::invoke:
          function: edgecenter:getRegion
          arguments:
            name: ED-10 Preprod
      lbL7policy:
        fn::invoke:
          function: edgecenter:getLbL7policy
          arguments:
            id: 59b2eabc-c0a8-4545-8081-979bd963c6ab
            regionId: ${rg.id}
            projectId: ${pr.id}
    outputs:
      view: ${lbL7policy}
    

    Using getLbL7policy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLbL7policy(args: GetLbL7policyArgs, opts?: InvokeOptions): Promise<GetLbL7policyResult>
    function getLbL7policyOutput(args: GetLbL7policyOutputArgs, opts?: InvokeOptions): Output<GetLbL7policyResult>
    def get_lb_l7policy(id: Optional[str] = None,
                        name: Optional[str] = None,
                        project_id: Optional[float] = None,
                        project_name: Optional[str] = None,
                        region_id: Optional[float] = None,
                        region_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetLbL7policyResult
    def get_lb_l7policy_output(id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        project_id: Optional[pulumi.Input[float]] = None,
                        project_name: Optional[pulumi.Input[str]] = None,
                        region_id: Optional[pulumi.Input[float]] = None,
                        region_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetLbL7policyResult]
    func LookupLbL7policy(ctx *Context, args *LookupLbL7policyArgs, opts ...InvokeOption) (*LookupLbL7policyResult, error)
    func LookupLbL7policyOutput(ctx *Context, args *LookupLbL7policyOutputArgs, opts ...InvokeOption) LookupLbL7policyResultOutput

    > Note: This function is named LookupLbL7policy in the Go SDK.

    public static class GetLbL7policy 
    {
        public static Task<GetLbL7policyResult> InvokeAsync(GetLbL7policyArgs args, InvokeOptions? opts = null)
        public static Output<GetLbL7policyResult> Invoke(GetLbL7policyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbL7policyResult> getLbL7policy(GetLbL7policyArgs args, InvokeOptions options)
    public static Output<GetLbL7policyResult> getLbL7policy(GetLbL7policyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getLbL7policy:getLbL7policy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The uuid of l7policy
    Name string
    The human-readable name of the policy
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Id string
    The uuid of l7policy
    Name string
    The human-readable name of the policy
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id String
    The uuid of l7policy
    name String
    The human-readable name of the policy
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id string
    The uuid of l7policy
    name string
    The human-readable name of the policy
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id str
    The uuid of l7policy
    name str
    The human-readable name of the policy
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    id String
    The uuid of l7policy
    name String
    The human-readable name of the policy
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.

    getLbL7policy Result

    The following output properties are available:

    Action string
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    CreatedAt string
    The datetime when the L7 policy was created
    Id string
    The uuid of l7policy
    ListenerId string
    The ID of the listener
    Name string
    The human-readable name of the policy
    OperatingStatus string
    The operating status
    Position double
    The position of this policy on the listener. Positions start at 1
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    ProvisioningStatus string
    The provisioning status
    RedirectHttpCode double
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    RedirectPoolId string
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    RedirectPrefix string
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    RedirectUrl string
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Rules List<string>
    A set of l7rule uuids assigned to this l7policy
    Tags List<string>
    A list of simple strings assigned to the resource
    UpdatedAt string
    The datetime when the L7 policy was last updated
    Action string
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    CreatedAt string
    The datetime when the L7 policy was created
    Id string
    The uuid of l7policy
    ListenerId string
    The ID of the listener
    Name string
    The human-readable name of the policy
    OperatingStatus string
    The operating status
    Position float64
    The position of this policy on the listener. Positions start at 1
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    ProvisioningStatus string
    The provisioning status
    RedirectHttpCode float64
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    RedirectPoolId string
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    RedirectPrefix string
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    RedirectUrl string
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Rules []string
    A set of l7rule uuids assigned to this l7policy
    Tags []string
    A list of simple strings assigned to the resource
    UpdatedAt string
    The datetime when the L7 policy was last updated
    action String
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    createdAt String
    The datetime when the L7 policy was created
    id String
    The uuid of l7policy
    listenerId String
    The ID of the listener
    name String
    The human-readable name of the policy
    operatingStatus String
    The operating status
    position Double
    The position of this policy on the listener. Positions start at 1
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    provisioningStatus String
    The provisioning status
    redirectHttpCode Double
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    redirectPoolId String
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    redirectPrefix String
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    redirectUrl String
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    rules List<String>
    A set of l7rule uuids assigned to this l7policy
    tags List<String>
    A list of simple strings assigned to the resource
    updatedAt String
    The datetime when the L7 policy was last updated
    action string
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    createdAt string
    The datetime when the L7 policy was created
    id string
    The uuid of l7policy
    listenerId string
    The ID of the listener
    name string
    The human-readable name of the policy
    operatingStatus string
    The operating status
    position number
    The position of this policy on the listener. Positions start at 1
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    provisioningStatus string
    The provisioning status
    redirectHttpCode number
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    redirectPoolId string
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    redirectPrefix string
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    redirectUrl string
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    rules string[]
    A set of l7rule uuids assigned to this l7policy
    tags string[]
    A list of simple strings assigned to the resource
    updatedAt string
    The datetime when the L7 policy was last updated
    action str
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    created_at str
    The datetime when the L7 policy was created
    id str
    The uuid of l7policy
    listener_id str
    The ID of the listener
    name str
    The human-readable name of the policy
    operating_status str
    The operating status
    position float
    The position of this policy on the listener. Positions start at 1
    project_id float
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    project_name str
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    provisioning_status str
    The provisioning status
    redirect_http_code float
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    redirect_pool_id str
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    redirect_prefix str
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    redirect_url str
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    region_id float
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    region_name str
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    rules Sequence[str]
    A set of l7rule uuids assigned to this l7policy
    tags Sequence[str]
    A list of simple strings assigned to the resource
    updated_at str
    The datetime when the L7 policy was last updated
    action String
    Enum: "REDIRECTPREFIX" "REDIRECTTOPOOL" "REDIRECTTO_URL" "REJECT" The action.
    createdAt String
    The datetime when the L7 policy was created
    id String
    The uuid of l7policy
    listenerId String
    The ID of the listener
    name String
    The human-readable name of the policy
    operatingStatus String
    The operating status
    position Number
    The position of this policy on the listener. Positions start at 1
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    provisioningStatus String
    The provisioning status
    redirectHttpCode Number
    Requests matching this policy will be redirected to the specified URL or Prefix URL with the HTTP response code. Valid if action is REDIRECTTOURL or REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302
    redirectPoolId String
    Requests matching this policy will be redirected to the pool with this ID. Only valid if the action is REDIRECTTOPOOL
    redirectPrefix String
    Requests matching this policy will be redirected to this Prefix URL. Only valid if the action is REDIRECT_PREFIX
    redirectUrl String
    Requests matching this policy will be redirected to this URL. Only valid if the action is REDIRECTTOURL
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    rules List<String>
    A set of l7rule uuids assigned to this l7policy
    tags List<String>
    A list of simple strings assigned to the resource
    updatedAt String
    The datetime when the L7 policy was last updated

    Package Details

    Repository
    edgecenter edge-center/terraform-provider-edgecenter
    License
    Notes
    This Pulumi package is based on the edgecenter Terraform Provider.
    edgecenter logo
    edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center