Models

Section Contents

Models#

Access Groups#

Module containing AccessGroup Model.

pydantic model ibm_watsonx_data_integration.cpd_models.access_groups_model.AccessGroup#

Bases: BaseModel

Model representing an Access Group, including Rules.

The __init__ of the AccessGroup class.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • access_group_json (dict) – The JSON for the AccessGroup.

field created_at: str [Required]#
field created_by_id: str [Required]#
field description: str [Required]#
field id: str [Required]#
field last_modified_at: str [Required]#
field last_modified_by_id: str [Required]#
field name: str [Required]#
add_members_to_access_group(members: UserProfile | ServiceID | TrustedProfile | list[UserProfile | ServiceID | TrustedProfile])#

Adds members to an AccessGroup.

Parameters:

members (UserProfile | ServiceID | TrustedProfile | list[UserProfile | ServiceID | TrustedProfile]) – The members to be added to the access group.

Return type:

Response

Returns:

A HTTP response.

check_membership(member: UserProfile | ServiceID | TrustedProfile)#

Checks the membership of a member in an access group.

Parameters:

member (UserProfile | ServiceID | TrustedProfile) – The member object to check membership of.

Return type:

Response

Returns:

A HTTP response.

get_access_group_members()#

Gets all members of an AccessGroup.

Return type:

list

Returns:

A list of current members of an Access Group

get_service_ids(service_id_set: set)#

Gets all service IDs with membership to the current access group.

Parameters:

service_id_set (set) – The set of all service IDs in the current account

Returns:

List of all service IDs with membership to current access group.

Return type:

list_of_service_ids

get_trusted_profiles(trusted_profile_set: set)#

Gets all trusted profiles with membership to the current access group.

Parameters:

trusted_profile_set (set) – The set of all trusted profiles in the current account

Returns:

List of all trusted profiles with membership to current access group.

Return type:

list_of_trusted_profles

get_users(user_id_set: set)#

Gets all users with membership to the current access group.

Parameters:

user_id_set (set) – The set of all users in the current account

Returns:

List of all users with membership to current access group.

Return type:

list_of_users

remove_members_from_access_group(members: UserProfile | ServiceID | TrustedProfile | list[UserProfile | ServiceID | TrustedProfile])#

Removes members from access group.

Parameters:

members (UserProfile | ServiceID | TrustedProfile | list[UserProfile | ServiceID | TrustedProfile]) – List of members to remove from access group.

Return type:

Response

Returns:

A HTTP response.

class ibm_watsonx_data_integration.cpd_models.access_groups_model.AccessGroups(platform: Platform | None = None)#

Bases: CollectionModel

Collection of AccessGroup instances.

The __init__ of the AccessGroups class.

Parameters:

platform (Optional[Platform], default: None) – The Platform object.

Account#

Module containing Account Model.

pydantic model ibm_watsonx_data_integration.cpd_models.account_model.Account#

Bases: BaseModel

Model representing an account, including metadata and flattened entity details.

The __init__ of the Account.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • account_json (dict) – The JSON for the Account.

field account_id: str [Required] (alias 'customer_id')#
field account_type: str [Required] (alias 'type')#
field billing_country_code: str [Required]#
field bluemix_subscriptions: list[BluemixSubscription] [Required]#
field configuration_id: str | None = None#
field country_code: str [Required]#
field currency_code: str [Required]#
field current_billing_system: str [Required]#
field iam_id: str [Required] (alias 'owner_iam_id')#
field isIBMer: bool [Required]#
field linkages: list[dict] [Required]#
field metadata: AccountMetadata [Required]#
field name: str [Required]#
field onboarded: int [Required]#
field organizations_region: list[Any] [Optional]#
field origin: str [Required]#
field owner: str | None = ''#
field owner_unique_id: str [Required]#
field owner_userid: str [Required]#
field state: str [Required]#
field subscription_id: str [Required]#
field tags: list[Any] [Optional]#
field team_directory_enabled: bool [Required]#
field terms_and_conditions: dict [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.account_model.AccountMetadata#

Bases: BaseModel

Model representing metadata for an account.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field created_at: str [Required]#
field created_by: str | None = None#
field guid: str [Required]#
field update_comments: str [Required]#
field updated_at: str [Required]#
field updated_by: str [Required]#
field url: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.cpd_models.account_model.Accounts(platform: Platform)#

Bases: CollectionModel

Collection of Account instances.

The __init__ of the Accounts class.

Parameters:

platform (Platform) – The Platform object.

pydantic model ibm_watsonx_data_integration.cpd_models.account_model.BluemixSubscription#

Bases: BaseModel

Model representing a Bluemix subscription with payment details.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field billing_system: str [Required]#
field category: str [Required]#
field current_state_timestamp: str [Required]#
field history: list[Any] | None = None#
field part_number: str [Required]#
field payment_method: dict [Required]#
field state: str [Required]#
field subscriptionTags: list[Any] [Required]#
field subscription_id: str [Required]#
field type: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

property payment_ended: str | None#

Access the ended in payment_method.

Returns:

A ended payment type.

property payment_started: str | None#

Access the started in payment_method.

Returns:

A started payment type.

property payment_type: str | None#

Access the type in payment_method.

Returns:

A payment type.

Account Owner#

Module containing AccountOwner Model.

pydantic model ibm_watsonx_data_integration.cpd_models.account_owner_model.AccountOwner#

Bases: BaseModel

Model representing the owner of an account.

user_name#

The username of the account owner (often the email).

email#

The email address of the account owner.

given_name#

The given name of the account owner.

family_name#

The family name of the account owner.

The __init__ of the Account Owner.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • account_owner_json (dict) – The JSON for the Account Owner.

field email: str [Required]#
field family_name: str [Required] (alias 'familyName')#
field given_name: str [Required] (alias 'givenName')#
field user_name: str [Required] (alias 'userName')#

Authentication#

Authentication module.

class ibm_watsonx_data_integration.common.auth.BaseAuthenticator#

Bases: ABC

Base Authenticator classes to be inherited by other authenticators.

abstract get_authorization_header()#

Returns the token formatted to be plugged into the Authorization header of a request.

Return type:

str

Returns:

A str ready to be used as an Authorization header.

class ibm_watsonx_data_integration.common.auth.IAMAuthenticator(api_key: str, base_auth_url: str = 'https://cloud.ibm.com')#

Bases: BaseAuthenticator

Authenticator class to authenticate using an IBM Cloud IBM API Key.

api_key#

API key being used to authenticate.

token_url#

URL being used to authenticate against.

iam_token#

The token generated using the api_key and url.

token_expiry_time#

UNIX time in seconds for when the token will expire.

Initializes IAM Authenticator.

Parameters:
  • api_key (str) – The API key to be used for authentication.

  • base_auth_url (str, default: 'https://cloud.ibm.com') – The base URL of the IBM cloud instance to be used for authentication.

Raises:
  • InvalidApiKeyError – If api_key is not of type str, or is an empty str.

  • InvalidUrlError – If base_auth_url is not of type str, or is an empty str.

  • requests.exceptions.HTTPError – If there is an error getting a valid token.

get_authorization_header()#

Returns the token formatted to be plugged into the Authorization header of a request.

Return type:

str

Returns:

A str ready to be used as an Authorization header.

get_token()#

Get existing token, or request a new one if the current token is expired.

Return type:

str

Returns:

A str containing the current token.

request_token()#

Request a token from the servers using the API key.

Raises:
  • InvalidApiKeyError – If api_key is invalid.

  • InvalidUrlError – If token_url is invalid.

  • requests.exceptions.HTTPError – If there is an error getting a valid token.

Return type:

None

Configuration#

Module containing configuration class, useful for legacy+platform streamsets objects.

class ibm_watsonx_data_integration.services.streamsets.models.configuration.Configuration(configuration: dict | list[dict] | None = None, compatibility_map: dict | None = None, property_key: str = 'name', property_value: str = 'value', id_to_remap: dict | None = None)#

Bases: object

Abstraction for configurations.

This class enables easy access to and modification of data stored as a list of dictionaries. A Configuration is stored in the form:

[{"name" : "<name_1>","value" : "<value_1>"}, {"name" : "<name_2>", value" : "<value_2>"},...]

However, the passed in configuration parameter can be a list of Configurations such as:

[[{"name" : "<name_1>","value" : "<value_1>"}, {"name" : "<name_2>", value" : "<value_2>"},...],
[{"name" : "<name_3>","value" : "<value_3>"}, {"name" : "<name_4>", value" : "<value_4>"},...],...]

The __init__ for the configuration class.

Parameters:
  • configuration (dict | list[dict] | None, default: None) – The configuration to represent with this class.

  • compatibility_map (dict | None, default: None) – Any backwards compatibility map for older version of things

  • property_key (str, default: 'name') – The key on which a configuration’s key exists

  • property_value (str, default: 'value') – The key on which a configuration’s value exists

  • id_to_remap (dict | None, default: None) – If we want to change certain names of configurations

get(key: str, default: any = None)#

Return the value of key or, if not in the configuration, the default value.

Return type:

any

items()#

Gets the configuration’s items.

Return type:

Iterable[tuple]

update(configs: dict)#

Update instance with a collection of configurations.

Parameters:

configs (dict) – Dictionary of configurations to use.

Return type:

None

Connections#

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.Connection#

Bases: BaseModel

The __init__ of the Connection class.

Parameters:
  • connection_json (dict) – The JSON for the Connection.

  • platform (Platform, default: None) – The Platform object.

  • project (Project, default: None) – The Project object.

field asset_category: str | None = None#

The asset category

field data_source_definition_asset_id: str | None = None#

The id of the data source definition asset related to connection. For example “cfdcb449-1204-44ba-baa6-9a8a878e6aa7”.

field data_source_definition_asset_name: str | None = None#

The name of the data source definition asset related to connection. For example “Data privacy profile for DB2”.

field datasource_type: str [Required]#

The id or the name of the data source type to connect to. For example “cfdcb449-1204-44ba-baa6-9a8a878e6aa7” or “db2”.

field description: str | None = None#

The description of the connection.

field gateway_id: str | None = None#

The id of the secure gateway to use with the connection. A Secure Gateway is needed when connecting to an on-premises data source. This is the id of the Secure Gateway created with the SecureGateway Service. Your Secure Gateway Client running on-premises must be connected to the gateway with this Id. For example, “E9oXGRIhv1e_prod_ng”.

field interaction_properties: ConnectionInteractionProperties | None = None#
field metadata: ConnectionMetadata | None = None#
field name: str [Required]#

The name of the connection.

field owner_id: str | None = None#

Owner or creator of connection. Provided when a service ID token is used to create connection.

field properties: dict | None = None#
field ref_asset_id: str | None = None#

The ID of the connection in reference catalog that this connection refers to for properties values.

field ref_catalog_id: str | None = None#

The ID of the catalog that this connection refers to for properties values.

field resource_key: str | None = None#

Resource key that should be set in connection asset metadata record instead of using a calculated one by the service.

field source_system: dict[str, dict[str, Any]] | None = None#
field source_system_history: list[dict[str, dict[str, Any]]] | None = None#
field tags: list[str] | None = None#
model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

property actions: list[DatasourceTypeAction]#

Get all supported actions for the connection.

Returns:

Retrieved list of Actions.

property connection_id: str#

Returns id of connection.

property origin: dict#

Returns origin model dump.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.ConnectionFile#

Bases: BaseModel

The __init__ of the Datasource class.

Parameters:
  • file_json (dict) – The JSON for the ConnectionFile.

  • platform (Platform, default: None) – The Platform object.

field created_at: str | None = None (alias 'createdAt')#

Date of creation of the file.

field digest: str | None = None#

Digest of the file.

field file_name: str | None = None (alias 'fileName')#

Name of the file to be used by connections.

field hash: str | None = None#

Hash of the file.

field url: str | None = None#

Signed URL of the file.

download(output: Path)#

Download a file.

Parameters:

output (Path) – destination file path.

Return type:

Response

Returns:

A HTTP response.

class ibm_watsonx_data_integration.cpd_models.connections_model.ConnectionFiles(platform: Platform)#

Bases: CollectionModel

Collection of ConnectionFile instances.

The __init__ of the ConnectionFile class.

Parameters:

platform (Platform) – The Platform object.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.ConnectionInteractionProperties#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field source: list[DatasourceTypeProperty] | None = None#

The properties that can be set for a source interaction.

field target: list[DatasourceTypeProperty] | None = None#

The properties that can be set for a target interaction.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.ConnectionMetadata#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field asset_category: str | None = None#

The asset category (“USER” or “SYSTEM”)

field asset_id: str | None = None#

The ID of the asset

field asset_type: str | None = None#

The type of the asset

field catalog_id: str | None = None#

The ID of the catalog which contains the asset. catalog_id, project_id or spaceid is required.

field create_time: str | None = None#

The timestamp when the asset was created (in format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)

field creator_id: str | None = None#

The IAM ID of the user that created the asset

field href: str | None = None#

URL that can be used to get the asset.

field owner_id: str | None = None#

The IAM ID of the user that owns the asset

field project_id: str | None = None#

The ID of the project which contains the asset. catalog_id, project_id or spaceid is required.

field resource_key: str | None = None#

Optional external unique key for assets that supports it

field space_id: str | None = None#

The ID of the space which contains the asset. catalog_id, project_id or spaceid is required.

field tags: list[str] | None = None#
class ibm_watsonx_data_integration.cpd_models.connections_model.Connections(platform: Platform, project: Project)#

Bases: CollectionModel

Collection of Connection instances.

The __init__ of the Connection class.

Parameters:
  • platform (Platform) – The Platform object.

  • project (Project) – Instance of Project in which connection was created.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.ConnectionsServiceInfo#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field configuration: dict[str, Any] | None = None#
field failure_message: str | None = None#

A message indicating the cause if the service is not running correctly

field service_name: str | None = None#

The name of the service

field status: str | None = None#

An overall status indicating whether the service is running correctly

field timestamp: str | None = None#

The timestamp when the information was retrieved (in format YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, matching the date-time format as specified by RFC 3339)

field version: str | None = None#

The service version string

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceType#

Bases: BaseModel

The __init__ of the Datasource class.

Parameters:
  • datasource_json (dict) – The JSON for the Datasource.

  • platform (Platform, default: None) – The Platform object.

field actions: list[DatasourceTypeAction] | None = None#

The actions supported for the data source.

field allowed_as_source: bool | None = None#

Whether the data source can be accessed as a source of data. That is, data can be read from the data source.

field allowed_as_target: bool | None = None#

Whether the data source can be accessed as a target. That is, data can be written to the data source.

field child_source_systems: list[dict[str, dict[str, Any]]] | None = None#
field description: str | None = None#

A localized, displayable description of the data source.

field label: str | None = None#

A localized, displayable label such as, “IBM dashDB”.

field metadata: ConnectionMetadata | None = None#
field name: str | None = None#

A unique name, such as “dashdb”.

field origin_country: str | None = None#

Country which data originated from. - ISO 3166 Country Codes.

field owner_id: str | None = None#

Owner or creator of connection. Provided when a service ID token is used to create connection.

field properties: DatasourceTypeProperties [Optional]#
field status: str | None = None#

The status of the data source.

field tags: list[str] | None = None#

Tags associated with a data source type.

model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

property datasource_id: str#

Returns id of datasource.

property required_connection_properties: list[DatasourceTypeProperty]#

Get all required connection properties.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceTypeAction#

Bases: BaseModel

The __init__ of the DatasourceTypeAction class.

Parameters:
  • action_json (dict) – The JSON for the DatasourceTypeAction.

  • platform (Platform, default: None) – The Platform object.

  • project (Project, default: None) – The Project object.

  • connection (Connection, default: None) – The Connection object.

field description: str | None = None#

A description of the action.

field name: str | None = None#

The action name.

field properties: DatasourceTypeActionProperties | None = None#
execute(configuration: dict[str, Any] | None = None, connection: Connection | None = None)#

Execute DatasourceTypeAction.

Parameters:
  • configuration (dict[str, Any] | None, default: None) – action config parameters.

  • connection (Connection | None, default: None) – connection to be used.

Return type:

Response

Returns:

A HTTP response.

Raises:

ValueError – If no connection is provided.

model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceTypeActionProperties#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field input: list[DatasourceTypeProperty] | None = None#

The input properties.

field output: list[DatasourceTypeProperty] | None = None#

The properties of the action result.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceTypeProperties#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field connection: list[DatasourceTypeProperty] [Optional]#

The connection properties.

field filter: list[DatasourceTypeProperty] | None = None#

The filter properties that can be set for a discovery interaction.

field source: list[DatasourceTypeProperty] | None = None#

The properties that can be set for a source interaction.

field target: list[DatasourceTypeProperty] | None = None#

The properties that can be set for a target interaction.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceTypeProperty#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field default_value: str | None = None#

The default value for the property if the value is not otherwise specified.

field description: str | None = None#

The description for the property.

field group: str | None = None#

A classification group for the property.

field hidden: bool | None = None#

Whether the property should be displayed in a user interface.

field label: str | None = None#

The label for the property.

field masked: bool | None = None#

Whether the property should be masked. For example, when the property is a password.

field name: str | None = None#

The property name.

field required: bool | None = None#

Whether the property is required.

field type: str | None = None#

The type of the property.

field values: list[dict] | None = None#

If the property type is enum, the list of enumerated values that the property can take.

class ibm_watsonx_data_integration.cpd_models.connections_model.DatasourceTypes(platform: Platform)#

Bases: CollectionModel

Collection of DatasourceType instances.

The __init__ of the DatasourceType class.

Parameters:

platform (Platform) – The Platform object.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DirectoryAsset#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field path: str | None = None#

Folder ID that the connection asset lives in.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.DiscoveredAsset#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field description: str | None = None#

A description of the asset.

field details: dict[str, dict[str, Any]] | None = None#
field has_children: bool | None = None#

True if it is known that the asset has children. False if it is known that the asset does not have children. If it is not known, or it is too expensive to determine this, then this property will not be returned.

field id: str | None = None#

An ID for the asset.

field name: str | None = None#

A name for the asset.

field path: str | None = None#

The path for the object which can be used to discover child assets.

field tags: list[str] | None = None#

Tags associated with the asset.

field type: str | None = None#

The type of the asset, such as SCHEMA, TABLE, FILE, or FOLDER.

pydantic model ibm_watsonx_data_integration.cpd_models.connections_model.FunctionalID#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field description: str | None = None#

Description of this functional.

field entitlements: list[str] | None = None#

The list of names of relevant entitlements.

field functional_id: str | None = None#

the ID of function.

field label: str | None = None#

the label of this functional.

field tools: list[str] | None = None#

Allowed tools that consume this functional ID.

Engine#

Module containing Engine Models.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.engine_model.Engine#

Bases: BaseModel

The Model for Engine.

The __init__ of the Engine class.

Parameters:
  • platform (Platform, default: None) – The Platform object.

  • project (Project, default: None) – The Project object.

  • engine_json (dict) – The JSON for the Engine.

field engine_type: str [Required]#
field last_startup_time: int = None#
field metadata: EngineMetadata [Required]#
field registration_status: str | None [Required]#
field registration_time: int [Required]#
field reported_build_sha: str = None#
field reported_build_time: int = None#
field reported_engine_version: str = None#
field reported_java_vendor: str | None = None#
field reported_java_version: str = None#
field reported_os_arch: str = None#
field reported_os_name: str = None#
field reported_os_version: str = None#
field streamsets_environment_asset_id: str [Required]#
field url: str = None#
property api_client: DataCollectorAPIClient#

The API Client connected directly to the engine.

property engine_id: str#

Returns engine asset_id.

property library_definitions: LibraryDefinitions#

Library Definitions of the Engine.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.engine_model.EngineMetadata#

Bases: BaseModel

The model for CPD StreamSets Engine Metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field asset_attributes: list | None [Required]#
field asset_id: str [Required]#
field asset_state: str | None [Required]#
field asset_type: str | None [Required]#
field catalog_id: str [Required]#
field create_time: str | None = None#
field created: int [Required]#
field created_at: str [Required]#
field creator_id: str [Required]#
field description: str [Required]#
field name: str [Required]#
field origin_country: str | None = None#
field owner: str = None#
field owner_id: str [Required]#
field project_id: str [Required]#
field rating: int | None [Required]#
field rov: dict | None [Required]#
field sandbox_id: str [Required]#
field size: int | None [Required]#
field space_id: str = None#
field tags: list | None [Optional]#
field usage: dict | None [Required]#
field version: int | None [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.services.streamsets.models.engine_model.LibraryDefinitions#

Bases: BaseModel

An engine’s library definition.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field category: Any | None [Required]#
field category_label: str | None [Required] (alias 'categoryLabel')#
field el_catalog: Any [Required] (alias 'elCatalog')#
field event_definitions: dict [Required] (alias 'eventDefinitions')#
field executor_version: str | None [Required] (alias 'executorVersion')#
field legacy_stage_libs: list[dict] [Required] (alias 'legacyStageLibs')#
field pipeline: list[dict] [Required]#
field pipeline_fragment: list[dict] [Required] (alias 'pipelineFragment')#
field pipeline_rules: list[dict] [Required] (alias 'pipelineRules')#
field rules_el_metadata: dict [Required] (alias 'rulesElMetadata')#
field runtime_configs: list[Any] [Required] (alias 'runtimeConfigs')#
field schema_version: str [Required] (alias 'schemaVersion')#
field services: list[dict] [Required]#
field stage_definition_map: dict | None [Required] (alias 'stageDefinitionMap')#
field stage_definition_minimal_list: list[dict] | None [Required] (alias 'stageDefinitionMinimalList')#
field stage_icons: Any [Required] (alias 'stageIcons')#
field stages: list[dict] [Required]#
field version: int | None [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

Environment#

Module containing Environment Models.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.environment_model.EngineProperties#

Bases: BaseModel

The model for engine properties that are included in environments.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field stagelibs_blocklist: list | None = None (alias 'system.stagelibs.blocklist')#
serialize_stagelibs(stagelibs: list | None)#

Serializes a list of stage libraries into a comma-separated string (original format).

Return type:

str | None

validator split_string  »  stagelibs_blocklist#

Splits a stagelibs_blocklist by commas during instance creation.

Return type:

list | None

pydantic model ibm_watsonx_data_integration.services.streamsets.models.environment_model.Environment#

Bases: BaseModel

The model for CPD StreamSets Environment.

The __init__ of the Environment class.

Parameters:
  • env_json (dict) – The JSON for the Service.

  • platform (Optional[Platform], default: None) – The Platform object.

  • project – The Project object.

field cpus_to_allocate: int | None = None#
field engine_heartbeat_interval: int | None = None#
field engine_properties: EngineProperties | None [Optional]#
field engine_type: str | None = None#
field engine_version: str = None#
field external_resource_asset: dict | None [Optional]#
field href: str | None = None#
field jvm_options: list | None [Optional]#
field log4j2_properties: dict | None [Optional]#
field max_cpu_load: int | None = None#
field max_flows_running: int | None = None#
field max_memory_used: int | None = None#
field metadata: EnvironmentMetadata | None = None#
field stage_libs: list | None [Optional]#
add_stage_libraries(stage_libs: list)#

Allows to add stage libraries to the environment.

Parameters:

stage_libs (list) – List of stage libraries to add.

Return type:

None

get_installation_command(pretty: bool = True, foreground: bool = False)#

Returns the installation command for the environment.

Return type:

str | None

model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

property engines: list[Engine]#

Returns list of Engines.

property environment_id: str#

Returns id of environment.

property origin: dict#

Returns origin model dump.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.environment_model.EnvironmentMetadata#

Bases: BaseModel

The model for CPD StreamSets Environment Metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field asset_attributes: list | None [Required]#
field asset_state: str | None [Required]#
field asset_type: str | None [Required]#
field catalog_id: Union[Annotated[UUID], str, None] [Required]#
field create_time: str [Required]#
field description: str = ''#
field environment_id: Union[Annotated[UUID], str] [Required] (alias 'asset_id')#
field name: str [Required]#
field owner_id: str [Required]#
field project_id: Union[Annotated[UUID], str] [Required]#
field version: float | None [Required]#
model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.services.streamsets.models.environment_model.Environments(platform: Platform, project: Project)#

Bases: CollectionModel

Collection of Environments instances.

The __init__ of the Environment class.

Parameters:
  • platform (Platform) – The Platform object.

  • project (Project) – The Project object.

Flow#

Module containing Flow Model.

class ibm_watsonx_data_integration.cpd_models.flow_model.DefaultFlowPayloadExtender#

Bases: PayloadExtender

Default payload extender which setup only asset_ref.

extend(payload: dict[str, Any], flow: Flow)#

Here we should modify and return payload for job creation.

Return type:

dict[str, Any]

pydantic model ibm_watsonx_data_integration.cpd_models.flow_model.Flow#

Bases: BaseModel

Represents a flow.

Currently, this is an empty class used to indicate the required inheritance structure, primarily for job creation. A proper implementation will be addressed in the following ticket: https://streamsets.atlassian.net/browse/WSDK-335

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

class ibm_watsonx_data_integration.cpd_models.flow_model.PayloadExtender#

Bases: ABC

Interface class for flows with custom payload logic.

This interface should be implemented by any flow that requires custom logic for generating a job’s payload. It ensures a consistent contract for flows that need to override the default payload creation behavior.

abstract extend(payload: dict[str, Any], flow: Flow)#

Here we should modify and return payload for job creation.

Return type:

dict[str, Any]

Flow#

Module containing StreamSets Flow Models.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.PipelineDefinition#

Bases: BaseModel

Pipeline Definition of a flow in an engine.

The __init__ for the pipeline definition.

Parameters:
  • flow (StreamsetsFlow) – The parent flow object

  • pipeline_definition_json (any) – Pipeline definition from the engine.

field configuration_data: list[dict] [Required] (alias 'configuration')#
field description: str [Required]#
field error_stage_data: dict | None [Required] (alias 'errorStage')#
field fragments: list [Required]#
field info: dict [Required]#
field issues: dict [Required]#
field metadata: dict | None = None#
field pipeline_id: str [Required] (alias 'pipelineId')#
field previewable: bool [Required]#
field schema_version: int [Required] (alias 'schemaVersion')#
field stages_data: list[dict] [Required] (alias 'stages')#
field start_event_stages_data: list[dict] | None = None (alias 'startEventStages')#
field stats_aggregator_stage_data: dict | None [Required] (alias 'statsAggregatorStage')#
field stop_event_stages_data: list[dict] | None = None (alias 'stopEventStages')#
field test_origin_stages_data: dict | None = None (alias 'testOriginStage')#
field title: str [Required]#
field ui_info: dict [Required] (alias 'uiInfo')#
field uuid: str [Required]#
field valid: bool [Required]#
field version: int [Required]#
add_stage(label: str | None = None, name: str | None = None, type: str | None = None, library: str | None = None)#

Add a new stage to the pipeline.

Parameters:
  • label (str | None, default: None) – Label of the stage

  • name (str | None, default: None) – Name of the stage

  • type (str | None, default: None) – Type of stage

  • library (str | None, default: None) – Library the stage belongs to

Return type:

Stage | StageWithPredicates

static get_attribute(config_definition: dict)#

Gets the attribute name for a configuration using its definition in a human-readable format.

Return type:

tuple[str, str]

static get_color_icon_from_stage_definition(stage_definition: dict, stage_types: dict)#

Create colorIcon value from stage definition.

Parameters:
  • stage_definition (dict) – stage definition from pipeline definitions

  • stage_types (dict) – The PipelineDefinition._NODE_TYPES

Return type:

str

model_dump(by_alias: bool = True, **kwargs: any)#

Ensure stages are properly arranged when pipeline definition is stringified.

Return type:

dict

remove_stage(stage: Stage)#

Removed a stage from the flow.

Parameters:

stage (Stage) – Stage to remove.

Return type:

None

set_error_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the error stage of the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage.

  • name (str | None, default: None) – Name of the stage.

  • library (str | None, default: None) – Library the stage belongs to.

Return type:

Stage

set_start_event_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the start event stage of the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage.

  • name (str | None, default: None) – Name of the stage.

  • library (str | None, default: None) – Library the stage belongs to.

Return type:

Stage

set_stats_aggregator_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the stats aggregator stage of the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage.

  • name (str | None, default: None) – Name of the stage.

  • library (str | None, default: None) – Library the stage belongs to.

Return type:

Stage

set_stop_event_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the stop event stage of the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage.

  • name (str | None, default: None) – Name of the stage.

  • library (str | None, default: None) – Library the stage belongs to.

Return type:

Stage

set_test_origin_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the test origin stage of the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage.

  • name (str | None, default: None) – Name of the stage.

  • library (str | None, default: None) – Library the stage belongs to.

Return type:

Stage

static stage_configuration_name(stage_json: dict)#

Gets a stages configuration name, the name it has in a flow’s configuration.

Return type:

str

property configuration: Configuration#

The configuration for the pipeline.

property error_stage: Stage | None#

The error stage of the flow.

property stages: list[Stage | StageWithPredicates]#

The stages belonging to the flow.

property start_event: Stage | None#

The start event stage of the flow.

property stats_aggregator_stage: Stage | None#

The stats aggregator stage of the flow.

property stop_event: Stage | None#

The stop event stage of the flow.

property test_origin: Stage | None#

The test origin stage of the flow.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.Stage#

Bases: BaseModel

Class for a stage.

The __init__ for the class.

Parameters:
  • pipeline_definition (PipelineDefinition) – Pipeline Definition of the flow this stage belongs to

  • output_streams (int, default: 0) – The number of output streams for the stage, if 0 then it is inferred from output lanes

  • supported_connection_types (list[str] | None, default: None) – The connection types supported by the stage.

  • attributes (dict | None, default: None) – Any attributes specific to the stage.

  • stage_json (any) – All other properties used by BaseModel

field configuration_data: list[dict] [Required] (alias 'configuration')#
field event_lanes: list[str] = [] (alias 'eventLanes')#
field input_lanes: list[str] = [] (alias 'inputLanes')#
field instance_name: str [Required] (alias 'instanceName')#
field library: str [Required]#
field output_lanes: list[str] = [] (alias 'outputLanes')#
field services_data: list[dict] [Required] (alias 'services')#
field stage_name: str [Required] (alias 'stageName')#
field stage_version: str [Required] (alias 'stageVersion')#
field ui_info: dict [Required] (alias 'uiInfo')#
connect_event_to(*stages: Stage)#

Connect other stages to the event output of this stage.

Parameters:

stages (Stage) – Stages to connect to this stage

Return type:

None

connect_input_to(*stages: Stage, predicate: dict = None)#

Connect other stages to the input of this stage.

Parameters:
  • stages (Stage) – Stages to connect to this stage

  • predicate (dict, default: None) – Whether to use any specific predicate when connecting

Return type:

None

connect_output_to(*stages: Stage, predicate: dict = None)#

Connect other stages to the output of this stage.

Parameters:
  • stages (Stage) – Stages to connect to this stage

  • predicate (dict, default: None) – Whether to use any specific predicate when connecting (only applicable to some stages)

Return type:

None

disconnect_event_from(*stages: Stage)#

Disconnect the event output of this stage from the provided stages.

Parameters:

stages (Stage) – Stages to disconnect from this stage.

Return type:

None

disconnect_input_from(*stages: Stage, is_event: bool = False)#

Disconnect the input of this stage from the output of the provided stages.

Parameters:
  • stages (Stage) – Stages to disconnect from this stage.

  • is_event (bool, default: False) – Whether we are disconnecting events.

Return type:

None

disconnect_output_from(*stages: Stage)#

Disconnect the output of this stage from the provided stages.

Parameters:

stages (Stage) – Stages to disconnect from this stage.

Return type:

None

property configuration: Configuration#

The stage’s configurations.

property events: list#

All the stages connected to this stages event output.

property inputs: list#

All the stages connected to this stages input.

property outputs: list#

All the stages connected to this stages output.

property type: str#

The type of this stage.

ibm_watsonx_data_integration.services.streamsets.models.flow_model.StageClassDefault#

alias of StageClassDefaults

class ibm_watsonx_data_integration.services.streamsets.models.flow_model.StageConfigurationProperty(config_name)#

Bases: tuple

Create new instance of StageConfigurationProperty(config_name,)

config_name#

Alias for field number 0

class ibm_watsonx_data_integration.services.streamsets.models.flow_model.StageData(definition, instance)#

Bases: tuple

Create new instance of StageData(definition, instance)

definition#

Alias for field number 0

instance#

Alias for field number 1

class ibm_watsonx_data_integration.services.streamsets.models.flow_model.StageServiceProperty(service_name, config_name)#

Bases: tuple

Create new instance of StageServiceProperty(service_name, config_name)

config_name#

Alias for field number 1

service_name#

Alias for field number 0

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StageWithPredicates#

Bases: Stage

Class for a stage with predicates.

The __init__ for stages with predicates.

Parameters:
  • variable_output_drive (str) – The configuration key for where the predicates are located.

  • args (any) – Arguments for initializing a Stage.

  • kwargs (any) – Keyword arguments for initializing a Stage.

add_predicates(predicates: list[dict | str])#

Add a predicate.

Example

stage.add_predicates([‘>0’]) stage.add_predicates([{‘predicate’:’>0’, ‘outputLane’:’lane1’}]) stage.add_predicates([‘>0’ ,’=0’])

Parameters:

predicates (list[dict | str]) – The list of predicates to add.

Raises:

ValueError – If predicates is not a list.

Return type:

None

remove_predicate(predicate: dict)#

Remove a predicate.

Example

stage.remove_predicate(stage.predicates[0]) stage.remove_predicate({‘predicate’:’>0’, ‘outputLane’:’lane1’})

Parameters:

predicate (dict) – The predicate to delete as a dictionary including the outputLane.

Raises:

ValueError – If predicates is not specified or can’t find its target.

Return type:

None

property predicates: list[dict]#

Get the predicate list for this stage.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsConnection#

Bases: BaseModel

Streamsets Connection object.

The __init__ of the StreamsetsConnection class.

Parameters:
  • connection_json (dict) – The JSON for the StreamsetsConnection.

  • platform (Platform, default: None) – The Platform object.

  • project (Project, default: None) – The Project object.

field datasource_type: str | None = None#

Datasource type

field metadata: StreamsetsConnectionMetadata [Required]#
field name: str | None = None#

Connection name

field properties: dict | None = None#
pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsConnectionMetadata#

Bases: BaseModel

Streamsets Connection Metadata object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field asset_category: str | None = None#

Category of the asset

field asset_id: str [Required]#

Asset identifier

field asset_type: str | None = None#

Type of the asset

field create_time: str | None = None#

Creation time

field creator_id: str | None = None#

Asset creator identifier

field project_id: str | None = None#

Project identifier

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlow#

Bases: Flow

The Model for StreamsetsFlow.

The __init__ of the StreamsetsFlow class.

Parameters:
  • project (Project) – The Project object.

  • pipeline_definition (dict | None, default: None) – Pipeline definition for the flow

  • flow_json (dict) – The JSON for the flow.

field connection_ids: list[str] = []#
field engine_version: str | None = ''#
field environment_id: str | None = ''#
field fragments_ids: list[str] = [] (alias 'fragment_ids')#
field metadata: StreamsetsFlowMetadata [Required]#
add_stage(label: str | None = None, name: str | None = None, type: str | None = None, library: str | None = None)#

Add a stage to the flow.

Parameters:
  • label (str | None, default: None) – Label of the stage to add.

  • name (str | None, default: None) – Name of the stage to add.

  • type (str | None, default: None) – Type of the stage to add.

  • library (str | None, default: None) – Library that stage to add belongs to.

Return type:

Stage | StageWithPredicates

get_executor_id()#

Get a flow’s id in an executor.

Return type:

str

remove_stage(stage: Stage)#

Removes a stage from the flow.

Parameters:

stage (Stage) – The stage to remove.

Return type:

None

set_error_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the error stage of a flow.

Return type:

Stage

set_start_event_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the start event stage of a flow.

Return type:

Stage

set_stats_aggregator_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the stats aggregator stage of a flow.

Return type:

Stage

set_stop_event_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the stop event stage of a flow.

Return type:

Stage

set_test_origin_stage(label: str | None = None, name: str | None = None, library: str | None = None)#

Set the test origin stage of a flow.

Return type:

Stage

property configuration: Configuration#

The configuration of a flow.

property description: str#

Returns description of the flow.

property error_stage: Stage | None#

The error stage of the flow.

property flow_id: str#

Returns id of the flow.

property name: str#

Returns name of the flow.

property pipeline_definition: dict#

A flow’s definition in an engine.

property stages: list[Stage | StageWithPredicates]#

The stages in the flow.

property start_event: Stage | None#

The start event stage of the flow.

property stats_aggregator_stage: Stage | None#

The stats aggregator stage of the flow.

property stop_event: Stage | None#

The stop event stage of the flow.

property test_origin: Stage | None#

The test origin stage of the flow.

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlowMetadata#

Bases: BaseModel

The Model for StreamsetsFlowMetadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field asset_attributes: list | None = None#
field asset_category: str | None = None#
field asset_state: str | None = None#
field asset_type: str | None = None#
field catalog_id: str | None = None#
field create_time: str | None = None#
field created: int | None = None#
field created_at: str | None = None#
field creator_id: str | None = None#
field description: str [Required]#
field flow_id: str [Required] (alias 'asset_id')#
field is_linked_with_sub_container: bool | None = None#
field name: str [Required]#
field owner_id: str | None = None#
field project_id: str | None = None#
field rating: int | None = None#
field rov: StreamsetsFlowROV | None = None#
field sandbox_id: str | None = None#
field size: int | None = None#
field tags: list | None = None#
field total_ratings: int | None = None#
field usage: StreamsetsFlowUsage | None = None#
field version: float | None = None#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlowPayloadExtender#

Bases: PayloadExtender

Streamsets flow extender setup also streamsets_env_id.

extend(payload: dict[str, Any], flow: Flow)#

Here we should modify and return payload for job creation.

Return type:

dict[str, Any]

pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlowROV#

Bases: BaseModel

The Model for StreamsetsFlowROV.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field collaborator_ids: dict | None [Required]#
field member_roles: dict | None [Required]#
field mode: int | None [Required]#
pydantic model ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlowUsage#

Bases: BaseModel

The Model for StreamsetsFlowUsage.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field access_count: int | None [Required]#
field last_access_time: str | None [Required]#
field last_accessed_at: str | None [Required]#
field last_accessor_id: str | None [Required]#
field last_update_time: str | None [Required]#
field last_updated_at: str | None [Required]#
field last_updater_id: str | None [Required]#
class ibm_watsonx_data_integration.services.streamsets.models.flow_model.StreamsetsFlows(project: Project)#

Bases: CollectionModel

Collection of StreamsetsFlows.

The __init__ of the StreamsetsFlow class.

Parameters:

project (Project) – The Project object.

Job#

Module containing Job and Job Run Models.

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.Job#

Bases: BaseModel

The model for CPD Job.

The __init__ of the Job class.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • project (Optional[Project], default: None) – The Project object.

  • job_json (dict) – The JSON for the Job.

field asset_ref: str [Required]#
field configuration: JobConfiguration [Required]#
field enable_notifications: bool [Required]#
field future_scheduled_runs: list [Required]#
field job_parameters: list[JobParameter] | None = None#
field job_type: str [Required] (alias 'asset_ref_type')#
field last_run_status_timestamp: int [Required]#
field metadata: JobMetadata [Required]#
field parameter_sets: list[ParameterSet] | None = None#
field project_name: str [Required]#
field schedule: str | None = None#
field schedule_creator_id: str [Required]#
field schedule_id: str [Required]#
field schedule_info: ScheduleInfo | None = None#
delete_job_run(job_run: JobRun)#

Delete given run of job.

Parameters:

job_run (JobRun) – Instance of a Job Run to delete.

Return type:

Response

Returns:

A HTTP response. If it is 204, then the operation completed successfully. If the code is 202, then the operation is in progress.

model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

start(name: str, description: str, configuration: dict[str, Any] | None = None, job_parameters: dict[str, Any] | None = None, parameter_sets: list[dict[str, str]] | None = None)#

Create Job Run for given configuration.

Parameters:
  • name (str) – Name for a Job Run.

  • description (str) – Description for a Job Run.

  • configuration (dict[str, Any] | None, default: None) – Environment variables.

  • job_parameters (dict[str, Any] | None, default: None) – Parameters use internally by a Job.

  • parameter_sets (list[dict[str, str]] | None, default: None) – Parameter sets for a Job Run.

Return type:

JobRun

Returns:

An instance of a Job Run.

property job_id: str#

Returns id of job.

property job_runs: JobRuns#

Returns a list of Job Runs of the job.

Returns:

A list of jobs runs for the given job.

property origin: dict#

Returns origin model dump.

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.JobConfiguration#

Bases: BaseModel

Holds configuration parameters which Job was run.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field deployment_job_definition_id: str = ''#
field env_id: str = ''#
field env_type: str = ''#
field env_variables: list[str] | None [Optional]#
field outputs: Outputs [Optional]#
field version: str = ''#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.JobMetadata#

Bases: BaseModel

Model representing metadata for a job.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field description: str | None = ''#
field job_id: str [Required] (alias 'asset_id')#
field name: str [Required]#
field owner_id: str [Required]#
field version: int [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.JobParameter#

Bases: BaseModel

Parameter used when running job.

Represents parameter used by Connectors and Stages to dynamically change value.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field name: str [Required]#
field value: Any [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.JobRun#

Bases: BaseModel

The model for CPD Job Run.

The __init__ of the Job Run class.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • project (Optional[Project], default: None) – The Project object.

  • job_run_json (dict) – The JSON for the Job Run.

field configuration: JobConfiguration [Required]#
field duration: int | None = None#
field execution_end: int | None = None#
field execution_start: int | None = None#
field is_scheduled_run: bool = False (alias 'isScheduledRun')#
field job_id: str [Required] (alias 'job_ref')#
field job_name: str [Required]#
field job_parameters: list[JobParameter] | None = None#
field job_type: str [Required]#
field last_state_change_timestamp: str | None = None#
field metadata: JobRunMetadata [Required]#
field parameter_sets: list[ParameterSet] | None = None#
field project_name: str | None = None#
field queue_end: int | None = None#
field queue_start: int | None = None#
field resource_usage: float | None = None#
field runtime_job_id: str | None = None#
field state: JobRunState [Required]#
field total_rows_read: int | None = None#
field total_rows_written: int | None = None#
field total_stages: int | None = None#
cancel()#

Stop already started Job Run.

Return type:

Response

Returns:

A HTTP response. If it is 204, then the operation completed successfully.

model_dump(*, by_alias: bool = True, exclude_unset: bool = True, **kwargs: dict)#

Changing default parameters of model_dump to make sure that serialized json math API response.

Parameters:
  • by_alias (bool, default: True) – Whether to use alias names in serialization.

  • exclude_unset (bool, default: True) – Whether to exclude unset fields from serialization.

  • **kwargs (dict) – Additional keyword arguments to pass to the model_dump method.

Return type:

dict

Returns:

A dictionary representation of the model.

property job_run_id: str#

Returns id of job run.

property logs: list[str]#

Retrieves runtime logs for a job run.

Returns:

A list containing runtime log entries that describe the job run execution. Each entry is a single log line from the UI.

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.JobRunMetadata#

Bases: BaseModel

Model representing metadata for a Job Run.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field created: int [Required]#
field created_at: str [Required]#
field job_run_id: str [Required] (alias 'asset_id')#
field name: str [Required]#
field owner_id: str [Required]#
field usage: dict[str, Any] [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.cpd_models.job_model.JobRunState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: str, Enum

Available states for Job Run.

class ibm_watsonx_data_integration.cpd_models.job_model.JobRuns(platform: Platform, project: Project, job_id: str)#

Bases: CollectionModel

Collection of Job Run instances.

The __init__ of the JobRuns class.

Parameters:
  • platform (Platform) – The Platform object.

  • project (Project) – Instance of Project in which job run was created.

  • job_id (str) – ID of Job for which runs was stared.

class ibm_watsonx_data_integration.cpd_models.job_model.JobType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: str, Enum

Internal enum for asset/job type constants to replace hardcoded strings.

class ibm_watsonx_data_integration.cpd_models.job_model.Jobs(platform: Platform, project: Project)#

Bases: CollectionModel

Collection of Job instances.

The __init__ of the Jobs class.

Parameters:
  • platform (Platform) – The Platform object.

  • project (Project) – Instance of Project in which job was created.

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.Outputs#

Bases: BaseModel

Holds job configuration output information.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field total_bytes_read: int = 0#
field total_bytes_written: int = 0#
field total_rows_read: int = 0#
field total_rows_written: int = 0#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.ParameterSet#

Bases: BaseModel

Parameter sets.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field name: str [Required]#
field ref: str [Required]#
field value_set: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.RetentionPolicy#

Bases: BaseModel

Retention policy model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field amount: int | None = None#
field days: int | None = None#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.job_model.ScheduleInfo#

Bases: BaseModel

Represent schedule configuration for Job.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field end_on: int | None = None (alias 'endOn')#
field repeat: bool | None = None#
field start_on: int | None = None (alias 'startOn')#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

Platform#

This module defines top-level abstractions for WatsonX Data Integration.

class ibm_watsonx_data_integration.platform.Platform(auth: BaseAuthenticator, base_url: str = 'https://cloud.ibm.com', base_api_url: str = 'https://api.dataplatform.cloud.ibm.com')#

Bases: object

Class to interact with IBM Cloud Pak for Data.

The __init__ for the Platform class.

Parameters:
  • auth (BaseAuthenticator) – The Authentication object.

  • base_url (str, default: 'https://cloud.ibm.com') – The Cloud Pak for Data URL.

  • base_api_url (str, default: 'https://api.dataplatform.cloud.ibm.com') – The Cloud Pak for Data API URL.

property access_groups: AccessGroups#

Returns a collection of AccessGroup objects.

Returns:

A collection of Access Group objects retrieved from the API.

property accounts: Accounts#

Returns a list of all accounts associated with the current IAM identity or API key.

Returns:

A list of account objects retrieved from the API.

add_member_to_multiple_access_groups(member: UserProfile | ServiceID | TrustedProfile, access_groups: list[AccessGroup])#

Adds a member to multiple Access Groups.

Parameters:
Return type:

Response

Returns:

A HTTP response.

property available_engine_versions: list[str]#

Lists all StreamSets Engine Versions.

Returns:

A list of Engine versions.

property connections_service_info: ConnectionsServiceInfo#

Retrieves information about connection service. Can be used as heartheat mechanism.

Returns:

A connection service information.

create_access_group(name: str, description: str | None = None)#

Creates an access group and returns the created access group object.

Parameters:
  • name (str) – Name of the Access Group

  • description (str | None, default: None) – Description of the Access Group

Return type:

AccessGroup

Returns:

An Access Group instance.

create_project(name: str, description: str = '', tags: list = None, public: bool = False, project_type: str = 'wx')#

Create a Project.

Parameters:
  • name (str) – The Project name.

  • description (str, default: '') – The name of the Project.

  • tags (list, default: None) – The tags of the Project.

  • public (bool, default: False) – Whether the Project is public.

  • project_type (str, default: 'wx') – Type of the Project - ‘cpd’ - IBM Cloud Pak for Data; ‘wx’ - IBM watsonx (and Data Fabric).

Return type:

Project

Returns:

A project instance.

create_role(name: str, display_name: str, service_name: str, actions: list, description: str | None = None)#

Creates a custom role for a specific service within the account.

Parameters:
  • display_name (str) – The display the name of the role that is shown in the console.

  • actions (list) – The actions of the role (list of strings).

  • name (str) – The name of the role that is used in the CRN. This must be alphanumeric and capitalized.

  • service_name (str) – The service name.

  • description (str | None, default: None) – The description of the role.

Return type:

Role

Returns:

A role instance.

create_service_instance(instance_type: str, name: str, target: str | None = None, tags: list | None = None)#

Creates Service Instance.

Parameters:
  • instance_type (str) – The Instance Type.

  • name (str) – The name of the Instance.

  • target (str | None, default: None) – The target of the Instance.

  • tags (list | None, default: None) – The tags of the Instance.

Return type:

Service

Returns:

A HTTP response.

property current_account: Account#

Gets the current (first) account from the list of accounts.

Returns:

An account object representing the first account retrieved from the accounts list.

Raises:

ValueError – If there are no accounts available for the provided IAM identity or API key.

property datasources: DatasourceTypes#

Retrieves available datasource types.

Returns:

A list of available DatasourceTypes.

delete_access_group(access_group: AccessGroup)#

Deletes an access group and returns output of api call to delete.

Parameters:

access_group (AccessGroup) – Access Group to be deleted

Return type:

Response

Returns:

A HTTP response.

delete_file(file: ConnectionFile)#

Delete a file.

Return type:

Response

Returns:

A HTTP response.

delete_project(project: Project)#

Deletes a Project.

Parameters:

project (Project) – The Project to delete.

Return type:

Response

Returns:

A HTTP response.

delete_role(role: Role)#

Delete a custom role.

Parameters:

role (Role) – The role to delete.

Return type:

Response

Returns:

A HTTP response.

Raises:

TypeError – If you try to delete service_role or system_role.

delete_service_instance(service: Service, delete_keys: bool = True)#

Delete Resource Instance.

Parameters:
  • service (Service) – The Service to delete.

  • delete_keys (bool, default: True) – Whether to recursively delete resource keys.

Return type:

Response

Returns:

A HTTP response.

property files: ConnectionFiles#

Retrieves list of files.

Returns:

List of connection files.

get_engine_version_info(engine_version: str)#

Get a StreamSets Engine information.

Return type:

dict

Returns:

A dict with information about engine version.

Raises:

HTTPError – If the request fails.

property projects: Projects#

Returns a list of Project objects.

Returns:

An instance of ibm_watsonx_data_integration.cpd_models.Projects

remove_member_from_all_access_groups(member: UserProfile | ServiceID | TrustedProfile)#

Removes a member from all access groups under an account.

Parameters:

member (UserProfile | ServiceID | TrustedProfile) – The member object to remove.

Return type:

Response

Returns:

A HTTP response.

property roles: Roles#

Returns a list of all roles.

Returns:

An instance of watsonx_di_sdk.role_model.Roles

property service_ids: ServiceIDs#

Returns a collection of ServiceID objects.

Returns:

A collection of ServiceID objects retrieved from the API.

property service_instances: Services#

Returns a list of Service Instances.

Returns:

An instance of ibm_watsonx_data_integration.cpd_models.Services

property trusted_profiles: TrustedProfiles#

Returns a collection of TrustedProfile objects.

Returns:

A collection of TrsutedProfile objects retrieved from the API.

update_access_group(access_group: AccessGroup)#

Updates an existing group and returns the output for api call to update.

Parameters:

access_group (AccessGroup) – Access Group to be updated

Return type:

Response

Returns:

A HTTP response.

update_project(project: Project)#

Updates a Project.

Parameters:

project (Project) – The Project to delete.

Return type:

Response

Returns:

A HTTP response.

update_role(role: Role)#

Update a custom role.

A role administrator might want to update an existing custom role by updating the display name, description, or the actions that are mapped to the role. The name, account_id, and service_name can’t be changed.

Parameters:

role (Role) – The role to update.

Return type:

Response

Returns:

A HTTP response.

Raises:

TypeError – If you try to modify service_role or system_role.

upload_file(name: str, file: Path)#

Uploads file.

Parameters:
  • name (str) – Name of the file to upload.

  • file (Path) – File to upload.

Return type:

Response

Returns:

A HTTP response.

Raises:
  • ValueError – If incorrect file path is provided.

  • FileNotFoundError – If file path does not exist.

property users: UserProfiles#

Retrieves collection of all the user profiles in the current account.

Returns:

An iterable collection of user profiles.

validate()#

Perform validation of Platform setup.

Raises:
  • requests.exceptions.ConnectionError – If base_api_url is invalid or dns cannot be resolved.

  • ibm_watsonx_data_integration.common.exceptions.IbmCloudApiException – If base_api_url can be resolved but is incorrect.

Return type:

None

Project#

Module containing Project Models.

pydantic model ibm_watsonx_data_integration.cpd_models.project_model.Project#

Bases: BaseModel

The Model for Projects.

The __init__ of the Project class.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • project_json (dict) – The JSON for the Service.

field creator: str | None [Required]#
field description: str [Required]#
field generator: str | None [Required]#
field metadata: ProjectMetadata [Required]#
field name: str [Required]#
field public: bool | None [Required]#
field scope: Scope | None [Required]#
field storage: Storage | None [Required]#
field tags: list | None [Optional]#
field type: str | None [Required]#
copy_connection(connection: Connection)#

Update the Connection.

Parameters:

connection (Connection) – connection to copy

Return type:

Connection

Returns:

Copied Connection object.

create_connection(name: str, datasource_type: DatasourceType, description: str | None = None, properties: dict | None = None, test: bool = True)#

Create a Connection.

Parameters:
  • name (str) – name for the new connection.

  • description (str | None, default: None) – description for the new connection.

  • datasource_type (DatasourceType) – type of the datasource.

  • properties (dict | None, default: None) – properties of the new connection.

  • test (bool, default: True) – whether to test the connection before saving it. If true and validation cannot be estabilished, connection will not be saved.

Return type:

Connection

Returns:

Created Connection object.

create_environment(*, name: str, engine_version: str | None = None, description: str = None, engine_type: str = None, engine_properties: dict = None, log4j2_properties: dict = None, external_resource_asset: dict = None, stage_libs: list = None, jvm_options: list = None, max_cpu_load: int = None, max_memory_used: int = None, max_flows_running: int = None, engine_heartbeat_interval: int = None, cpus_to_allocate: int = None)#

Allows to create a new Environment within project.

All of not set parameters will be skipped and set with default values provided by backed.

Parameters:
  • name (str) – Name of the environment.

  • description (str, default: None) – Description of the environment.

  • engine_type (str, default: None) – Type of the engine.

  • engine_version (str | None, default: None) – Version of the engine. Default is the latest engine version.

  • engine_properties (dict, default: None) – Properties of the engine.

  • external_resource_asset (dict, default: None) – External resources.

  • log4j2_properties (dict, default: None) – Log4j2 properties.

  • stage_libs (list, default: None) – Stage libraries.

  • jvm_options (list, default: None) – JVM options.

  • max_cpu_load (int, default: None) – Maximum CPU load.

  • max_memory_used (int, default: None) – Maximum memory used.

  • max_flows_running (int, default: None) – Maximum flows running.

  • engine_heartbeat_interval (int, default: None) – Engine heartbeat interval.

  • cpus_to_allocate (int, default: None) – Number of CPU used.

Return type:

Environment

Returns:

The created environment.

create_flow(name: str, environment: Environment, description: str = '', flow_type: str = 'streamsets')#

Creates a Flow.

Parameters:
  • name (str) – The name of the Streamsets flow.

  • environment (Environment) – The environment which will be used to run this flow.

  • description (str, default: '') – The description of the Streamsets flow.

  • flow_type (str, default: 'streamsets') – The type of flow.

Return type:

StreamsetsFlow

Returns:

The Streamsets Flow object.

Raises:
  • TypeError – If flow_type is not supported.

  • NoEnginesInstalledError – If there are no engines installed for environment.

create_job(name: str, flow: Flow, configuration: dict[str, Any] | None = None, description: str | None = None, job_parameters: dict[str, Any] | None = None, retention_policy: dict[str, int] | None = None, parameter_sets: list[dict[str, str]] | None = None, schedule: str | None = None, schedule_info: dict[str, Any] | None = None)#

Create Job for given asset.

Parameters:
  • name (str) – Name for a Job.

  • flow (Flow) – A reference to the flow for which the job will be created.

  • configuration (dict[str, Any] | None, default: None) – Environment variables for a Job.

  • description (str | None, default: None) – Job description.

  • job_parameters (dict[str, Any] | None, default: None) – Parameters use internally by a Job.

  • retention_policy (dict[str, int] | None, default: None) – Retention policy for a Job.

  • parameter_sets (list[dict[str, str]] | None, default: None) – Parameter sets for a Job.

  • schedule (str | None, default: None) – Crone string.

  • schedule_info (dict[str, Any] | None, default: None) – Schedule info for a Job.

Return type:

Job

Returns:

A Job instance.

Raises:

TypeError – If both asset_ref and asset_ref_type are provided, or if neither is provided

delete_connection(connection: Connection)#

Remove the Connection.

Parameters:

connection (Connection) – connection to delete

Return type:

Response

Returns:

A HTTP response.

delete_engine(engine: Engine)#

Allows to delete specified Engine within project.

Parameters:

engine (Engine) – Instance of an Engine to delete.

Return type:

Response

Returns:

A HTTP response.

delete_environment(environment: Environment)#

Allows to delete specified Environment within a Project.

Parameters:

environment (Environment) – Instance of an Environment to delete.

Return type:

Response

Returns:

A HTTP response.

delete_flow(flow: StreamsetsFlow)#

Delete a Flow.

Parameters:

flow (StreamsetsFlow) – The Flow object.

Return type:

Response

Returns:

A HTTP response.

delete_job(job: Job)#

Allows to delete specified Job within project.

Parameters:

job (Job) – Instance of a Job to delete.

Return type:

Response

Returns:

A HTTP response. If it is 204, then the operation completed successfully.

duplicate_flow(flow: StreamsetsFlow, name: str, description: str = '')#

Duplicate a Flow.

Parameters:
  • flow (StreamsetsFlow) – The Flow.

  • name (str) – The name of the Streamsets flow.

  • description (str, default: '') – The description of the Streamsets flow.

Return type:

StreamsetsFlow

Returns:

A copy of passed Streamsets flow.

get_engine(engine_id: str)#

Retrieve an engine by its engine_id.

Parameters:

engine_id (str) – The asset_id of the engine to retrieve.

Returns:

The retrieved engine.

Return type:

Engine

Raises:

HTTPError – If the request fails.

get_streamsets_connection(connection_id: str, version: str | None = None, type: str | None = None)#

Retrieves StreamSets connection by id associated with the project.

Parameters:
  • connection_id (str) – Id of the connection asset to retrieve.

  • version (str | None, default: None) – Connection version.

  • type (str | None, default: None) – Connection type.

Return type:

StreamsetsConnection

Returns:

Retrieved StreamsetsConnection object.

update_connection(connection: Connection, test: bool = True)#

Update the Connection.

Parameters:
  • connection (Connection) – connection to update

  • test (bool, default: True) – whether to test the connection before saving it. If true and validation cannot be estabilished, connection will not be saved.

Return type:

Response

Returns:

A HTTP response.

update_environment(environment: Environment)#

Allows to update specified Environment within a Project.

Parameters:

environment (Environment) – Instance of an Environment to update.

Return type:

Response

Returns:

A HTTP response.

update_flow(flow: StreamsetsFlow)#

Update a Flow.

Parameters:

flow (StreamsetsFlow) – The Flow object.

Return type:

Response

Returns:

A HTTP response.

update_job(job: Job)#

Allows to update specified Job within a project.

Parameters:

job (Job) – Instance of a Job to update.

Return type:

Response

Returns:

A HTTP response. If it is 200, then the operation completed successfully.

property connections: Connections#

Retrieves connections associated with the project.

Returns:

A Connections object.

property engines: list[Engine]#

Returns a list of Engines within project.

property environments: Environments#

Retrieves environments associated with the project.

Returns:

A list of Environments within the project.

property flows: StreamsetsFlows#

Returns Flows from the Project.

property jobs: Jobs#

Retrieves jobs associated with the project.

Returns:

A list of Jobs within the project.

property streamsets_connections: list[StreamsetsConnection]#

Retrieves StreamSets connections associated with the project.

Returns:

A list of StreamsetsConnection within the project.

pydantic model ibm_watsonx_data_integration.cpd_models.project_model.ProjectMetadata#

Bases: BaseModel

Model for metadata in a project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field created_at: str | None [Required]#
field guid: str [Required]#
field updated_at: str | None [Required]#
field url: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.cpd_models.project_model.Projects(platform: Platform)#

Bases: CollectionModel

Collection of Project instances.

The __init__ of the Projects class.

Parameters:

platform (Platform) – The Platform object.

pydantic model ibm_watsonx_data_integration.cpd_models.project_model.Scope#

Bases: BaseModel

Model for Scope details in a project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field bss_account_id: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

pydantic model ibm_watsonx_data_integration.cpd_models.project_model.Storage#

Bases: BaseModel

Model for Storage details in a project.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field guid: str [Required]#
field properties: dict[str, Any] [Required]#
field type: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

Role#

Module containing Roles Models.

pydantic model ibm_watsonx_data_integration.cpd_models.role_model.Role#

Bases: BaseModel

The model for custom role.

The __init__ of the CustomRole class.

Parameters:
  • platform (Optional[Platform], default: None) – The Platform object.

  • custom_role_json (dict) – The JSON for the CustomRole.

field account_id: str = None#
field actions: list[str] [Required]#
field created_at: str | None = ''#
field created_by_id: str | None = ''#
field crn: str | None = ''#
field description: str | None = ''#
field display_name: str [Required]#
field etag: str | None = ''#
field href: str | None = ''#
field id: str = ''#
field last_modified_at: str | None = ''#
field last_modified_by_id: str | None = ''#
field name: str = None#
field role_type: RoleType [Required]#
field service_name: str = None#
class ibm_watsonx_data_integration.cpd_models.role_model.RoleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: str, Enum

The model for RoleType enums.

class ibm_watsonx_data_integration.cpd_models.role_model.Roles(platform: Platform)#

Bases: CollectionModel

Collection of Roles instances.

The __init__ of the Role class.

Parameters:

platform (Platform) – The Platform object.

Service#

Module containing Service Models.

pydantic model ibm_watsonx_data_integration.cpd_models.service_model.Service#

Bases: BaseModel

The Model for Services.

The __init__ of the Service.

Parameters:
  • service_json (dict) – The JSON for the Service.

  • platform (Optional[Platform], default: None) – The Platform object.

field account_id: str [Required]#
field allow_cleanup: bool [Required]#
field controlled_by: str [Required]#
field created_at: str [Required]#
field created_by: str [Required]#
field crn: str [Required]#
field dashboard_url: None | str = None#
field deleted_at: str | None [Required]#
field deleted_by: str [Required]#
field guid: str [Required]#
field id: str [Required]#
field last_operation: dict | None [Required]#
field locked: bool [Required]#
field migrated: bool [Required]#
field name: str [Required]#
field onetime_credentials: bool [Required]#
field plan_history: list | None [Required]#
field region_id: str [Required]#
field reseller_channel_id: str [Required]#
field resource_aliases_url: str [Required]#
field resource_bindings_url: str [Required]#
field resource_group_crn: str [Required]#
field resource_group_id: str [Required]#
field resource_id: str [Required]#
field resource_keys_url: str [Required]#
field resource_plan_id: str [Required]#
field restored_at: str | None [Required]#
field restored_by: str [Required]#
field scheduled_reclaim_at: str | None [Required]#
field scheduled_reclaim_by: str [Required]#
field state: str [Required]#
field target_crn: str [Required]#
field type: str [Required]#
field updated_at: str [Required]#
field updated_by: str [Required]#
field url: str [Required]#
class ibm_watsonx_data_integration.cpd_models.service_model.Services(platform: Platform)#

Bases: CollectionModel

Collection of Service instances.

The __init__ of the Services class.

Parameters:

platform (Platform) – The Platform object.

Service Id#

Module containing Service ID Model.

pydantic model ibm_watsonx_data_integration.cpd_models.service_id_model.ServiceID#

Bases: BaseModel

Model representing a Service ID.

The __init__ of the ServiceID Wrapper class.

Parameters:
  • service_id_json (dict) – The JSON for the Service ID.

  • platform (Optional[Platform], default: None) – The Platform object. Default: None

field account_id: str [Required]#
field created_at: str [Required]#
field crn: str [Required]#
field entity_tag: str [Required]#
field iam_id: str [Required]#
field id: str [Required]#
field locked: bool [Required]#
field modified_at: str [Required]#
field name: str [Required]#
property type: str#

This property returns the member type “service”.

Returns:

The member type.

class ibm_watsonx_data_integration.cpd_models.service_id_model.ServiceIDs(platform: Platform | None = None)#

Bases: CollectionModel

Collection of ServiceID instances.

The __init__ of the ServiceIDs class.

Parameters:

platform (Optional[Platform], default: None) – The Platform object.

Trusted Profile#

Module containing Trusted Profile Model.

pydantic model ibm_watsonx_data_integration.cpd_models.trusted_profile_model.TrustedProfile#

Bases: BaseModel

Model representing a Service ID.

The __init__ of the TrustedProfile Wrapper class.

Parameters:
  • trusted_profile_json (dict) – The JSON for the Trusted Profile.

  • platform (Optional[Platform], default: None) – The Platform object. Default: None

field account_id: str [Required]#
field created_at: str [Required]#
field crn: str [Required]#
field entity_tag: str [Required]#
field iam_id: str [Required]#
field id: str [Required]#
field modified_at: str [Required]#
field name: str [Required]#
property type: str#

This property returns the member type “profile”.

Returns:

The member type.

class ibm_watsonx_data_integration.cpd_models.trusted_profile_model.TrustedProfiles(platform: Platform | None = None)#

Bases: CollectionModel

Collection of TrustedProfile instances.

The __init__ of the TrustedProfiles class.

Parameters:

platform (Optional[Platform], default: None) – The Platform object.

User#

Modules containing UserProfile Model and UserSettings Model.

pydantic model ibm_watsonx_data_integration.cpd_models.user_model.UserProfile#

Bases: BaseModel

Model representing a user profile.

id#

Unique identifier of the user.

iam_id#

The user’s IAM ID.

realm#

The realm to which the user belongs.

user_id#

The user’s identifier (often their email address).

first_name#

The first name (given name) of the user.

last_name#

The last name (family name) of the user.

state#

The current state of the user’s account (e.g. PROCESSING, PENDING, ACTIVE, DISABLED_CLASSIC_INFRASTRUCTURE, VPN_ONLY).

sub_state#

The substate of the user’s account, if applicable.

email#

The email address of the user.

phone#

The primary phone number of the user.

alt_phone#

An alternative phone number for the user.

photo#

A URL or reference to the user’s photo.

account_id#

Unique identifier of the account the user belongs to.

added_on#

Timestamp of when the user was added.

invited_on#

Timestamp of when the user was invited.

The __init__ of the User Profile.

Parameters:
  • platform (Platform | None, default: None) – The Platform object.

  • user_profile_json (dict) – The JSON for the User Profile.

field account_id: str [Required]#
field added_on: str [Required]#
field alt_phone: str | None = None (alias 'altphonenumber')#
field email: str [Required]#
field first_name: str | None = None (alias 'firstname')#
field iam_id: str [Required]#
field id: str [Required]#
field invited_on: str | None = None (alias 'invitedOn')#
field last_name: str | None = None (alias 'lastname')#
field phone: str | None = None (alias 'phonenumber')#
field photo: str | None = None#
field realm: str [Required]#
field state: UserState [Required]#
field sub_state: str | None = None#
field user_id: str [Required]#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

update_user_settings(user_settings: UserSettings)#

Update the settings for a specific user in an account.

Parameters:

user_settings (UserSettings) – Instance of a UserSettings to update.

Return type:

Response

Returns:

A HTTP response.

property settings: UserSettings#

Returns the user settings associated with the current IAM identity and the current account.

Returns:

A User Settings instance retrieved from the API.

property type: str#

This property returns the member type “user”.

Returns:

The member type.

class ibm_watsonx_data_integration.cpd_models.user_model.UserProfiles(platform: Platform)#

Bases: CollectionModel

Collection of UserProfile instances.

The __init__ of the UserProfiles class.

Parameters:

platform (Platform) – The Platform object.

pydantic model ibm_watsonx_data_integration.cpd_models.user_model.UserSettings#

Bases: BaseModel

Model representing user settings preferences.

language#

The user’s preferred language. This field may be empty.

notification_language#

The preferred language for notifications. This field may be empty.

allowed_ip_addresses#

A string representing allowed IP addresses (e.g., comma-separated). This field may be empty.

self_manage#

Flag indicating if the user has permission to manage their settings.

two_fa#

Flag that indicates whether two-factor authentication is enabled. This field is mapped from the JSON key “2FA”.

security_questions_required#

Flag indicating if security questions are required for the user.

security_questions_setup#

Flag that indicates whether the user has set up their security questions.

The __init__ of the UserSettings model.

Parameters:
  • platform (Platform | None, default: None) – The Platform object.

  • settings_json (dict) – The JSON for the user settings.

field allowed_ip_addresses: str = ''#
field language: str = ''#
field notification_language: str = ''#
field security_questions_required: bool = False#
field security_questions_setup: bool = False#
field self_manage: bool = False#
field two_fa: bool = False (alias '2FA')#
model_post_init(context: Any, /) None#

We need to both initialize private attributes and call the user-defined model_post_init method.

Return type:

None

class ibm_watsonx_data_integration.cpd_models.user_model.UserState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: Enum

An enumeration representing the possible states of a user’s account.