1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getInternetGateways
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Core.getInternetGateways

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

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

    Lists the internet gateways in the specified VCN and the specified compartment. If the VCN ID is not provided, then the list includes the internet gateways from all VCNs in the specified compartment.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testInternetGateways = oci.Core.getInternetGateways({
        compartmentId: compartmentId,
        displayName: internetGatewayDisplayName,
        state: internetGatewayState,
        vcnId: testVcn.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_internet_gateways = oci.Core.get_internet_gateways(compartment_id=compartment_id,
        display_name=internet_gateway_display_name,
        state=internet_gateway_state,
        vcn_id=test_vcn["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetInternetGateways(ctx, &core.GetInternetGatewaysArgs{
    			CompartmentId: compartmentId,
    			DisplayName:   pulumi.StringRef(internetGatewayDisplayName),
    			State:         pulumi.StringRef(internetGatewayState),
    			VcnId:         pulumi.StringRef(testVcn.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 testInternetGateways = Oci.Core.GetInternetGateways.Invoke(new()
        {
            CompartmentId = compartmentId,
            DisplayName = internetGatewayDisplayName,
            State = internetGatewayState,
            VcnId = testVcn.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.GetInternetGatewaysArgs;
    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 testInternetGateways = CoreFunctions.getInternetGateways(GetInternetGatewaysArgs.builder()
                .compartmentId(compartmentId)
                .displayName(internetGatewayDisplayName)
                .state(internetGatewayState)
                .vcnId(testVcn.id())
                .build());
    
        }
    }
    
    variables:
      testInternetGateways:
        fn::invoke:
          Function: oci:Core:getInternetGateways
          Arguments:
            compartmentId: ${compartmentId}
            displayName: ${internetGatewayDisplayName}
            state: ${internetGatewayState}
            vcnId: ${testVcn.id}
    

    Using getInternetGateways

    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 getInternetGateways(args: GetInternetGatewaysArgs, opts?: InvokeOptions): Promise<GetInternetGatewaysResult>
    function getInternetGatewaysOutput(args: GetInternetGatewaysOutputArgs, opts?: InvokeOptions): Output<GetInternetGatewaysResult>
    def get_internet_gateways(compartment_id: Optional[str] = None,
                              display_name: Optional[str] = None,
                              filters: Optional[Sequence[_core.GetInternetGatewaysFilter]] = None,
                              state: Optional[str] = None,
                              vcn_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetInternetGatewaysResult
    def get_internet_gateways_output(compartment_id: Optional[pulumi.Input[str]] = None,
                              display_name: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetInternetGatewaysFilterArgs]]]] = None,
                              state: Optional[pulumi.Input[str]] = None,
                              vcn_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetInternetGatewaysResult]
    func GetInternetGateways(ctx *Context, args *GetInternetGatewaysArgs, opts ...InvokeOption) (*GetInternetGatewaysResult, error)
    func GetInternetGatewaysOutput(ctx *Context, args *GetInternetGatewaysOutputArgs, opts ...InvokeOption) GetInternetGatewaysResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetInternetGatewaysFilter>
    State string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    VcnId string
    The OCID of the VCN.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetInternetGatewaysFilter
    State string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    VcnId string
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetInternetGatewaysFilter>
    state String
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    vcnId String
    The OCID of the VCN.
    compartmentId string
    The OCID of the compartment.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetInternetGatewaysFilter[]
    state string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    vcnId string
    The OCID of the VCN.
    compartment_id str
    The OCID of the compartment.
    display_name str
    A filter to return only resources that match the given display name exactly.
    filters Sequence[core.GetInternetGatewaysFilter]
    state str
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    vcn_id str
    The OCID of the VCN.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>
    state String
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    vcnId String
    The OCID of the VCN.

    getInternetGateways Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment containing the internet gateway.
    Gateways List<GetInternetGatewaysGateway>
    The list of gateways.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    Filters List<GetInternetGatewaysFilter>
    State string
    The internet gateway's current state.
    VcnId string
    The OCID of the VCN the Internet Gateway belongs to.
    CompartmentId string
    The OCID of the compartment containing the internet gateway.
    Gateways []GetInternetGatewaysGateway
    The list of gateways.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    Filters []GetInternetGatewaysFilter
    State string
    The internet gateway's current state.
    VcnId string
    The OCID of the VCN the Internet Gateway belongs to.
    compartmentId String
    The OCID of the compartment containing the internet gateway.
    gateways List<GetInternetGatewaysGateway>
    The list of gateways.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters List<GetInternetGatewaysFilter>
    state String
    The internet gateway's current state.
    vcnId String
    The OCID of the VCN the Internet Gateway belongs to.
    compartmentId string
    The OCID of the compartment containing the internet gateway.
    gateways GetInternetGatewaysGateway[]
    The list of gateways.
    id string
    The provider-assigned unique ID for this managed resource.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters GetInternetGatewaysFilter[]
    state string
    The internet gateway's current state.
    vcnId string
    The OCID of the VCN the Internet Gateway belongs to.
    compartment_id str
    The OCID of the compartment containing the internet gateway.
    gateways Sequence[core.GetInternetGatewaysGateway]
    The list of gateways.
    id str
    The provider-assigned unique ID for this managed resource.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters Sequence[core.GetInternetGatewaysFilter]
    state str
    The internet gateway's current state.
    vcn_id str
    The OCID of the VCN the Internet Gateway belongs to.
    compartmentId String
    The OCID of the compartment containing the internet gateway.
    gateways List<Property Map>
    The list of gateways.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    filters List<Property Map>
    state String
    The internet gateway's current state.
    vcnId String
    The OCID of the VCN the Internet Gateway belongs to.

    Supporting Types

    GetInternetGatewaysFilter

    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

    GetInternetGatewaysGateway

    CompartmentId string
    The OCID of the compartment.
    DefinedTags Dictionary<string, string>
    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 filter to return only resources that match the given display name exactly.
    Enabled bool
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    FreeformTags Dictionary<string, string>
    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 internet gateway's Oracle ID (OCID).
    RouteTableId string
    The OCID of the route table the Internet Gateway is using.
    State string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    TimeCreated string
    The date and time the internet gateway 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]string
    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 filter to return only resources that match the given display name exactly.
    Enabled bool
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    FreeformTags map[string]string
    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 internet gateway's Oracle ID (OCID).
    RouteTableId string
    The OCID of the route table the Internet Gateway is using.
    State string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    TimeCreated string
    The date and time the internet gateway 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,String>
    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 filter to return only resources that match the given display name exactly.
    enabled Boolean
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    freeformTags Map<String,String>
    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 internet gateway's Oracle ID (OCID).
    routeTableId String
    The OCID of the route table the Internet Gateway is using.
    state String
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    timeCreated String
    The date and time the internet gateway 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]: string}
    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 filter to return only resources that match the given display name exactly.
    enabled boolean
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    freeformTags {[key: string]: string}
    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 internet gateway's Oracle ID (OCID).
    routeTableId string
    The OCID of the route table the Internet Gateway is using.
    state string
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    timeCreated string
    The date and time the internet gateway 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, str]
    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 filter to return only resources that match the given display name exactly.
    enabled bool
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    freeform_tags Mapping[str, str]
    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 internet gateway's Oracle ID (OCID).
    route_table_id str
    The OCID of the route table the Internet Gateway is using.
    state str
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    time_created str
    The date and time the internet gateway 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<String>
    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 filter to return only resources that match the given display name exactly.
    enabled Boolean
    Whether the gateway is enabled. When the gateway is disabled, traffic is not routed to/from the Internet, regardless of route rules.
    freeformTags Map<String>
    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 internet gateway's Oracle ID (OCID).
    routeTableId String
    The OCID of the route table the Internet Gateway is using.
    state String
    A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
    timeCreated String
    The date and time the internet gateway 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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi