userobjectstorage
Go API client for userobjectstorage
Overview
The IONOS Object Storage API for user-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems.
API References
Object Storage Management API Reference for managing Access Keys
Object Storage API Reference for user-owned buckets - current document
User documentation
IONOS Object Storage User Guide
Endpoints for user-owned buckets
Frankfurt, Germany
de
User-owned
https://s3.eu-central-1.ionoscloud.com,
s3 legacy endpoint: https://s3-de-central.profitbricks.com
Berlin, Germany
eu-central-2
User-owned
https://s3.eu-central-2.ionoscloud.com
Logroño, Spain
eu-south-2
User-owned
https://s3.eu-south-2.ionoscloud.com
Changelog
30.05.2024 Renaming to Storage Object API for user-owned buckets
25.09.2023 Storage object operation names are now used for headlines.
20.09.2023 Improved description for HeadBucket and GetBucketLocation.
13.09.2023 Improved description for Bucket Policy-related operations.
06.09.2023 Improved description for Bucket ACL-related operations.
30.08.2023 Improved description for Object Lock-related operations.
24.07.2023 Improved description for ListObjectsV2.
17.07.2023 Improved description for ListBuckets.
07.07.2023 Improved description for PutBucketReplication, GetBucketReplication, DeleteBucketReplication.
05.07.2023 Improved description for PutBucketVersioning and GetBucketVersioning.
29.06.2023 Improved description for PutBucketLifecycleConfiguration.
19.04.2023 Improved description on how to use the encryption with IONOS Object Storage managed (SSE-S3) and customer managed keys (SSE-C) for PutBucketEncryption and PutObject.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
API version: 2.0.15
Package version: products/userobjectstorage/v2.0.1
Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://docs.ionos.com/support/general-information/contact-information
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optionalPut the package under your project folder and add the following in import:
import "./userobjectstorage"Documentation for API Endpoints
All URIs are relative to https://s3.eu-central-1.ionoscloud.com
Authentication
All available server URLs are:
https://s3.eu-central-1.ionoscloud.com - URL for `de` (Frankfurt, Germany)
https://s3.de-central.profitbricks.com - Legacy URL for `de` (Frankfurt, Germany)
https://s3.eu-central-2.ionoscloud.com - URL for `eu-central-2` (Berlin, Germany)
https://s3.eu-south-2.ionoscloud.com - URL for `eu-south-2` (Logroño, Spain)
By default, https://s3.eu-central-1.ionoscloud.com is used, however this can be overriden at authentication, either by setting the IONOS_API_URL environment variable or by specifying the hostUrl parameter when initializing the sdk client.
NOTE: We recommend passing the URL without the https:// or http:// prefix. The SDK checks and adds it if necessary when configurations are created using NewConfiguration or NewConfigurationFromEnv. This is to avoid issues caused by typos in the prefix that cannot be easily detected and debugged.
In order to authenticate, the only credentials needed are the IONOS S3 access and secret keys, username and password or token are not required. Also, a middleware function needs to be added to the configuration to sign the requests with the IONOS S3 credentials.
configuration := shared.NewConfiguration("", "", "", hostUrl)
configuration.MiddlewareWithError = shared.SignerMiddleware(region, "s3", s3AccessKey, s3SecretKey)
client := userobjectstorage.NewAPIClient(configuration)
Environment variables can also be used. The sdk uses the following variables:
IONOS_S3_ACCESS_KEY - the access key for the IONOS object storage
IONOS_S3_SECRET_KEY - the secret key for the IONOS object storage
IONOS_API_URL - to specify the API server URL
In this case, the client configuration needs to be initialized using NewConfigurationFromEnv().
configuration := shared.NewConfigurationFromEnv()
configuration.MiddlewareWithError = shared.SignerMiddleware(
region, "s3", os.Getenv(IonosS3AccessKeyEnvVar), os.Getenv(IonosS3SecretKeyEnvVar),
)
client := userobjectstorage.NewAPIClient(configuration)
Documentation For Models
All URIs are relative to https://s3.eu-central-1.ionoscloud.com
Last updated
