Skip to main content

######################## 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)

Source distribution for akeyless-cloud-id 0.3.2
File Size Uploaded
akeyless_cloud_id-0.3.2.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akeyless-cloud-id 0.3.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

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