Listing Stream Pools
List streams pools in the Streaming service.
A list of existing stream pools is displayed. Use the oci streaming admin stream-pool list command and required parameters to list stream pools:
oci streaming admin stream-pool list --compartment-id <compartment_OCID> [OPTIONS]
By default, the first 10 stream pools are returned.
For example:
oci streaming admin stream-pool list --compartment-id ocid1.tenancy.oc1..exampleuniqueID { "data": [ { "compartment-id": "ocid1.tenancy.oc1..exampleuniqueID", "defined-tags": {}, "freeform-tags": {}, "id": "ocid1.streampool.oc1.phx.exampleuniqueID", "is-private": false, "lifecycle-state": "ACTIVE", "name": "MyStreamPool", "time-created": "2020-10-09T22:21:16.931000+00:00" }, { "compartment-id": "ocid1.tenancy.oc1..exampleuniqueID", "defined-tags": {}, "freeform-tags": {}, "id": "ocid1.streampool.oc1.phx.exampleuniqueID", "is-private": true, "lifecycle-state": "ACTIVE", "name": "example-stream-pool-02", "time-created": "2020-04-03T07:00:56.196000+00:00" }, { "compartment-id": "ocid1.tenancy.oc1..exampleCompartmentOCID", "defined-tags": {}, "freeform-tags": {}, "id": "ocid1.streampool.oc1.phx.exampleStreamPoolOCID", "is-private": false, "lifecycle-state": "ACTIVE", "name": "example-stream-pool-01, "time-created": "2020-04-03T05:28:26.025000+00:00" } ] }
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the ListStreamPools operation to list stream pools.
Using Resource Manager and Terraform
Use the oci_streaming_stream_pool
data source to list stream pools in a compartment.
Example representation of a stream pool (a oci_streaming_stream_pool
resource):
resource oci_streaming_stream_pool export_test_stream_pool {
compartment_id = var.compartment_ocid
name = "test_stream_pool"
#Optional
private_endpoint_settings {
nsg_ids = [oci_core_network_security_group.test_nsg.id]
private_endpoint_ip = "10.0.0.5"
subnet_id = oci_core_subnet.test_subnet.id
}
kafka_settings {
#Optional
auto_create_topics_enable = true
log_retention_hours = 24
num_partitions = 1
}
}
resource "oci_core_vcn" "test_vcn" {
cidr_block = "10.0.0.0/16"
compartment_id = var.compartment_ocid
display_name = "testvcn"
dns_label = "dnslabel"
}
resource "oci_core_subnet" "test_subnet" {
cidr_block = "10.0.0.0/24"
compartment_id = var.compartment_ocid
vcn_id = oci_core_vcn.test_vcn.id
}
resource "oci_core_network_security_group" "test_nsg" {
compartment_id = var.compartment_ocid
vcn_id = oci_core_vcn.test_vcn.id
}
Resource Manager is an Oracle Cloud Infrastructure (OCI) service that allows you to automate the process of provisioning your OCI resources. Using Terraform, Resource Manager helps you install, configure, and manage resources through the "infrastructure-as-code" model.
A Terraform configuration codifies your infrastructure in declarative configuration files. The configuration defines the resources you intend to provision, variables, and specific instructions for provisioning the resources
You can use Resource Manager or the Terraform CLI with the OCI Terraform provider to see how your streams and stream pools are represented in Terraform configuration files.
For more information about writing configurations for use with Resource Manager, see Terraform Configurations for Resource Manager and Terraform Configuration.