Skip to main content

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

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_url method 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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ibm-secrets-manager-instance-management-sdk 2.0.3
File Size Uploaded Provenance Actions
ibm_secrets_manager_instance_management_sdk-2.0.3.tar.gz 44.0 kB With provenance Details for ibm_secrets_manager_instance_management_sdk-2.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ibm-secrets-manager-instance-management-sdk 2.0.3
File Interpreter ABI Platform Actions
ibm_secrets_manager_instance_management_sdk-2.0.3-py3-none-any.whl Python 3 none any Details for ibm_secrets_manager_instance_management_sdk-2.0.3-py3-none-any.whl

Total release size: 61.1 kB

Release files / ibm_secrets_manager_instance_management_sdk-2.0.3.tar.gz

Download URL ibm_secrets_manager_instance_management_sdk-2.0.3.tar.gz
Size 44.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c3b16ff13702e6b478abbfa823c3d0071d2943c7d62dc3239a5353bb2e47ae45
BLAKE2b-256 checksum
How to use checksums
fb55ec9a03d9812bc117388fb076cf56793ec62621600779efd540e56ac9e100
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 Sep 10, 2026.

Transparency log

Release files / ibm_secrets_manager_instance_management_sdk-2.0.3-py3-none-any.whl

Download URL ibm_secrets_manager_instance_management_sdk-2.0.3-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e925d80b93fcb11adff1888bd996645de18e2ed4f27367d1822ca8dea6f5c927
BLAKE2b-256 checksum
How to use checksums
5125956463808dd9e6437488547bab2c40bf6dcad765ad91e4e1a4bad2458e5f
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 Sep 10, 2026.

Transparency log

Security for ibm-secrets-manager-instance-management-sdk 2.0.3

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.

Select from 2 files

Attestation for ibm_secrets_manager_instance_management_sdk-2.0.3.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 Sep 10, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page