create_storage

imerit_ango.sdk.SDK.

create_storage(storage_data)

This function enables the integration of cloud storage into your organization, allowing you to define the storage provider and supply the relevant access credentials and configuration parameters.

Parameters

  • storage_data: Storage

    • A Storage object containing the following attributes:

    • name: string

      • The name of the storage instance.

    • provider: StorageProvider

      • The cloud storage provider. Options:

        • StorageProvider.AWS

        • StorageProvider.GCP

        • StorageProvider.AZURE

    • public_key: string

      • The public access key for your cloud storage account.

    • private_key: string

      • The private access key for your cloud storage account.

    • region: string, default "eu-central-1"

      • The geographical region where your storage is located.

    • credentials: string

      • Additional credentials required for accessing the cloud storage.

Returns:

  • output: dict

Example

import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.storage import Storage
from imerit_ango.models.enums import StorageProvider

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')

ango_sdk = SDK(api_key)

sdk_response = ango_sdk.create_storage(Storage(name="My Storage",
                                               provider=StorageProvider.AWS,
                                               public_key='<YOUR PUBLIC KEY>',
                                               private_key='<YOUR PRIVATE KEY>',
                                               region='<YOUR REGION>',
                                               credentials='<YOUR CREDENTIALS>'))

Last updated