carlogtt_python_library.amazon_internal.bindle module
This module …
- class carlogtt_python_library.amazon_internal.bindle.Bindle(aws_region_name: str, *, aws_profile_name: str | None = None, aws_access_key_id: str | None = None, aws_secret_access_key: str | None = None, aws_session_token: str | None = None, caching: bool = False, client_parameters: dict[str, Any] | None = None)[source]
Bases:
objectA handler class for the BindleAPI.
It includes an option to cache the client session to minimize the number of AWS API call.
- Parameters:
aws_region_name – The name of the AWS region where the service is to be used. This parameter is required to configure the AWS client.
aws_profile_name – The name of the AWS profile to use for credentials. This is useful if you have multiple profiles configured in your AWS credentials file. Default is None, which means the default profile or environment variables will be used if not provided.
aws_access_key_id – The AWS access key ID for programmatically accessing AWS services. This parameter is optional and only needed if not using a profile from the AWS credentials file.
aws_secret_access_key – The AWS secret access key corresponding to the provided access key ID. Like the access key ID, this parameter is optional and only needed if not using a profile.
aws_session_token – The AWS temporary session token corresponding to the provided access key ID. Like the access key ID, this parameter is optional and only needed if not using a profile.
caching – Determines whether to enable caching for the client session. If set to True, the client session will be cached to improve performance and reduce the number of API calls. Default is False.
client_parameters – A key-value pair object of parameters that will be passed to the low-level service client.
- describe_material_set(material_set_name: str) dict[str, Any][source]
Returns the structure of a material set based on its name.
- Parameters:
material_set_name – The name of the material set.
- Returns:
The material set structure.
- Raise:
BindleError if function call fails.
- describe_package(package_name: str) dict[str, Any][source]
Returns the structure of a package based on its name.
- Parameters:
package_name – The name of the package.
- Returns:
The package structure.
- Raise:
BindleError if function call fails.
- describe_resource(resource_id: str) dict[str, Any][source]
Returns the structure of a resource based on its ID.
- Parameters:
resource_id – The id of the resource.
- Returns:
The resource structure.
- Raise:
BindleError if function call fails.
- describe_software_application(software_application_name: str) dict[str, Any][source]
Returns the structure of a software application based on its name.
- Parameters:
software_application_name – The name of the software application.
- Returns:
The software application structure.
- Raise:
BindleError if function call fails.
- describe_versionset_group(versionset_group_name: str) dict[str, Any][source]
Returns the structure of a versionset group based on its name.
- Parameters:
versionset_group_name – The name of the versionset group.
- Returns:
The versionset group structure.
- Raise:
BindleError if function call fails.
- find_bindles_by_owner_with_alias(alias: str) dict[str, Any][source]
Returns all the bindles owned by a user.
- Parameters:
alias – The alias of the user.
- Returns:
The bindles owned by the user.
- Raise:
BindleError if function call fails.
- find_bindles_by_owner_with_team_id(team_id: str) dict[str, Any][source]
Returns all the bindles owned by a team.
- Parameters:
team_id – The id of the team.
- Returns:
The bindles owned by the team.
- Raise:
BindleError if function call fails.
- invalidate_client_cache() None[source]
Clears the cached client, if caching is enabled.
This method allows manually invalidating the cached client, forcing a new client instance to be created on the next access. Useful if AWS credentials have changed or if there’s a need to connect to a different region within the same instance lifecycle.
- Returns:
None.
- Raises:
BindleError – Raises an error if caching is not enabled for this instance.