IBM Cloud Secrets Manager Management Python SDK
A Python client library to interact with the IBM Cloud® Secrets Manager Instance Management APIs.
Important: This SDK is for use with instances of the IBM Cloud Secrets Manager Vault Enterprise plan only. It is not compatible with other Secrets Manager plans.
Table of Contents
Overview
The IBM Cloud Secrets Manager Management Python SDK allows developers to programmatically interact with the following IBM Cloud services:
| Service name | Imported class name |
|---|---|
| Secrets Manager Management | SecretsManagerInstanceManagementV2 |
Prerequisites
- An IBM Cloud account.
- A Secrets Manager service instance with the Vault Enterprise plan.
- An IBM Cloud API key that allows the SDK to access your account.
- Python 3.9 or above.
Installation
To install, use pip or easy_install:
pip install --upgrade "ibm-secrets-manager-instance-management-sdk"
or
easy_install --upgrade "ibm-secrets-manager-instance-management-sdk"
Authentication
Secrets Manager uses token-based Identity and Access Management (IAM) authentication.
With IAM authentication, you supply an API key that is used to generate an access token. Then, the access token is included in each API request to Secrets Manager. Access tokens are valid for a limited amount of time and must be regenerated.
Authentication for this SDK is accomplished by using IAM authenticators. Import authenticators from ibm_cloud_sdk_core.authenticators.
Examples
Programmatic credentials
from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
secretsManagerInstanceManagement = SecretsManagerInstanceManagementV2(
authenticator=IAMAuthenticator(apikey='<IBM_CLOUD_API_KEY>')
)
To learn more about IAM authenticators and how to use them in your Python application, see the IBM Python SDK Core documentation.
Using the SDK
Basic usage
- Use the
set_service_urlmethod to set the endpoint URL that is specific to your Secrets Manager service instance. To find your endpoint URL, you can copy it from the Endpoints section on the Overview page in the Secrets Manager UI.
Examples
Construct a service client and use it to generate an admin token and get instance details.
Here's an example secrets_manager_instance_management.py file:
from ibm_cloud_sdk_core.authenticators.iam_authenticator import IAMAuthenticator
from ibm_secrets_manager_instance_management_sdk.secrets_manager_instance_management_v2 import *
secretsManagerInstanceManagement = SecretsManagerInstanceManagementV2(
authenticator=IAMAuthenticator(apikey='<IBM_CLOUD_API_KEY>')
)
secretsManagerInstanceManagement.set_service_url('<SERVICE_URL>')
# Generate admin token
response = secretsManagerInstanceManagement.admin_token_generate(
instance_crn='<INSTANCE_CRN>'
)
print('Admin token generated!')
# Get instance details
response = secretsManagerInstanceManagement.instance_details(
instance_crn='<INSTANCE_CRN>'
)
print('Instance details:')
print(response.result)
Replace the apikey, SERVICE_URL, and INSTANCE_CRN values. Then use the python secrets_manager_instance_management.py command to run your
application.
For more information and IBM Cloud SDK usage examples for Python, see the IBM Cloud SDK Common documentation.
Issues
If you encounter an issue with the project, you're welcome to submit a bug report to help us improve.
Contributing
For general contribution guidelines, see CONTRIBUTING.
License
This SDK project is released under the Apache 2.0 license. The license's full text can be found in LICENSE.
Metadata
Release files for ibm-secrets-manager-instance-management-sdk 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ibm_secrets_manager_instance_management_sdk-2.0.0.tar.gz | 44.1 kB | With provenance | Details for ibm_secrets_manager_instance_management_sdk-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ibm_secrets_manager_instance_management_sdk-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for ibm_secrets_manager_instance_management_sdk-2.0.0-py3-none-any.whl |
Total release size: 61.3 kB
Release files / ibm_secrets_manager_instance_management_sdk-2.0.0.tar.gz
| Download URL | ibm_secrets_manager_instance_management_sdk-2.0.0.tar.gz |
|---|---|
| Size | 44.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88a0840df200a9afd8e1f7f68bb5dff44b9d9331308e71503bbf90e11d71285b
|
|
BLAKE2b-256 checksum How to use checksums |
fa27b02b027a3b2c0815e2f882d0c91e9bf75714e7dc1da8713897c8877d6fbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logRelease files / ibm_secrets_manager_instance_management_sdk-2.0.0-py3-none-any.whl
| Download URL | ibm_secrets_manager_instance_management_sdk-2.0.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2193bbf2301e5008997308096480a9be3043867e1725cb47f282c316191dc2ee
|
|
BLAKE2b-256 checksum How to use checksums |
63cf870d182ec36b0ba1f33dcc45370ff9b4eb2c54ef61ed042568fbe0598563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logSecurity for ibm-secrets-manager-instance-management-sdk 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ibm_secrets_manager_instance_management_sdk-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.