Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Core.getNatGateway
Explore with Pulumi AI
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/v2/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:
- Nat
Gateway stringId - The NAT gateway's OCID.
- Nat
Gateway stringId - The NAT gateway's OCID.
- nat
Gateway StringId - The NAT gateway's OCID.
- nat
Gateway stringId - The NAT gateway's OCID.
- nat_
gateway_ strid - The NAT gateway's OCID.
- nat
Gateway StringId - The NAT gateway's OCID.
getNatGateway Result
The following output properties are available:
- Block
Traffic bool - Whether the NAT gateway blocks traffic through it. The default is
false
. Example:true
- Compartment
Id string - The OCID of the compartment that contains the NAT gateway.
- 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"}
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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 OCID of the NAT gateway.
- Nat
Gateway stringId - Nat
Ip string - The IP address associated with the NAT gateway.
- Public
Ip stringId - The OCID of the public IP address associated with the NAT gateway.
- Route
Table stringId - The OCID of the route table used by the NAT gateway.
- State string
- The NAT gateway's current state.
- Time
Created string - The date and time the NAT gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id 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 string - The OCID of the compartment that contains the NAT gateway.
- 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"}
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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 OCID of the NAT gateway.
- Nat
Gateway stringId - Nat
Ip string - The IP address associated with the NAT gateway.
- Public
Ip stringId - The OCID of the public IP address associated with the NAT gateway.
- Route
Table stringId - The OCID of the route table used by the NAT gateway.
- State string
- The NAT gateway's current state.
- Time
Created string - The date and time the NAT gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id string - The OCID of the VCN the NAT gateway belongs to.
- block
Traffic Boolean - Whether the NAT gateway blocks traffic through it. The default is
false
. Example:true
- compartment
Id String - The OCID of the compartment that contains the NAT gateway.
- 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"}
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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 OCID of the NAT gateway.
- nat
Gateway StringId - nat
Ip String - The IP address associated with the NAT gateway.
- public
Ip StringId - The OCID of the public IP address associated with the NAT gateway.
- route
Table StringId - The OCID of the route table used by the NAT gateway.
- state String
- The NAT gateway's current state.
- time
Created String - The date and time the NAT gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id String - The OCID of the VCN the NAT gateway belongs to.
- block
Traffic boolean - Whether the NAT gateway blocks traffic through it. The default is
false
. Example:true
- compartment
Id string - The OCID of the compartment that contains the NAT gateway.
- {[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"}
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[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 OCID of the NAT gateway.
- nat
Gateway stringId - nat
Ip string - The IP address associated with the NAT gateway.
- public
Ip stringId - The OCID of the public IP address associated with the NAT gateway.
- route
Table stringId - The OCID of the route table used by the NAT gateway.
- state string
- The NAT gateway's current state.
- time
Created string - The date and time the NAT gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id 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.
- 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 user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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 OCID of the NAT gateway.
- nat_
gateway_ strid - nat_
ip str - The IP address associated with the NAT gateway.
- public_
ip_ strid - The OCID of the public IP address associated with the NAT gateway.
- route_
table_ strid - 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.
- block
Traffic Boolean - Whether the NAT gateway blocks traffic through it. The default is
false
. Example:true
- compartment
Id String - The OCID of the compartment that contains the NAT gateway.
- 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"}
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- 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 OCID of the NAT gateway.
- nat
Gateway StringId - nat
Ip String - The IP address associated with the NAT gateway.
- public
Ip StringId - The OCID of the public IP address associated with the NAT gateway.
- route
Table StringId - The OCID of the route table used by the NAT gateway.
- state String
- The NAT gateway's current state.
- time
Created String - The date and time the NAT gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id 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.