######################## Akeyless Python Cloud Id ########################
Retrieves cloud identity
Currently, AWS, GCP, Azure and Alibaba Cloud are supported. In order to get cloud identity you should import this package and call the relevant method per your chosen CSP:
- AWS: "generate" (If no aws access id/key and token are provided they will be retrieved automatically from the default session.)
- GCP: "generateGcp"
- Azure: "generateAzure"
- Alibaba Cloud: "generateAlibaba" (If no access key/secret are provided they will be retrieved from environment variables or an ECS RAM role.)
Minimum requirements
- Python 3.5+
- urllib3 >= 1.15
- requests
Optional Dependencies
- boto3
- google-auth
- azure-identity
Installation
.. code:: pip install akeyless-python-cloud-id
AWS:
To install with AWS:
.. code::
pip install akeyless-python-cloud-id[aws]
The following additional packages will be installed:
- boto3
GCP:
To install with GCP:
.. code::
pip install akeyless-python-cloud-id[gcp]
The following additional packages will be installed:
- google-auth
To install with Azure:
.. code::
pip install akeyless-python-cloud-id[azure]
The following additional packages will be installed:
- azure-identity
Usage
Such code can be used, for example, in order to retrieve secrets from Akeyless as part of AWS Code Pipeline:
.. code:: pip install git+https://github.com/akeylesslabs/akeyless-python-sdk
import akeyless_api_gateway
from akeyless_cloud_id import CloudId
configuration = akeyless_api_gateway.Configuration()
configuration.host="http://<api-gateway-host>:<port>"
api_instance = akeyless_api_gateway.DefaultApi(akeyless_api_gateway.ApiClient(configuration))
cloud_id = CloudId()
# for AWS use:
id = cloud_id.generate()
# For Azure use:
id = cloud_id.generateAzure()
# For GCP use:
id = cloud_id.generateGcp()
# For Alibaba Cloud use:
id = cloud_id.generateAlibaba()
access_id = event['CodePipeline.job']['data']['actionConfiguration']['configuration']['UserParameters']
auth_response = api_instance.auth(access_id, access_type="aws_iam", cloud_id=id)
token = auth_response.token
postgresPassword = api_instance.get_secret_value("PostgresPassword", token)
License
This SDK is distributed under the Apache License, Version 2.0_ see LICENSE.txt for more information.
.. _Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Metadata
Release files for akeyless-cloud-id 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| akeyless_cloud_id-0.3.2.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| akeyless_cloud_id-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.7 kB
Release files / akeyless_cloud_id-0.3.2.tar.gz
| Download URL | akeyless_cloud_id-0.3.2.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2146b912b2c4e591a8839a9b95029a231c5e4ad8f083f7e2f12e6c8a6302ae95
|
|
BLAKE2b-256 checksum How to use checksums |
8348077dc70c5f3a892604723f50a3a7922d63a5165f0a50f942fda0494413f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / akeyless_cloud_id-0.3.2-py3-none-any.whl
| Download URL | akeyless_cloud_id-0.3.2-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fabe460d7a629c9e089a639c5b9eab8280a1b406996e1b913e8fef4420ab1cb6
|
|
BLAKE2b-256 checksum How to use checksums |
d04719ad227de9f4ab1fa8e4493282c063c2f121ca0932b05efad7699b95f55f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|