StreamAdminClient

class oci.streaming.StreamAdminClient(config, **kwargs)

The API for the Streaming Service.

__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) -- Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) -- (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) -- (optional) The connection and read timeouts for the client. The default is that the client never times out. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) --

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) --

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

change_stream_compartment(stream_id, change_stream_compartment_details, **kwargs)

Moves a resource into a different compartment. Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream to change compatment for.
  • change_stream_compartment_details (ChangeStreamCompartmentDetails) -- (required) The stream will be moved into the compartment specified within this entity.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

create_archiver(stream_id, create_archiver_details, **kwargs)

Create a new stream archiver for the specified stream. Starts the provisioning of a new stream archiver. To track the progress of the provisioning, you can periodically call get_archiver(). In the response, the lifecycleState parameter of the Archiver object tells you its current state.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream.
  • create_archiver_details (CreateArchiverDetails) -- (required) A stream archiver parameters to create.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • opc_retry_token (str) -- (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Archiver

Return type:

Response

create_stream(create_stream_details, **kwargs)

Creates a stream. Starts the provisioning of a new stream. To track the progress of the provisioning, you can periodically call get_stream(). In the response, the lifecycleState parameter of the Stream object tells you its current state.

Parameters:
  • create_stream_details (CreateStreamDetails) -- (required) The stream to create.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Stream

Return type:

Response

delete_stream(stream_id, **kwargs)

Deletes a stream. Deletes a stream and its content. Stream contents are deleted immediately. The service retains records of the stream itself for 90 days after deletion. The lifecycleState parameter of the Stream object changes to DELETING and the stream becomes inaccessible for read or write operations. To verify that a stream has been deleted, make a get_stream() request. If the call returns the stream's lifecycle state as DELETED, then the stream has been deleted. If the call returns a "404 Not Found" error, that means all records of the stream have been deleted.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream to delete.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

get_archiver(stream_id, **kwargs)

Returns the current state of the stream archiver. Returns the current state of the stream archiver.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Archiver

Return type:

Response

get_stream(stream_id, **kwargs)

Gets a stream Gets detailed information about a stream, including the number of partitions.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream to retrieve.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Stream

Return type:

Response

list_streams(compartment_id, **kwargs)

Lists the streams. Lists the streams.

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • id (str) -- (optional) A filter to return only resources that match the given ID exactly.
  • name (str) -- (optional) A filter to return only resources that match the given name exactly.
  • limit (int) -- (optional) The maximum number of items to return. The value must be between 1 and 50. The default is 10.
  • page (str) -- (optional) The page at which to start retrieving results.
  • sort_by (str) --

    (optional) The field to sort by. You can provide no more than one sort order. By default, TIMECREATED sorts results in descending order and NAME sorts results in ascending order.

    Allowed values are: "NAME", "TIMECREATED"

  • sort_order (str) --

    (optional) The sort order to use, either 'asc' or 'desc'.

    Allowed values are: "ASC", "DESC"

  • lifecycle_state (str) --

    (optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

    Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of StreamSummary

Return type:

Response

start_archiver(stream_id, **kwargs)

Start the archiver for the specified stream. Start the archiver for the specified stream.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Archiver

Return type:

Response

stop_archiver(stream_id, **kwargs)

Stop the archiver for the specified stream. Stop the archiver for the specified stream.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Archiver

Return type:

Response

update_archiver(stream_id, update_archiver_details, **kwargs)

Update the stream archiver parameters.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream.
  • update_archiver_details (UpdateArchiverDetails) -- (required) The new parameters of the stream archiver.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Archiver

Return type:

Response

update_stream(stream_id, update_stream_details, **kwargs)

Updates a stream. Updates the tags applied to the stream.

Parameters:
  • stream_id (str) -- (required) The OCID of the stream to update.
  • update_stream_details (UpdateStreamDetails) -- (required) The stream is updated with the tags provided.
  • opc_request_id (str) -- (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • if_match (str) -- (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Stream

Return type:

Response