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

edgecenter.getInstancePortSecurity

Explore with Pulumi AI

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

    Represent instance_port_security data_source.

    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 portSecurity = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getInstancePortSecurity({
        regionId: rg.id,
        projectId: pr.id,
        portId: "073947f8-8589-4104-bdff-2cedbe56239f",
        instanceId: "4f81e8f8-d7b8-45a4-93fd-609ad2n670f0",
    }));
    export const view = portSecurity;
    
    import pulumi
    import pulumi_edgecenter as edgecenter
    
    pr = edgecenter.get_project(name="test")
    rg = edgecenter.get_region(name="ED-10 Preprod")
    port_security = edgecenter.get_instance_port_security(region_id=rg.id,
        project_id=pr.id,
        port_id="073947f8-8589-4104-bdff-2cedbe56239f",
        instance_id="4f81e8f8-d7b8-45a4-93fd-609ad2n670f0")
    pulumi.export("view", port_security)
    
    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
    		}
    		portSecurity, err := edgecenter.LookupInstancePortSecurity(ctx, &edgecenter.LookupInstancePortSecurityArgs{
    			RegionId:   pulumi.Float64Ref(rg.Id),
    			ProjectId:  pulumi.Float64Ref(pr.Id),
    			PortId:     "073947f8-8589-4104-bdff-2cedbe56239f",
    			InstanceId: "4f81e8f8-d7b8-45a4-93fd-609ad2n670f0",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("view", portSecurity)
    		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 portSecurity = Edgecenter.GetInstancePortSecurity.Invoke(new()
        {
            RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
            ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
            PortId = "073947f8-8589-4104-bdff-2cedbe56239f",
            InstanceId = "4f81e8f8-d7b8-45a4-93fd-609ad2n670f0",
        });
    
        return new Dictionary<string, object?>
        {
            ["view"] = portSecurity,
        };
    });
    
    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.GetInstancePortSecurityArgs;
    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 portSecurity = EdgecenterFunctions.getInstancePortSecurity(GetInstancePortSecurityArgs.builder()
                .regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
                .projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
                .portId("073947f8-8589-4104-bdff-2cedbe56239f")
                .instanceId("4f81e8f8-d7b8-45a4-93fd-609ad2n670f0")
                .build());
    
            ctx.export("view", portSecurity.applyValue(getInstancePortSecurityResult -> getInstancePortSecurityResult));
        }
    }
    
    variables:
      pr:
        fn::invoke:
          function: edgecenter:getProject
          arguments:
            name: test
      rg:
        fn::invoke:
          function: edgecenter:getRegion
          arguments:
            name: ED-10 Preprod
      portSecurity:
        fn::invoke:
          function: edgecenter:getInstancePortSecurity
          arguments:
            regionId: ${rg.id}
            projectId: ${pr.id}
            portId: 073947f8-8589-4104-bdff-2cedbe56239f
            instanceId: 4f81e8f8-d7b8-45a4-93fd-609ad2n670f0
    outputs:
      view: ${portSecurity}
    

    Using getInstancePortSecurity

    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 getInstancePortSecurity(args: GetInstancePortSecurityArgs, opts?: InvokeOptions): Promise<GetInstancePortSecurityResult>
    function getInstancePortSecurityOutput(args: GetInstancePortSecurityOutputArgs, opts?: InvokeOptions): Output<GetInstancePortSecurityResult>
    def get_instance_port_security(id: Optional[str] = None,
                                   instance_id: Optional[str] = None,
                                   port_id: 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) -> GetInstancePortSecurityResult
    def get_instance_port_security_output(id: Optional[pulumi.Input[str]] = None,
                                   instance_id: Optional[pulumi.Input[str]] = None,
                                   port_id: 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[GetInstancePortSecurityResult]
    func LookupInstancePortSecurity(ctx *Context, args *LookupInstancePortSecurityArgs, opts ...InvokeOption) (*LookupInstancePortSecurityResult, error)
    func LookupInstancePortSecurityOutput(ctx *Context, args *LookupInstancePortSecurityOutputArgs, opts ...InvokeOption) LookupInstancePortSecurityResultOutput

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

    public static class GetInstancePortSecurity 
    {
        public static Task<GetInstancePortSecurityResult> InvokeAsync(GetInstancePortSecurityArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancePortSecurityResult> Invoke(GetInstancePortSecurityInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancePortSecurityResult> getInstancePortSecurity(GetInstancePortSecurityArgs args, InvokeOptions options)
    public static Output<GetInstancePortSecurityResult> getInstancePortSecurity(GetInstancePortSecurityArgs args, InvokeOptions options)
    
    fn::invoke:
      function: edgecenter:index/getInstancePortSecurity:getInstancePortSecurity
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    ID of the instance to which the port is connected.
    PortId string
    ID of the port.
    Id string
    The ID of this resource.
    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.
    InstanceId string
    ID of the instance to which the port is connected.
    PortId string
    ID of the port.
    Id string
    The ID of this resource.
    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.
    instanceId String
    ID of the instance to which the port is connected.
    portId String
    ID of the port.
    id String
    The ID of this resource.
    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.
    instanceId string
    ID of the instance to which the port is connected.
    portId string
    ID of the port.
    id string
    The ID of this resource.
    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.
    instance_id str
    ID of the instance to which the port is connected.
    port_id str
    ID of the port.
    id str
    The ID of this resource.
    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.
    instanceId String
    ID of the instance to which the port is connected.
    portId String
    ID of the port.
    id String
    The ID of this resource.
    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.

    getInstancePortSecurity Result

    The following output properties are available:

    AllSecurityGroupIds List<string>
    Set of all security groups IDs on this port.
    Id string
    The ID of this resource.
    InstanceId string
    ID of the instance to which the port is connected.
    PortId string
    ID of the port.
    PortSecurityDisabled bool
    Is the port_security feature disabled.
    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.
    AllSecurityGroupIds []string
    Set of all security groups IDs on this port.
    Id string
    The ID of this resource.
    InstanceId string
    ID of the instance to which the port is connected.
    PortId string
    ID of the port.
    PortSecurityDisabled bool
    Is the port_security feature disabled.
    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.
    allSecurityGroupIds List<String>
    Set of all security groups IDs on this port.
    id String
    The ID of this resource.
    instanceId String
    ID of the instance to which the port is connected.
    portId String
    ID of the port.
    portSecurityDisabled Boolean
    Is the port_security feature disabled.
    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.
    allSecurityGroupIds string[]
    Set of all security groups IDs on this port.
    id string
    The ID of this resource.
    instanceId string
    ID of the instance to which the port is connected.
    portId string
    ID of the port.
    portSecurityDisabled boolean
    Is the port_security feature disabled.
    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.
    all_security_group_ids Sequence[str]
    Set of all security groups IDs on this port.
    id str
    The ID of this resource.
    instance_id str
    ID of the instance to which the port is connected.
    port_id str
    ID of the port.
    port_security_disabled bool
    Is the port_security feature disabled.
    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.
    allSecurityGroupIds List<String>
    Set of all security groups IDs on this port.
    id String
    The ID of this resource.
    instanceId String
    ID of the instance to which the port is connected.
    portId String
    ID of the port.
    portSecurityDisabled Boolean
    Is the port_security feature disabled.
    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.

    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