Models#
Access Groups#
Module containing AccessGroup Model.
- pydantic model ibm_watsonx_data_integration.cpd_models.access_groups_model.AccessGroup#
Bases:
BaseModel,ProjectCollaboratableModel 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 access_group_id:
str[Optional]#
-
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:
- 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:
- 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:
- Returns:
A HTTP response.
- class ibm_watsonx_data_integration.cpd_models.access_groups_model.AccessGroups(platform: Platform | None = None)#
Bases:
CollectionModelCollection of AccessGroup instances.
The __init__ of the AccessGroups class.
- Parameters:
platform (
Optional[Platform], default:None) – The Platform object.
Access Groups On Prem#
Module containing AccessGroupOnPrem Model.
- pydantic model ibm_watsonx_data_integration.cpd_models.access_groups_model_on_prem.AccessGroupOnPrem#
Bases:
BaseModel,ProjectCollaboratableOn-prem Access Group model.
The __init__ of the AccessGroup class.
- field created_at: str [Required]#
- field created_by: str [Required]#
- field description: str = None#
- field group_id: int | str [Required]#
- field members_count: int = 0#
- field misc: dict [Optional]#
- field name: str [Required]#
- field permissions: list[str] [Optional]#
- field roles: list[dict] [Optional]#
- field updated_at: str [Required]#
- add_members_to_access_group(users: list[object])#
Adds members to an AccessGroup.
- Parameters:
users (
list[object]) – The members to be added to the access group.- Return type:
- Returns:
A HTTP response.
- class ibm_watsonx_data_integration.cpd_models.access_groups_model_on_prem.AccessGroupsOnPrem(platform: Platform | None = None)#
Bases:
CollectionModelCollection of AccessGroupOnPrem instances.
The __init__ of the AccessGroupsOnPrem class.
Account#
Module containing Account Model.
- pydantic model ibm_watsonx_data_integration.cpd_models.account_model.Account#
Bases:
BaseModelModel 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[Optional] (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(_BaseModel__context: Any)#
Don’t allow extra variables after initialization.
- Return type:
None
- pydantic model ibm_watsonx_data_integration.cpd_models.account_model.AccountMetadata#
Bases:
BaseModelModel 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(_BaseModel__context: Any)#
Don’t allow extra variables after initialization.
- Return type:
None
-
field created_at:
- class ibm_watsonx_data_integration.cpd_models.account_model.Accounts(platform: Platform)#
Bases:
CollectionModelCollection 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:
BaseModelModel 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|None= None#
-
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(_BaseModel__context: Any)#
Don’t allow extra variables after initialization.
- Return type:
None
- property payment_ended: str | None#
Access the
endedin payment_method.- Returns:
A ended payment type.
- property payment_started: str | None#
Access the
startedin payment_method.- Returns:
A started payment type.
- property payment_type: str | None#
Access the
typein payment_method.- Returns:
A payment type.
-
field billing_system:
Account Owner#
Module containing AccountOwner Model.
- pydantic model ibm_watsonx_data_integration.cpd_models.account_owner_model.AccountOwner#
Bases:
BaseModelModel representing the owner of an account.
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(disable_ssl_verification: bool = False)#
Bases:
ABCBase Authenticator classes to be inherited by other authenticators.
Initializes BaseAuthenticator.
- Parameters:
disable_ssl_verification (
bool, default:False) – Whether to disable SSL Verification.
- abstract get_authorization_header()#
Returns the token formatted to be plugged into the Authorization header of a request.
- Return type:
str- Returns:
The value to be plugged into the Authorization header of a request.
- class ibm_watsonx_data_integration.common.auth.BearerTokenAuthenticator(bearer_token: str, disable_ssl_verification: bool = False)#
Bases:
BaseAuthenticatorAuthentication class for directly using a bearer token.
__init__ for the class.
- Parameters:
bearer_token (
str) – bearer token to use for authentication.disable_ssl_verification (
bool, default:False) – Whether to disable SSL Verification.
- get_authorization_header()#
Returns the token formatted to be plugged into the Authorization header of a request.
- Return type:
str- Returns:
The value to be plugged into the Authorization header of a request.
- class ibm_watsonx_data_integration.common.auth.IAMAuthenticator(api_key: str, base_auth_url: str = 'https://cloud.ibm.com', disable_ssl_verification: bool = False)#
Bases:
BaseAuthenticatorAuthenticator 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.disable_ssl_verification (
bool, default:False) – Whether to disable SSL Verification.
- 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:
The value to be plugged into the Authorization header of a request.
- get_token()#
Get existing token, or request a new one if the current token is expired.
- Return type:
str- Returns:
The current bearer token used for auth.
- request_token()#
Request a token from the s