list-module-streams

Description

Retrieve a list of module streams, along with a summary of their status, from a managed instance. Filters may be applied to select a subset of module streams based on the filter criteria.

The ‘moduleName’ attribute filters against the name of a module. It accepts strings of the format “<module>”. If this attribute is defined, only streams that belong to the specified module are included in the result set. If it is not defined, the request is not subject to this filter.

The “status” attribute filters against the state of a module stream. Valid values are “ENABLED”, “DISABLED”, and “ACTIVE”. If the attribute is set to “ENABLED”, only module streams that are enabled are included in the result set. If the attribute is set to “DISABLED”, only module streams that are not enabled are included in the result set. If the attribute is set to “ACTIVE”, only module streams that are active are included in the result set. If the attribute is not defined, the request is not subject to this filter.

When sorting by the display name, the result set is sorted first by the module name and then by the stream name.

Usage

oci os-management managed-instance list-module-streams [OPTIONS]

Required Parameters

--managed-instance-id [text]

OCID for the managed instance

Optional Parameters

--all

Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.

--compartment-id, -c [text]

The ID of the compartment in which to list resources. This parameter is optional and in some cases may have no effect.

--from-json [text]

Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id –> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

Options can still be provided on the command line. If an option exists in both the JSON document and the command line then the command line specified value will be used.

For examples on usage of this option, please see our “using CLI with advanced JSON options” link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--limit [integer]

The maximum number of items to return.

--max-wait-seconds [integer]

The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.

--module-name [text]

The name of a module. This parameter is required if a streamName is specified.

--page [text]

The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

--page-size [integer]

When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.

--sort-by [text]

The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default.

Accepted values are:

DISPLAYNAME, TIMECREATED
--sort-order [text]

The sort order to use, either ‘asc’ or ‘desc’.

Accepted values are:

ASC, DESC
--stream-name [text]

The name of the stream of the containing module. This parameter is required if a profileName is specified.

--stream-status [text]

The status of the stream

A stream with the “ENABLED” status can be used as a source for installing profiles. Streams with this status are also “ACTIVE”.

A stream with the “DISABLED” status cannot be the source for installing profiles. To install profiles and packages from this stream, it must be enabled.

A stream with the “ACTIVE” status can be used as a source for installing profiles. The packages that comprise the stream are also used when a matching package is installed directly. In general, a stream can have this status if it is the default stream for the module and no stream has been explicitly enabled.

Accepted values are:

ACTIVE, DISABLED, ENABLED
--wait-for-state [text]

This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.

Accepted values are:

ACCEPTED, CANCELED, CANCELLING, FAILED, IN_PROGRESS, SUCCEEDED
--wait-interval-seconds [integer]

Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.

Example using required parameter

Copy the following CLI commands into a file named example.sh. Run the command by typing “bash example.sh” and replacing the example parameters with your own.

Please note this sample will only work in the POSIX-compliant bash-like shell. You need to set up the OCI configuration and appropriate security policies before trying the examples.

    export managed_instance_id=<substitute-value-of-managed_instance_id> # https://docs.cloud.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/cmdref/os-management/managed-instance/list-module-streams.html#cmdoption-managed-instance-id

    oci os-management managed-instance list-module-streams --managed-instance-id $managed_instance_id