Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.ApiGateway.getApis
This data source provides the list of Apis in Oracle Cloud Infrastructure API Gateway service.
Returns a list of APIs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testApis = oci.ApiGateway.getApis({
compartmentId: compartmentId,
displayName: apiDisplayName,
state: apiState,
});
import pulumi
import pulumi_oci as oci
test_apis = oci.ApiGateway.get_apis(compartment_id=compartment_id,
display_name=api_display_name,
state=api_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apigateway.GetApis(ctx, &apigateway.GetApisArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(apiDisplayName),
State: pulumi.StringRef(apiState),
}, 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 testApis = Oci.ApiGateway.GetApis.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = apiDisplayName,
State = apiState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ApiGateway.ApiGatewayFunctions;
import com.pulumi.oci.ApiGateway.inputs.GetApisArgs;
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 testApis = ApiGatewayFunctions.getApis(GetApisArgs.builder()
.compartmentId(compartmentId)
.displayName(apiDisplayName)
.state(apiState)
.build());
}
}
variables:
testApis:
fn::invoke:
function: oci:ApiGateway:getApis
arguments:
compartmentId: ${compartmentId}
displayName: ${apiDisplayName}
state: ${apiState}
Using getApis
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 getApis(args: GetApisArgs, opts?: InvokeOptions): Promise<GetApisResult>
function getApisOutput(args: GetApisOutputArgs, opts?: InvokeOptions): Output<GetApisResult>
def get_apis(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetApisFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApisResult
def get_apis_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetApisFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApisResult]
func GetApis(ctx *Context, args *GetApisArgs, opts ...InvokeOption) (*GetApisResult, error)
func GetApisOutput(ctx *Context, args *GetApisOutputArgs, opts ...InvokeOption) GetApisResultOutput
> Note: This function is named GetApis
in the Go SDK.
public static class GetApis
{
public static Task<GetApisResult> InvokeAsync(GetApisArgs args, InvokeOptions? opts = null)
public static Output<GetApisResult> Invoke(GetApisInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApisResult> getApis(GetApisArgs args, InvokeOptions options)
public static Output<GetApisResult> getApis(GetApisArgs args, InvokeOptions options)
fn::invoke:
function: oci:ApiGateway/getApis:getApis
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Filters
List<Get
Apis Filter> - State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- Filters
[]Get
Apis Filter - State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id String - The ocid of the compartment in which to list resources.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
List<Get
Apis Filter> - state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id string - The ocid of the compartment in which to list resources.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
Get
Apis Filter[] - state string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment_
id str - The ocid of the compartment in which to list resources.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters
Sequence[Get
Apis Filter] - state str
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- compartment
Id String - The ocid of the compartment in which to list resources.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Example:
My new resource
- filters List<Property Map>
- state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
getApis Result
The following output properties are available:
- Api
Collections List<GetApis Api Collection> - The list of api_collection.
- Compartment
Id string - The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- Filters
List<Get
Apis Filter> - State string
- The current state of the API.
- Api
Collections []GetApis Api Collection - The list of api_collection.
- Compartment
Id string - The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- Filters
[]Get
Apis Filter - State string
- The current state of the API.
- api
Collections List<GetApis Api Collection> - The list of api_collection.
- compartment
Id String - The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters
List<Get
Apis Filter> - state String
- The current state of the API.
- api
Collections GetApis Api Collection[] - The list of api_collection.
- compartment
Id string - The OCID of the compartment in which the resource is created.
- id string
- The provider-assigned unique ID for this managed resource.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters
Get
Apis Filter[] - state string
- The current state of the API.
- api_
collections Sequence[GetApis Api Collection] - The list of api_collection.
- compartment_
id str - The OCID of the compartment in which the resource is created.
- 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. Example:
My new resource
- filters
Sequence[Get
Apis Filter] - state str
- The current state of the API.
- api
Collections List<Property Map> - The list of api_collection.
- compartment
Id String - The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example:
My new resource
- filters List<Property Map>
- state String
- The current state of the API.
Supporting Types
GetApisApiCollection
GetApisApiCollectionItem
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Content string
- 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. Example:
My new resource
- 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 resource.
- Is
Lock boolOverride - Lifecycle
Details string - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- Locks
List<Get
Apis Api Collection Item Lock> - Locks associated with this resource.
- Specification
Type string - Type of API Specification file.
- State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- Validation
Results List<GetApis Api Collection Item Validation Result> - Status of each feature available from the API.
- Compartment
Id string - The ocid of the compartment in which to list resources.
- Content string
- 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. Example:
My new resource
- 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 resource.
- Is
Lock boolOverride - Lifecycle
Details string - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- Locks
[]Get
Apis Api Collection Item Lock - Locks associated with this resource.
- Specification
Type string - Type of API Specification file.
- State string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- Validation
Results []GetApis Api Collection Item Validation Result - Status of each feature available from the API.
- compartment
Id String - The ocid of the compartment in which to list resources.
- content String
- 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. Example:
My new resource
- 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 resource.
- is
Lock BooleanOverride - lifecycle
Details String - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- locks
List<Get
Apis Api Collection Item Lock> - Locks associated with this resource.
- specification
Type String - Type of API Specification file.
- state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated String - The time this resource was last updated. An RFC3339 formatted datetime string.
- validation
Results List<GetApis Api Collection Item Validation Result> - Status of each feature available from the API.
- compartment
Id string - The ocid of the compartment in which to list resources.
- content string
- {[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. Example:
My new resource
- {[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 resource.
- is
Lock booleanOverride - lifecycle
Details string - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- locks
Get
Apis Api Collection Item Lock[] - Locks associated with this resource.
- specification
Type string - Type of API Specification file.
- state string
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated string - The time this resource was last updated. An RFC3339 formatted datetime string.
- validation
Results GetApis Api Collection Item Validation Result[] - Status of each feature available from the API.
- compartment_
id str - The ocid of the compartment in which to list resources.
- content str
- 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. Example:
My new resource
- 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 resource.
- is_
lock_ booloverride - lifecycle_
details str - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- locks
Sequence[Get
Apis Api Collection Item Lock] - Locks associated with this resource.
- specification_
type str - Type of API Specification file.
- state str
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time this resource was created. An RFC3339 formatted datetime string.
- time_
updated str - The time this resource was last updated. An RFC3339 formatted datetime string.
- validation_
results Sequence[GetApis Api Collection Item Validation Result] - Status of each feature available from the API.
- compartment
Id String - The ocid of the compartment in which to list resources.
- content String
- 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. Example:
My new resource
- 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 resource.
- is
Lock BooleanOverride - lifecycle
Details String - A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:
- 'New' for just updated API Specifications
- 'Validating' for a document which is being validated.
- 'Valid' the document has been validated without any errors or warnings
- 'Warning' the document has been validated and contains warnings
- 'Error' the document has been validated and contains errors
- 'Failed' the document validation failed
- 'Canceled' the document validation was canceled
- locks List<Property Map>
- Locks associated with this resource.
- specification
Type String - Type of API Specification file.
- state String
- A filter to return only resources that match the given lifecycle state. Example:
ACTIVE
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- time
Updated String - The time this resource was last updated. An RFC3339 formatted datetime string.
- validation
Results List<Property Map> - Status of each feature available from the API.
GetApisApiCollectionItemLock
- Message string
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- string
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Type string
- Type of the lock.
- Message string
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- string
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- Time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- Type string
- Type of the lock.
- message String
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- String
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- type String
- Type of the lock.
- message string
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- string
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- time
Created string - The time this resource was created. An RFC3339 formatted datetime string.
- type string
- Type of the lock.
- message str
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- str
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- time_
created str - The time this resource was created. An RFC3339 formatted datetime string.
- type str
- Type of the lock.
- message String
- A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- String
- The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
- time
Created String - The time this resource was created. An RFC3339 formatted datetime string.
- type String
- Type of the lock.
GetApisApiCollectionItemValidationResult
GetApisFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.