1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getLocalPeeringGateways
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.Core.getLocalPeeringGateways

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    This data source provides the list of Local Peering Gateways in Oracle Cloud Infrastructure Core service.

    Lists the local peering gateways (LPGs) for the specified VCN and specified compartment. If the VCN ID is not provided, then the list includes the LPGs from all VCNs in the specified compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testLocalPeeringGateways = oci.Core.getLocalPeeringGateways({
        compartmentId: _var.compartment_id,
        vcnId: oci_core_vcn.test_vcn.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_local_peering_gateways = oci.Core.get_local_peering_gateways(compartment_id=var["compartment_id"],
        vcn_id=oci_core_vcn["test_vcn"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetLocalPeeringGateways(ctx, &core.GetLocalPeeringGatewaysArgs{
    			CompartmentId: _var.Compartment_id,
    			VcnId:         pulumi.StringRef(oci_core_vcn.Test_vcn.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testLocalPeeringGateways = Oci.Core.GetLocalPeeringGateways.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            VcnId = oci_core_vcn.Test_vcn.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.CoreFunctions;
    import com.pulumi.oci.Core.inputs.GetLocalPeeringGatewaysArgs;
    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 testLocalPeeringGateways = CoreFunctions.getLocalPeeringGateways(GetLocalPeeringGatewaysArgs.builder()
                .compartmentId(var_.compartment_id())
                .vcnId(oci_core_vcn.test_vcn().id())
                .build());
    
        }
    }
    
    variables:
      testLocalPeeringGateways:
        fn::invoke:
          Function: oci:Core:getLocalPeeringGateways
          Arguments:
            compartmentId: ${var.compartment_id}
            vcnId: ${oci_core_vcn.test_vcn.id}
    

    Using getLocalPeeringGateways

    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 getLocalPeeringGateways(args: GetLocalPeeringGatewaysArgs, opts?: InvokeOptions): Promise<GetLocalPeeringGatewaysResult>
    function getLocalPeeringGatewaysOutput(args: GetLocalPeeringGatewaysOutputArgs, opts?: InvokeOptions): Output<GetLocalPeeringGatewaysResult>
    def get_local_peering_gateways(compartment_id: Optional[str] = None,
                                   filters: Optional[Sequence[_core.GetLocalPeeringGatewaysFilter]] = None,
                                   vcn_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetLocalPeeringGatewaysResult
    def get_local_peering_gateways_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetLocalPeeringGatewaysFilterArgs]]]] = None,
                                   vcn_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetLocalPeeringGatewaysResult]
    func GetLocalPeeringGateways(ctx *Context, args *GetLocalPeeringGatewaysArgs, opts ...InvokeOption) (*GetLocalPeeringGatewaysResult, error)
    func GetLocalPeeringGatewaysOutput(ctx *Context, args *GetLocalPeeringGatewaysOutputArgs, opts ...InvokeOption) GetLocalPeeringGatewaysResultOutput

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

    public static class GetLocalPeeringGateways 
    {
        public static Task<GetLocalPeeringGatewaysResult> InvokeAsync(GetLocalPeeringGatewaysArgs args, InvokeOptions? opts = null)
        public static Output<GetLocalPeeringGatewaysResult> Invoke(GetLocalPeeringGatewaysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLocalPeeringGatewaysResult> getLocalPeeringGateways(GetLocalPeeringGatewaysArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getLocalPeeringGateways:getLocalPeeringGateways
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    Filters List<GetLocalPeeringGatewaysFilter>
    VcnId string
    The OCID of the VCN.
    CompartmentId string
    The OCID of the compartment.
    Filters []GetLocalPeeringGatewaysFilter
    VcnId string
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    filters List<GetLocalPeeringGatewaysFilter>
    vcnId String
    The OCID of the VCN.
    compartmentId string
    The OCID of the compartment.
    filters GetLocalPeeringGatewaysFilter[]
    vcnId string
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    filters List<Property Map>
    vcnId String
    The OCID of the VCN.

    getLocalPeeringGateways Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the LPG.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocalPeeringGateways List<GetLocalPeeringGatewaysLocalPeeringGateway>
    The list of local_peering_gateways.
    Filters List<GetLocalPeeringGatewaysFilter>
    VcnId string
    The OCID of the VCN that uses the LPG.
    CompartmentId string
    The OCID of the compartment containing the LPG.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocalPeeringGateways []GetLocalPeeringGatewaysLocalPeeringGateway
    The list of local_peering_gateways.
    Filters []GetLocalPeeringGatewaysFilter
    VcnId string
    The OCID of the VCN that uses the LPG.
    compartmentId String
    The OCID of the compartment containing the LPG.
    id String
    The provider-assigned unique ID for this managed resource.
    localPeeringGateways List<GetLocalPeeringGatewaysLocalPeeringGateway>
    The list of local_peering_gateways.
    filters List<GetLocalPeeringGatewaysFilter>
    vcnId String
    The OCID of the VCN that uses the LPG.
    compartmentId string
    The OCID of the compartment containing the LPG.
    id string
    The provider-assigned unique ID for this managed resource.
    localPeeringGateways GetLocalPeeringGatewaysLocalPeeringGateway[]
    The list of local_peering_gateways.
    filters GetLocalPeeringGatewaysFilter[]
    vcnId string
    The OCID of the VCN that uses the LPG.
    compartment_id str
    The OCID of the compartment containing the LPG.
    id str
    The provider-assigned unique ID for this managed resource.
    local_peering_gateways Sequence[core.GetLocalPeeringGatewaysLocalPeeringGateway]
    The list of local_peering_gateways.
    filters Sequence[core.GetLocalPeeringGatewaysFilter]
    vcn_id str
    The OCID of the VCN that uses the LPG.
    compartmentId String
    The OCID of the compartment containing the LPG.
    id String
    The provider-assigned unique ID for this managed resource.
    localPeeringGateways List<Property Map>
    The list of local_peering_gateways.
    filters List<Property Map>
    vcnId String
    The OCID of the VCN that uses the LPG.

    Supporting Types

    GetLocalPeeringGatewaysFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetLocalPeeringGatewaysLocalPeeringGateway

    CompartmentId string
    The OCID of the compartment.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The LPG's Oracle ID (OCID).
    IsCrossTenancyPeering bool
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    PeerAdvertisedCidr string
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    PeerAdvertisedCidrDetails List<string>
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    PeerId string
    The OCID of the peered LPG
    PeeringStatus string
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    PeeringStatusDetails string
    Additional information regarding the peering status, if applicable.
    RouteTableId string
    The OCID of the route table the LPG is using.
    State string
    The LPG's current lifecycle state.
    TimeCreated string
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN.
    CompartmentId string
    The OCID of the compartment.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The LPG's Oracle ID (OCID).
    IsCrossTenancyPeering bool
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    PeerAdvertisedCidr string
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    PeerAdvertisedCidrDetails []string
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    PeerId string
    The OCID of the peered LPG
    PeeringStatus string
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    PeeringStatusDetails string
    Additional information regarding the peering status, if applicable.
    RouteTableId string
    The OCID of the route table the LPG is using.
    State string
    The LPG's current lifecycle state.
    TimeCreated string
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The LPG's Oracle ID (OCID).
    isCrossTenancyPeering Boolean
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    peerAdvertisedCidr String
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    peerAdvertisedCidrDetails List<String>
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    peerId String
    The OCID of the peered LPG
    peeringStatus String
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    peeringStatusDetails String
    Additional information regarding the peering status, if applicable.
    routeTableId String
    The OCID of the route table the LPG is using.
    state String
    The LPG's current lifecycle state.
    timeCreated String
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN.
    compartmentId string
    The OCID of the compartment.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The LPG's Oracle ID (OCID).
    isCrossTenancyPeering boolean
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    peerAdvertisedCidr string
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    peerAdvertisedCidrDetails string[]
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    peerId string
    The OCID of the peered LPG
    peeringStatus string
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    peeringStatusDetails string
    Additional information regarding the peering status, if applicable.
    routeTableId string
    The OCID of the route table the LPG is using.
    state string
    The LPG's current lifecycle state.
    timeCreated string
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId string
    The OCID of the VCN.
    compartment_id str
    The OCID of the compartment.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The LPG's Oracle ID (OCID).
    is_cross_tenancy_peering bool
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    peer_advertised_cidr str
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    peer_advertised_cidr_details Sequence[str]
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    peer_id str
    The OCID of the peered LPG
    peering_status str
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    peering_status_details str
    Additional information regarding the peering status, if applicable.
    route_table_id str
    The OCID of the route table the LPG is using.
    state str
    The LPG's current lifecycle state.
    time_created str
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcn_id str
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The LPG's Oracle ID (OCID).
    isCrossTenancyPeering Boolean
    Whether the VCN at the other end of the peering is in a different tenancy. Example: false
    peerAdvertisedCidr String
    The smallest aggregate CIDR that contains all the CIDR routes advertised by the VCN at the other end of the peering from this LPG. See peerAdvertisedCidrDetails for the individual CIDRs. The value is null if the LPG is not peered. Example: 192.168.0.0/16, or if aggregated with 172.16.0.0/24 then 128.0.0.0/1
    peerAdvertisedCidrDetails List<String>
    The specific ranges of IP addresses available on or via the VCN at the other end of the peering from this LPG. The value is null if the LPG is not peered. You can use these as destination CIDRs for route rules to route a subnet's traffic to this LPG. Example: [192.168.0.0/16, 172.16.0.0/24]
    peerId String
    The OCID of the peered LPG
    peeringStatus String
    Whether the LPG is peered with another LPG. NEW means the LPG has not yet been peered. PENDING means the peering is being established. REVOKED means the LPG at the other end of the peering has been deleted.
    peeringStatusDetails String
    Additional information regarding the peering status, if applicable.
    routeTableId String
    The OCID of the route table the LPG is using.
    state String
    The LPG's current lifecycle state.
    timeCreated String
    The date and time the LPG was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi