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/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:
- Compartment
Id string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - Filters
List<Get
Streams 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.
- Stream
Pool stringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required.
- Compartment
Id string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - Filters
[]Get
Streams 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.
- Stream
Pool stringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required.
- compartment
Id String - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - filters
List<Get
Streams 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.
- stream
Pool StringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required.
- compartment
Id string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - filters
Get
Streams 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.
- stream
Pool stringId - 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.
Get Streams 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
compartmentId
parameter. One of them is required.
- compartment
Id 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.
- stream
Pool StringId - 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<Get
Streams Stream> - The list of streams.
- Compartment
Id string - The OCID of the compartment that contains the stream.
- Filters
List<Get
Streams 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.
- Stream
Pool stringId - The OCID of the stream pool that contains the stream.
- Streams
[]Get
Streams Stream - The list of streams.
- Compartment
Id string - The OCID of the compartment that contains the stream.
- Filters
[]Get
Streams 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.
- Stream
Pool stringId - The OCID of the stream pool that contains the stream.
- streams
List<Get
Streams Stream> - The list of streams.
- compartment
Id String - The OCID of the compartment that contains the stream.
- filters
List<Get
Streams 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.
- stream
Pool StringId - The OCID of the stream pool that contains the stream.
- streams
Get
Streams Stream[] - The list of streams.
- compartment
Id string - The OCID of the compartment that contains the stream.
- filters
Get
Streams 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.
- stream
Pool stringId - The OCID of the stream pool that contains the stream.
- streams
Sequence[streaming.
Get Streams Stream] - The list of streams.
- compartment_
id str - The OCID of the compartment that contains the stream.
- filters
Sequence[streaming.
Get Streams 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.
- compartment
Id 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.
- stream
Pool StringId - The OCID of the stream pool that contains the stream.
Supporting Types
GetStreamsFilter
GetStreamsStream
- Compartment
Id string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - Dictionary<string, object>
- 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, object>
- 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.
- Lifecycle
State stringDetails - Any additional details about the current state of the stream.
- Messages
Endpoint 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.
- Retention
In 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.
- Stream
Pool stringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required. - Time
Created 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 string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - map[string]interface{}
- 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]interface{}
- 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.
- Lifecycle
State stringDetails - Any additional details about the current state of the stream.
- Messages
Endpoint 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.
- Retention
In 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.
- Stream
Pool stringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required. - Time
Created 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 String - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - Map<String,Object>
- 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,Object>
- 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.
- lifecycle
State StringDetails - Any additional details about the current state of the stream.
- messages
Endpoint 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.
- retention
In 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.
- stream
Pool StringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required. - time
Created 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 string - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - {[key: string]: any}
- 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]: any}
- 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.
- lifecycle
State stringDetails - Any additional details about the current state of the stream.
- messages
Endpoint 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.
- retention
In 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.
- stream
Pool stringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required. - time
Created 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. - Mapping[str, Any]
- 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, Any]
- 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
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
- compartment
Id String - The OCID of the compartment. Is exclusive with the
streamPoolId
parameter. One of them is required. - Map<Any>
- 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<Any>
- 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.
- lifecycle
State StringDetails - Any additional details about the current state of the stream.
- messages
Endpoint 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.
- retention
In 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.
- stream
Pool StringId - The OCID of the stream pool. Is exclusive with the
compartmentId
parameter. One of them is required. - time
Created 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.