Listing Streams

List streams in the Streaming service.

For stream pools, see Listing Stream Pools.

Using OCI SDKs

Use the listStreams method to return a list of streams for the specified compartment or stream pool.

For detailed SDK examples, see Developer Guide to Streaming.

Using Resource Manager and Terraform

Use the oci_streaming_streams data source to list streams in a compartment.

For example:

data "oci_streaming_streams" "test_streams" {

    #Optional
    compartment_id = var.compartment_id
    id = var.stream_id
    name = var.stream_name
    state = var.stream_state
    stream_pool_id = oci_streaming_stream_pool.test_stream_pool.id
}

Example representation of a stream (a oci_streaming_stream resource):

resource oci_streaming_stream export_example_stream {
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  freeform_tags = {
  }
  name               = "example_stream"
  partitions         = "1"
  retention_in_hours = "24"
  #stream_pool_id = <<Optional value not found in discovery>>
}

Was this article helpful?