Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Core.getServiceGateways
Explore with Pulumi AI
This data source provides the list of Service Gateways in Oracle Cloud Infrastructure Core service.
Lists the service gateways in the specified compartment. You may optionally specify a VCN OCID to filter the results by VCN.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testServiceGateways = oci.Core.getServiceGateways({
compartmentId: compartmentId,
state: serviceGatewayState,
vcnId: testVcn.id,
});
import pulumi
import pulumi_oci as oci
test_service_gateways = oci.Core.get_service_gateways(compartment_id=compartment_id,
state=service_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.GetServiceGateways(ctx, &core.GetServiceGatewaysArgs{
CompartmentId: compartmentId,
State: pulumi.StringRef(serviceGatewayState),
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 testServiceGateways = Oci.Core.GetServiceGateways.Invoke(new()
{
CompartmentId = compartmentId,
State = serviceGatewayState,
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.GetServiceGatewaysArgs;
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 testServiceGateways = CoreFunctions.getServiceGateways(GetServiceGatewaysArgs.builder()
.compartmentId(compartmentId)
.state(serviceGatewayState)
.vcnId(testVcn.id())
.build());
}
}
variables:
testServiceGateways:
fn::invoke:
Function: oci:Core:getServiceGateways
Arguments:
compartmentId: ${compartmentId}
state: ${serviceGatewayState}
vcnId: ${testVcn.id}
Using getServiceGateways
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 getServiceGateways(args: GetServiceGatewaysArgs, opts?: InvokeOptions): Promise<GetServiceGatewaysResult>
function getServiceGatewaysOutput(args: GetServiceGatewaysOutputArgs, opts?: InvokeOptions): Output<GetServiceGatewaysResult>
def get_service_gateways(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_core.GetServiceGatewaysFilter]] = None,
state: Optional[str] = None,
vcn_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceGatewaysResult
def get_service_gateways_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetServiceGatewaysFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
vcn_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceGatewaysResult]
func GetServiceGateways(ctx *Context, args *GetServiceGatewaysArgs, opts ...InvokeOption) (*GetServiceGatewaysResult, error)
func GetServiceGatewaysOutput(ctx *Context, args *GetServiceGatewaysOutputArgs, opts ...InvokeOption) GetServiceGatewaysResultOutput
> Note: This function is named GetServiceGateways
in the Go SDK.
public static class GetServiceGateways
{
public static Task<GetServiceGatewaysResult> InvokeAsync(GetServiceGatewaysArgs args, InvokeOptions? opts = null)
public static Output<GetServiceGatewaysResult> Invoke(GetServiceGatewaysInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceGatewaysResult> getServiceGateways(GetServiceGatewaysArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getServiceGateways:getServiceGateways
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Filters
List<Get
Service Gateways Filter> - State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- Compartment
Id string - The OCID of the compartment.
- Filters
[]Get
Service Gateways Filter - State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Vcn
Id string - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- filters
List<Get
Service Gateways Filter> - state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
- compartment
Id string - The OCID of the compartment.
- filters
Get
Service Gateways Filter[] - state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id string - The OCID of the VCN.
- compartment_
id str - The OCID of the compartment.
- filters
Sequence[core.
Get Service Gateways Filter] - state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- vcn_
id str - The OCID of the VCN.
- compartment
Id String - The OCID of the compartment.
- filters List<Property Map>
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- vcn
Id String - The OCID of the VCN.
getServiceGateways Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment that contains the service gateway.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Gateways List<GetService Gateways Service Gateway> - The list of service_gateways.
- Filters
List<Get
Service Gateways Filter> - State string
- The service gateway's current state.
- Vcn
Id string - The OCID of the VCN the service gateway belongs to.
- Compartment
Id string - The OCID of the compartment that contains the service gateway.
- Id string
- The provider-assigned unique ID for this managed resource.
- Service
Gateways []GetService Gateways Service Gateway - The list of service_gateways.
- Filters
[]Get
Service Gateways Filter - State string
- The service gateway's current state.
- Vcn
Id string - The OCID of the VCN the service gateway belongs to.
- compartment
Id String - The OCID of the compartment that contains the service gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Gateways List<GetService Gateways Service Gateway> - The list of service_gateways.
- filters
List<Get
Service Gateways Filter> - state String
- The service gateway's current state.
- vcn
Id String - The OCID of the VCN the service gateway belongs to.
- compartment
Id string - The OCID of the compartment that contains the service gateway.
- id string
- The provider-assigned unique ID for this managed resource.
- service
Gateways GetService Gateways Service Gateway[] - The list of service_gateways.
- filters
Get
Service Gateways Filter[] - state string
- The service gateway's current state.
- vcn
Id string - The OCID of the VCN the service gateway belongs to.
- compartment_
id str - The OCID of the compartment that contains the service gateway.
- id str
- The provider-assigned unique ID for this managed resource.
- service_
gateways Sequence[core.Get Service Gateways Service Gateway] - The list of service_gateways.
- filters
Sequence[core.
Get Service Gateways Filter] - state str
- The service gateway's current state.
- vcn_
id str - The OCID of the VCN the service gateway belongs to.
- compartment
Id String - The OCID of the compartment that contains the service gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- service
Gateways List<Property Map> - The list of service_gateways.
- filters List<Property Map>
- state String
- The service gateway's current state.
- vcn
Id String - The OCID of the VCN the service gateway belongs to.
Supporting Types
GetServiceGatewaysFilter
GetServiceGatewaysServiceGateway
- Block
Traffic bool - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- Compartment
Id string - The OCID of the compartment.
- 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 service gateway.
- Route
Table stringId - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- Services
List<Get
Service Gateways Service Gateway Service> - List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id string - The OCID of the VCN.
- Block
Traffic bool - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- Compartment
Id string - The OCID of the compartment.
- 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 service gateway.
- Route
Table stringId - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- Services
[]Get
Service Gateways Service Gateway Service - List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vcn
Id string - The OCID of the VCN.
- block
Traffic Boolean - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- compartment
Id String - The OCID of the compartment.
- 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 service gateway.
- route
Table StringId - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- services
List<Get
Service Gateways Service Gateway Service> - List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id String - The OCID of the VCN.
- block
Traffic boolean - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- compartment
Id string - The OCID of the compartment.
- {[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 service gateway.
- route
Table stringId - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- services
Get
Service Gateways Service Gateway Service[] - List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created string - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id string - The OCID of the VCN.
- block_
traffic bool - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- compartment_
id str - The OCID of the compartment.
- 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 service gateway.
- route_
table_ strid - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- services
Sequence[core.
Get Service Gateways Service Gateway Service] - List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- time_
created str - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn_
id str - The OCID of the VCN.
- block
Traffic Boolean - Whether the service gateway blocks all traffic through it. The default is
false
. When this istrue
, traffic is not routed to any services, regardless of route rules. Example:true
- compartment
Id String - The OCID of the compartment.
- 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 service gateway.
- route
Table StringId - The OCID of the route table the service gateway is using. For information about why you would associate a route table with a service gateway, see Transit Routing: Private Access to Oracle Services.
- services List<Property Map>
- List of the Service objects enabled for this service gateway. The list can be empty. You can enable a particular
Service
by using AttachServiceId or UpdateServiceGateway. - state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - The date and time the service gateway was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vcn
Id String - The OCID of the VCN.
GetServiceGatewaysServiceGatewayService
- Service
Id string - The OCID of the service.
- Service
Name string - The name of the service.
- Service
Id string - The OCID of the service.
- Service
Name string - The name of the service.
- service
Id String - The OCID of the service.
- service
Name String - The name of the service.
- service
Id string - The OCID of the service.
- service
Name string - The name of the service.
- service_
id str - The OCID of the service.
- service_
name str - The name of the service.
- service
Id String - The OCID of the service.
- service
Name String - The name of the service.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.