Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.ApiGateway.getSubscribers
This data source provides the list of Subscribers in Oracle Cloud Infrastructure API Gateway service.
Returns a list of subscribers.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubscribers = oci.ApiGateway.getSubscribers({
    compartmentId: compartmentId,
    displayName: subscriberDisplayName,
    state: subscriberState,
});
import pulumi
import pulumi_oci as oci
test_subscribers = oci.ApiGateway.get_subscribers(compartment_id=compartment_id,
    display_name=subscriber_display_name,
    state=subscriber_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.GetSubscribers(ctx, &apigateway.GetSubscribersArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(subscriberDisplayName),
			State:         pulumi.StringRef(subscriberState),
		}, 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 testSubscribers = Oci.ApiGateway.GetSubscribers.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = subscriberDisplayName,
        State = subscriberState,
    });
});
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.GetSubscribersArgs;
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 testSubscribers = ApiGatewayFunctions.getSubscribers(GetSubscribersArgs.builder()
            .compartmentId(compartmentId)
            .displayName(subscriberDisplayName)
            .state(subscriberState)
            .build());
    }
}
variables:
  testSubscribers:
    fn::invoke:
      function: oci:ApiGateway:getSubscribers
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${subscriberDisplayName}
        state: ${subscriberState}
Using getSubscribers
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 getSubscribers(args: GetSubscribersArgs, opts?: InvokeOptions): Promise<GetSubscribersResult>
function getSubscribersOutput(args: GetSubscribersOutputArgs, opts?: InvokeOptions): Output<GetSubscribersResult>def get_subscribers(compartment_id: Optional[str] = None,
                    display_name: Optional[str] = None,
                    filters: Optional[Sequence[GetSubscribersFilter]] = None,
                    state: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSubscribersResult
def get_subscribers_output(compartment_id: Optional[pulumi.Input[str]] = None,
                    display_name: Optional[pulumi.Input[str]] = None,
                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubscribersFilterArgs]]]] = None,
                    state: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetSubscribersResult]func GetSubscribers(ctx *Context, args *GetSubscribersArgs, opts ...InvokeOption) (*GetSubscribersResult, error)
func GetSubscribersOutput(ctx *Context, args *GetSubscribersOutputArgs, opts ...InvokeOption) GetSubscribersResultOutput> Note: This function is named GetSubscribers in the Go SDK.
public static class GetSubscribers 
{
    public static Task<GetSubscribersResult> InvokeAsync(GetSubscribersArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscribersResult> Invoke(GetSubscribersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscribersResult> getSubscribers(GetSubscribersArgs args, InvokeOptions options)
public static Output<GetSubscribersResult> getSubscribers(GetSubscribersArgs args, InvokeOptions options)
fn::invoke:
  function: oci:ApiGateway/getSubscribers:getSubscribers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The ocid of the compartment in which to list resources.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
List<GetSubscribers Filter> 
- State string
- A filter to return only resources that match the given lifecycle state. Example: ACTIVE
- CompartmentId string
- The ocid of the compartment in which to list resources.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- Filters
[]GetSubscribers Filter 
- State string
- A filter to return only resources that match the given lifecycle state. Example: ACTIVE
- compartmentId String
- The ocid of the compartment in which to list resources.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
List<GetSubscribers Filter> 
- state String
- A filter to return only resources that match the given lifecycle state. Example: ACTIVE
- compartmentId string
- The ocid of the compartment in which to list resources.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
- filters
GetSubscribers 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[GetSubscribers Filter] 
- state str
- A filter to return only resources that match the given lifecycle state. Example: ACTIVE
- compartmentId String
- The ocid of the compartment in which to list resources.
- displayName 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
getSubscribers Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- SubscriberCollections List<GetSubscribers Subscriber Collection> 
- The list of subscriber_collection.
- DisplayName 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<GetSubscribers Filter> 
- State string
- The current state of the subscriber.
- CompartmentId string
- The OCID of the compartment in which the resource is created.
- Id string
- The provider-assigned unique ID for this managed resource.
- SubscriberCollections []GetSubscribers Subscriber Collection 
- The list of subscriber_collection.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Filters
[]GetSubscribers Filter 
- State string
- The current state of the subscriber.
- compartmentId String
- The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- subscriberCollections List<GetSubscribers Subscriber Collection> 
- The list of subscriber_collection.
- displayName 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<GetSubscribers Filter> 
- state String
- The current state of the subscriber.
- compartmentId string
- The OCID of the compartment in which the resource is created.
- id string
- The provider-assigned unique ID for this managed resource.
- subscriberCollections GetSubscribers Subscriber Collection[] 
- The list of subscriber_collection.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- filters
GetSubscribers Filter[] 
- state string
- The current state of the subscriber.
- 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.
- subscriber_collections Sequence[GetSubscribers Subscriber Collection] 
- The list of subscriber_collection.
- 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[GetSubscribers Filter] 
- state str
- The current state of the subscriber.
- compartmentId String
- The OCID of the compartment in which the resource is created.
- id String
- The provider-assigned unique ID for this managed resource.
- subscriberCollections List<Property Map>
- The list of subscriber_collection.
- displayName 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 subscriber.
Supporting Types
GetSubscribersFilter  
GetSubscribersSubscriberCollection   
GetSubscribersSubscriberCollectionItem    
- Clients
List<GetSubscribers Subscriber Collection Item Client> 
- The clients belonging to this subscriber.
- CompartmentId string
- The ocid of the compartment in which to list resources.
- 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 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.
- IsLock boolOverride 
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- Locks
List<GetSubscribers Subscriber Collection Item Lock> 
- Locks associated with this resource.
- 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"}
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- UsagePlans List<string>
- An array of OCIDs of usage plan resources.
- Clients
[]GetSubscribers Subscriber Collection Item Client 
- The clients belonging to this subscriber.
- CompartmentId string
- The ocid of the compartment in which to list resources.
- 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 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.
- IsLock boolOverride 
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- Locks
[]GetSubscribers Subscriber Collection Item Lock 
- Locks associated with this resource.
- 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"}
- TimeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- UsagePlans []string
- An array of OCIDs of usage plan resources.
- clients
List<GetSubscribers Subscriber Collection Item Client> 
- The clients belonging to this subscriber.
- compartmentId String
- The ocid of the compartment in which to list resources.
- 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 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.
- isLock BooleanOverride 
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- locks
List<GetSubscribers Subscriber Collection Item Lock> 
- Locks associated with this resource.
- 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"}
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
- usagePlans List<String>
- An array of OCIDs of usage plan resources.
- clients
GetSubscribers Subscriber Collection Item Client[] 
- The clients belonging to this subscriber.
- compartmentId string
- The ocid of the compartment in which to list resources.
- {[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 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.
- isLock booleanOverride 
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- locks
GetSubscribers Subscriber Collection Item Lock[] 
- Locks associated with this resource.
- 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"}
- timeCreated string
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time this resource was last updated. An RFC3339 formatted datetime string.
- usagePlans string[]
- An array of OCIDs of usage plan resources.
- clients
Sequence[GetSubscribers Subscriber Collection Item Client] 
- The clients belonging to this subscriber.
- compartment_id str
- The ocid of the compartment in which to list resources.
- 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 state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- locks
Sequence[GetSubscribers Subscriber Collection Item Lock] 
- Locks associated with this resource.
- 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.
- usage_plans Sequence[str]
- An array of OCIDs of usage plan resources.
- clients List<Property Map>
- The clients belonging to this subscriber.
- compartmentId String
- The ocid of the compartment in which to list resources.
- 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 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.
- isLock BooleanOverride 
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- locks List<Property Map>
- Locks associated with this resource.
- 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"}
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time this resource was last updated. An RFC3339 formatted datetime string.
- usagePlans List<String>
- An array of OCIDs of usage plan resources.
GetSubscribersSubscriberCollectionItemClient     
GetSubscribersSubscriberCollectionItemLock     
- 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.
- TimeCreated 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.
- TimeCreated 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.
- timeCreated 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.
- timeCreated 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.
- timeCreated String
- The time this resource was created. An RFC3339 formatted datetime string.
- type String
- Type of the lock.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
