oci.Streaming.getStreams
Explore with Pulumi AI
This data source provides the list of Streams in Oracle Cloud Infrastructure Streaming service.
Lists the streams in the given compartment id. If the compartment id is specified, it will list streams in the compartment, regardless of their stream pool. If the stream pool id is specified, the action will be scoped to that stream pool. The compartment id and stream pool id cannot be specified at the same time.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testStreams = oci.Streaming.getStreams({
    compartmentId: compartmentId,
    id: streamId,
    name: streamName,
    state: streamState,
    streamPoolId: testStreamPool.id,
});
import pulumi
import pulumi_oci as oci
test_streams = oci.Streaming.get_streams(compartment_id=compartment_id,
    id=stream_id,
    name=stream_name,
    state=stream_state,
    stream_pool_id=test_stream_pool["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/streaming"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := streaming.GetStreams(ctx, &streaming.GetStreamsArgs{
			CompartmentId: pulumi.StringRef(compartmentId),
			Id:            pulumi.StringRef(streamId),
			Name:          pulumi.StringRef(streamName),
			State:         pulumi.StringRef(streamState),
			StreamPoolId:  pulumi.StringRef(testStreamPool.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 testStreams = Oci.Streaming.GetStreams.Invoke(new()
    {
        CompartmentId = compartmentId,
        Id = streamId,
        Name = streamName,
        State = streamState,
        StreamPoolId = testStreamPool.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Streaming.StreamingFunctions;
import com.pulumi.oci.Streaming.inputs.GetStreamsArgs;
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 testStreams = StreamingFunctions.getStreams(GetStreamsArgs.builder()
            .compartmentId(compartmentId)
            .id(streamId)
            .name(streamName)
            .state(streamState)
            .streamPoolId(testStreamPool.id())
            .build());
    }
}
variables:
  testStreams:
    fn::invoke:
      function: oci:Streaming:getStreams
      arguments:
        compartmentId: ${compartmentId}
        id: ${streamId}
        name: ${streamName}
        state: ${streamState}
        streamPoolId: ${testStreamPool.id}
Using getStreams
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 getStreams(args: GetStreamsArgs, opts?: InvokeOptions): Promise<GetStreamsResult>
function getStreamsOutput(args: GetStreamsOutputArgs, opts?: InvokeOptions): Output<GetStreamsResult>def get_streams(compartment_id: Optional[str] = None,
                filters: Optional[Sequence[GetStreamsFilter]] = None,
                id: Optional[str] = None,
                name: Optional[str] = None,
                state: Optional[str] = None,
                stream_pool_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetStreamsResult
def get_streams_output(compartment_id: Optional[pulumi.Input[str]] = None,
                filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetStreamsFilterArgs]]]] = None,
                id: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                state: Optional[pulumi.Input[str]] = None,
                stream_pool_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetStreamsResult]func GetStreams(ctx *Context, args *GetStreamsArgs, opts ...InvokeOption) (*GetStreamsResult, error)
func GetStreamsOutput(ctx *Context, args *GetStreamsOutputArgs, opts ...InvokeOption) GetStreamsResultOutput> Note: This function is named GetStreams in the Go SDK.
public static class GetStreams 
{
    public static Task<GetStreamsResult> InvokeAsync(GetStreamsArgs args, InvokeOptions? opts = null)
    public static Output<GetStreamsResult> Invoke(GetStreamsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetStreamsResult> getStreams(GetStreamsArgs args, InvokeOptions options)
public static Output<GetStreamsResult> getStreams(GetStreamsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Streaming/getStreams:getStreams
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- Filters
List<GetStreams Filter> 
- Id string
- A filter to return only resources that match the given ID exactly.
- Name string
- A filter to return only resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- StreamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- CompartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- Filters
[]GetStreams Filter 
- Id string
- A filter to return only resources that match the given ID exactly.
- Name string
- A filter to return only resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- StreamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- compartmentId String
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- filters
List<GetStreams Filter> 
- id String
- A filter to return only resources that match the given ID exactly.
- name String
- A filter to return only resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool StringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- compartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- filters
GetStreams Filter[] 
- id string
- A filter to return only resources that match the given ID exactly.
- name string
- A filter to return only resources that match the given name exactly.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- compartment_id str
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- filters
Sequence[GetStreams Filter] 
- id str
- A filter to return only resources that match the given ID exactly.
- name str
- A filter to return only resources that match the given name exactly.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- stream_pool_ strid 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- compartmentId String
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- filters List<Property Map>
- id String
- A filter to return only resources that match the given ID exactly.
- name String
- A filter to return only resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool StringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
getStreams Result
The following output properties are available:
- Streams
List<GetStreams Stream> 
- The list of streams.
- CompartmentId string
- The OCID of the compartment that contains the stream.
- Filters
List<GetStreams Filter> 
- Id string
- The OCID of the stream.
- Name string
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- State string
- The current state of the stream.
- StreamPool stringId 
- The OCID of the stream pool that contains the stream.
- Streams
[]GetStreams Stream 
- The list of streams.
- CompartmentId string
- The OCID of the compartment that contains the stream.
- Filters
[]GetStreams Filter 
- Id string
- The OCID of the stream.
- Name string
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- State string
- The current state of the stream.
- StreamPool stringId 
- The OCID of the stream pool that contains the stream.
- streams
List<GetStreams Stream> 
- The list of streams.
- compartmentId String
- The OCID of the compartment that contains the stream.
- filters
List<GetStreams Filter> 
- id String
- The OCID of the stream.
- name String
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- state String
- The current state of the stream.
- streamPool StringId 
- The OCID of the stream pool that contains the stream.
- streams
GetStreams Stream[] 
- The list of streams.
- compartmentId string
- The OCID of the compartment that contains the stream.
- filters
GetStreams Filter[] 
- id string
- The OCID of the stream.
- name string
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- state string
- The current state of the stream.
- streamPool stringId 
- The OCID of the stream pool that contains the stream.
- streams
Sequence[GetStreams Stream] 
- The list of streams.
- compartment_id str
- The OCID of the compartment that contains the stream.
- filters
Sequence[GetStreams Filter] 
- id str
- The OCID of the stream.
- name str
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- state str
- The current state of the stream.
- stream_pool_ strid 
- The OCID of the stream pool that contains the stream.
- streams List<Property Map>
- The list of streams.
- compartmentId String
- The OCID of the compartment that contains the stream.
- filters List<Property Map>
- id String
- The OCID of the stream.
- name String
- The name of the stream. Avoid entering confidential information. Example: TelemetryEvents
- state String
- The current state of the stream.
- streamPool StringId 
- The OCID of the stream pool that contains the stream.
Supporting Types
GetStreamsFilter  
GetStreamsStream  
- CompartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- 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"}}'
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- A filter to return only resources that match the given ID exactly.
- LifecycleState stringDetails 
- Any additional details about the current state of the stream.
- MessagesEndpoint string
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- Name string
- A filter to return only resources that match the given name exactly.
- Partitions int
- The number of partitions in the stream.
- RetentionIn intHours 
- The retention period of the stream, in hours. This property is read-only.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- StreamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- TimeCreated string
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
- CompartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- 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"}}'
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- A filter to return only resources that match the given ID exactly.
- LifecycleState stringDetails 
- Any additional details about the current state of the stream.
- MessagesEndpoint string
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- Name string
- A filter to return only resources that match the given name exactly.
- Partitions int
- The number of partitions in the stream.
- RetentionIn intHours 
- The retention period of the stream, in hours. This property is read-only.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- StreamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- TimeCreated string
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
- compartmentId String
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- 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"}}'
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- A filter to return only resources that match the given ID exactly.
- lifecycleState StringDetails 
- Any additional details about the current state of the stream.
- messagesEndpoint String
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- name String
- A filter to return only resources that match the given name exactly.
- partitions Integer
- The number of partitions in the stream.
- retentionIn IntegerHours 
- The retention period of the stream, in hours. This property is read-only.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool StringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- timeCreated String
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
- compartmentId string
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- {[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"}}'
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- A filter to return only resources that match the given ID exactly.
- lifecycleState stringDetails 
- Any additional details about the current state of the stream.
- messagesEndpoint string
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- name string
- A filter to return only resources that match the given name exactly.
- partitions number
- The number of partitions in the stream.
- retentionIn numberHours 
- The retention period of the stream, in hours. This property is read-only.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool stringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- timeCreated string
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
- compartment_id str
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- 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"}}'
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- A filter to return only resources that match the given ID exactly.
- lifecycle_state_ strdetails 
- Any additional details about the current state of the stream.
- messages_endpoint str
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- name str
- A filter to return only resources that match the given name exactly.
- partitions int
- The number of partitions in the stream.
- retention_in_ inthours 
- The retention period of the stream, in hours. This property is read-only.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- stream_pool_ strid 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- time_created str
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
- compartmentId String
- The OCID of the compartment. Is exclusive with the streamPoolIdparameter. One of them is required.
- 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"}}'
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair that is applied with no predefined name, type, or namespace. Exists for cross-compatibility only. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- A filter to return only resources that match the given ID exactly.
- lifecycleState StringDetails 
- Any additional details about the current state of the stream.
- messagesEndpoint String
- The endpoint to use when creating the StreamClient to consume or publish messages in the stream. If the associated stream pool is private, the endpoint is also private and can only be accessed from inside the stream pool's associated subnet.
- name String
- A filter to return only resources that match the given name exactly.
- partitions Number
- The number of partitions in the stream.
- retentionIn NumberHours 
- The retention period of the stream, in hours. This property is read-only.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- streamPool StringId 
- The OCID of the stream pool. Is exclusive with the compartmentIdparameter. One of them is required.
- timeCreated String
- The date and time the stream was created, expressed in in RFC 3339 timestamp format. Example: 2018-04-20T00:00:07.405Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.