1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getNatGateway
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Core.getNatGateway

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides details about a specific Nat Gateway resource in Oracle Cloud Infrastructure Core service.

    Gets the specified NAT gateway’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNatGateway = oci.Core.getNatGateway({
        natGatewayId: testNatGatewayOciCoreNatGateway.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_nat_gateway = oci.Core.get_nat_gateway(nat_gateway_id=test_nat_gateway_oci_core_nat_gateway["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.GetNatGateway(ctx, &core.GetNatGatewayArgs{
    			NatGatewayId: testNatGatewayOciCoreNatGateway.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 testNatGateway = Oci.Core.GetNatGateway.Invoke(new()
        {
            NatGatewayId = testNatGatewayOciCoreNatGateway.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.GetNatGatewayArgs;
    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 testNatGateway = CoreFunctions.getNatGateway(GetNatGatewayArgs.builder()
                .natGatewayId(testNatGatewayOciCoreNatGateway.id())
                .build());
    
        }
    }
    
    variables:
      testNatGateway:
        fn::invoke:
          Function: oci:Core:getNatGateway
          Arguments:
            natGatewayId: ${testNatGatewayOciCoreNatGateway.id}
    

    Using getNatGateway

    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 getNatGateway(args: GetNatGatewayArgs, opts?: InvokeOptions): Promise<GetNatGatewayResult>
    function getNatGatewayOutput(args: GetNatGatewayOutputArgs, opts?: InvokeOptions): Output<GetNatGatewayResult>
    def get_nat_gateway(nat_gateway_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNatGatewayResult
    def get_nat_gateway_output(nat_gateway_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNatGatewayResult]
    func GetNatGateway(ctx *Context, args *GetNatGatewayArgs, opts ...InvokeOption) (*GetNatGatewayResult, error)
    func GetNatGatewayOutput(ctx *Context, args *GetNatGatewayOutputArgs, opts ...InvokeOption) GetNatGatewayResultOutput

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

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

    The following arguments are supported:

    NatGatewayId string
    The NAT gateway's OCID.
    NatGatewayId string
    The NAT gateway's OCID.
    natGatewayId String
    The NAT gateway's OCID.
    natGatewayId string
    The NAT gateway's OCID.
    nat_gateway_id str
    The NAT gateway's OCID.
    natGatewayId String
    The NAT gateway's OCID.

    getNatGateway Result

    The following output properties are available:

    BlockTraffic bool
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    CompartmentId string
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    NatGatewayId string
    NatIp string
    The IP address associated with the NAT gateway.
    PublicIpId string
    The OCID of the public IP address associated with the NAT gateway.
    RouteTableId string
    The OCID of the route table used by the NAT gateway.
    State string
    The NAT gateway's current state.
    TimeCreated string
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN the NAT gateway belongs to.
    BlockTraffic bool
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    CompartmentId string
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    NatGatewayId string
    NatIp string
    The IP address associated with the NAT gateway.
    PublicIpId string
    The OCID of the public IP address associated with the NAT gateway.
    RouteTableId string
    The OCID of the route table used by the NAT gateway.
    State string
    The NAT gateway's current state.
    TimeCreated string
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnId string
    The OCID of the VCN the NAT gateway belongs to.
    blockTraffic Boolean
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    compartmentId String
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    natGatewayId String
    natIp String
    The IP address associated with the NAT gateway.
    publicIpId String
    The OCID of the public IP address associated with the NAT gateway.
    routeTableId String
    The OCID of the route table used by the NAT gateway.
    state String
    The NAT gateway's current state.
    timeCreated String
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN the NAT gateway belongs to.
    blockTraffic boolean
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    compartmentId string
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    natGatewayId string
    natIp string
    The IP address associated with the NAT gateway.
    publicIpId string
    The OCID of the public IP address associated with the NAT gateway.
    routeTableId string
    The OCID of the route table used by the NAT gateway.
    state string
    The NAT gateway's current state.
    timeCreated string
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId string
    The OCID of the VCN the NAT gateway belongs to.
    block_traffic bool
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    compartment_id str
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    nat_gateway_id str
    nat_ip str
    The IP address associated with the NAT gateway.
    public_ip_id str
    The OCID of the public IP address associated with the NAT gateway.
    route_table_id str
    The OCID of the route table used by the NAT gateway.
    state str
    The NAT gateway's current state.
    time_created str
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcn_id str
    The OCID of the VCN the NAT gateway belongs to.
    blockTraffic Boolean
    Whether the NAT gateway blocks traffic through it. The default is false. Example: true
    compartmentId String
    The OCID of the compartment that contains the NAT gateway.
    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 OCID of the NAT gateway.
    natGatewayId String
    natIp String
    The IP address associated with the NAT gateway.
    publicIpId String
    The OCID of the public IP address associated with the NAT gateway.
    routeTableId String
    The OCID of the route table used by the NAT gateway.
    state String
    The NAT gateway's current state.
    timeCreated String
    The date and time the NAT gateway was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnId String
    The OCID of the VCN the NAT gateway belongs to.

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi