1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Streaming
  5. getStreams
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Streaming.getStreams

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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[_streaming.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[_streaming.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Streaming/getStreams:getStreams
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    Filters List<GetStreamsFilter>
    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.
    StreamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.
    CompartmentId string
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    Filters []GetStreamsFilter
    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.
    StreamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.
    compartmentId String
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    filters List<GetStreamsFilter>
    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.
    streamPoolId String
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.
    compartmentId string
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    filters GetStreamsFilter[]
    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.
    streamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.
    compartment_id str
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    filters Sequence[streaming.GetStreamsFilter]
    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_id str
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.
    compartmentId String
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. 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.
    streamPoolId String
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. One of them is required.

    getStreams Result

    The following output properties are available:

    Streams List<GetStreamsStream>
    The list of streams.
    CompartmentId string
    The OCID of the compartment that contains the stream.
    Filters List<GetStreamsFilter>
    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.
    StreamPoolId string
    The OCID of the stream pool that contains the stream.
    Streams []GetStreamsStream
    The list of streams.
    CompartmentId string
    The OCID of the compartment that contains the stream.
    Filters []GetStreamsFilter
    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.
    StreamPoolId string
    The OCID of the stream pool that contains the stream.
    streams List<GetStreamsStream>
    The list of streams.
    compartmentId String
    The OCID of the compartment that contains the stream.
    filters List<GetStreamsFilter>
    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.
    streamPoolId String
    The OCID of the stream pool that contains the stream.
    streams GetStreamsStream[]
    The list of streams.
    compartmentId string
    The OCID of the compartment that contains the stream.
    filters GetStreamsFilter[]
    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.
    streamPoolId string
    The OCID of the stream pool that contains the stream.
    streams Sequence[streaming.GetStreamsStream]
    The list of streams.
    compartment_id str
    The OCID of the compartment that contains the stream.
    filters Sequence[streaming.GetStreamsFilter]
    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_id str
    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.
    streamPoolId String
    The OCID of the stream pool that contains the stream.

    Supporting Types

    GetStreamsFilter

    Name string
    A filter to return only resources that match the given name exactly.
    Values List<string>
    Regex bool
    Name string
    A filter to return only resources that match the given name exactly.
    Values []string
    Regex bool
    name String
    A filter to return only resources that match the given name exactly.
    values List<String>
    regex Boolean
    name string
    A filter to return only resources that match the given name exactly.
    values string[]
    regex boolean
    name str
    A filter to return only resources that match the given name exactly.
    values Sequence[str]
    regex bool
    name String
    A filter to return only resources that match the given name exactly.
    values List<String>
    regex Boolean

    GetStreamsStream

    CompartmentId string
    The OCID of the compartment. Is exclusive with the streamPoolId parameter. One of them is required.
    DefinedTags 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"}}'
    FreeformTags 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.
    LifecycleStateDetails string
    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.
    RetentionInHours int
    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.
    StreamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 streamPoolId parameter. One of them is required.
    DefinedTags 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"}}'
    FreeformTags 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.
    LifecycleStateDetails string
    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.
    RetentionInHours int
    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.
    StreamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 streamPoolId parameter. One of them is required.
    definedTags 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"}}'
    freeformTags 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.
    lifecycleStateDetails String
    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.
    retentionInHours Integer
    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.
    streamPoolId String
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 streamPoolId parameter. One of them is required.
    definedTags {[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"}}'
    freeformTags {[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.
    lifecycleStateDetails string
    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.
    retentionInHours number
    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.
    streamPoolId string
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 streamPoolId parameter. One of them is required.
    defined_tags 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"}}'
    freeform_tags 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_details str
    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_hours int
    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_id str
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 streamPoolId parameter. One of them is required.
    definedTags 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"}}'
    freeformTags 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.
    lifecycleStateDetails String
    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.
    retentionInHours Number
    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.
    streamPoolId String
    The OCID of the stream pool. Is exclusive with the compartmentId parameter. 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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi