Moving a Stream or Stream Pool

Move a stream or a stream pool in the Streaming service to a different compartment, or move a stream to a different stream pool.

To review requirements for creating and managing streams, see Getting Started with Streaming.

  • Move a Stream to a Different Stream Pool

    1. Access the Streaming service in the Console.
    2. On the Streams page, click the name of the stream that you want to move.
    3. On the Stream Information tab of the stream details page, click Move next to the current Stream Pool value.
    4. In the Move Stream dialog box, select the stream pool to which you want to move the stream, and then click Move Stream.

    Move a Stream to a Different Compartment

    1. Access the Streaming service in the Console.
    2. On the Streams page, click the name of the stream that you want to move.
    3. On the stream details page, click Move Resource.
    4. In the Move resource dialog box, select the destination compartment, and then click Move Resource.

    Move a Stream Pool to a Different Compartment

    1. Access the Streaming service in the Console.
    2. Under Analytics, click Stream Pools to display a list of stream pools for the compartment.
    3. Click the name of the stream pool that you want to move.
    4. On the stream details page, click Move Resource.
    5. Choose the destination compartment, and then click Move Resource.
  • For information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see the Command Line Reference.

    Note

    The examples in this section use the full syntax for all parameters, for example --compartment-id. For some parameters, there are shortened versions that you can use instead, like -c. See the CLI online help for instances of a shortened parameter associated with a command.

    To move a stream to a different stream pool

    oci streaming admin stream update --stream-id <stream_OCID> --stream-pool-id <stream_pool_OCID>

    For example:

    oci streaming admin stream update --stream-id ocid1.stream.oc1.phx.exampleuniqueID --stream-pool-id ocid1.streampool.oc1.phx.exampleuniqueID
    {
      "data": {
        "compartment-id": "ocid1.tenancy.oc1..exampleuniqueID",
        "defined-tags": {},
        "freeform-tags": {},
        "id": "ocid1.stream.oc1.phx.exampleuniqueID",
        "lifecycle-state": "UPDATING",
        "lifecycle-state-details": null,
        "messages-endpoint": "https://cell-1.streaming.us-phoenix-1.oci.oraclecloud.com",
        "name": "MyStream",
        "partitions": 1,
        "retention-in-hours": 24,
        "stream-pool-id": "ocid1.streampool.oc1.phx.exampleuniqueID",
        "time-created": "2020-11-02T19:12:22.385000+00:00"
      },
      "etag": "\"25b49cb2-f0c0-4421-b39f-899846b9d7c9-0c3a8572-1719-44ba-840d-19843352c9ba\""
    }

    To move a stream to a different compartment

    oci streaming admin stream change-compartment --stream-id <stream_OCID> --compartment-id <compartment_OCID>

    For example:

    oci streaming admin stream change-compartment --stream-id ocid1.stream.oc1.phx.exampleuniqueID --compartment-id ocid1.tenancy.oc1..exampleuniqueID
    {
      "data": {
        "compartment-id": "ocid1.tenancy.oc1..exampleuniqueID",
        "defined-tags": {},
        "freeform-tags": {},
        "id": "ocid1.stream.oc1.phx.exampleuniqueID",
        "lifecycle-state": "UPDATING",
        "lifecycle-state-details": null,
        "messages-endpoint": "https://cell-1.streaming.us-phoenix-1.oci.oraclecloud.com",
        "name": "MyStream",
        "partitions": 5,
        "retention-in-hours": 24,
        "stream-pool-id": "ocid1.streampool.oc1.phx.exampleuniqueID",
        "time-created": "2020-11-02T19:12:22.385000+00:00"
      },
      "etag": "\"25b49cb2-f0c0-4421-b39f-899846b9d7c9-0c3a8572-1719-44ba-840d-19843352c9ba\""
    }

    To move a stream pool to a different compartment

    oci streaming admin stream-pool change-compartment --stream-pool-id <stream_pool_OCID> --compartment-id <target_compartment_OCID>

    For example:

    oci streaming admin stream-pool change-compartment --stream-pool-id ocid1.streampool.oc1.phx.exampleuniqueID --compartment-id ocid1.compartment.oc1..exampleuniqueID
    {
      "etag": "\"b9abe5ea-d473-4451-8cf4-9b058fa9b435-a670293b-d0d9-4fff-9c54-4a862418e353\""
    }
  • Use the following API operations to manage streams and stream pools:

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.