> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/go/go-bundle/sdks/objectstoragemanagement/api/accesskeysapi.md).

# AccesskeysApi

All URIs are relative to *<https://s3.ionos.com>*

| Method                                        | HTTP request                            | Description             |
| --------------------------------------------- | --------------------------------------- | ----------------------- |
| [**AccesskeysDelete**](#AccesskeysDelete)     | **Delete** /accesskeys/{accesskeyId}    | Delete AccessKey        |
| [**AccesskeysFindById**](#AccesskeysFindById) | **Get** /accesskeys/{accesskeyId}       | Retrieve AccessKey      |
| [**AccesskeysGet**](#AccesskeysGet)           | **Get** /accesskeys                     | Retrieve all Accesskeys |
| [**AccesskeysPost**](#AccesskeysPost)         | **Post** /accesskeys                    | Create AccessKey        |
| [**AccesskeysPut**](#AccesskeysPut)           | **Put** /accesskeys/{accesskeyId}       | Ensure AccessKey        |
| [**AccesskeysRenew**](#AccesskeysRenew)       | **Put** /accesskeys/{accesskeyId}/renew | Ensure AccessKey        |

## AccesskeysDelete

```go
var result  = AccesskeysDelete(ctx, accesskeyId)
                      .Execute()
```

Delete AccessKey

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    accesskeyId := "fb68d39a-5706-51b4-b2b2-7b4bf9cbf0af" // string | The ID (UUID) of the AccessKey.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resp, err := apiClient.AccesskeysApi.AccesskeysDelete(context.Background(), accesskeyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
}
```

### Path Parameters

| Name            | Type                | Description                                                                 | Notes |
| --------------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**         | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **accesskeyId** | **string**          | The ID (UUID) of the AccessKey.                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysDeleteRequest struct via the builder pattern

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

### Return type

(empty response body)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## AccesskeysFindById

```go
var result AccessKeyRead = AccesskeysFindById(ctx, accesskeyId)
                      .Execute()
```

Retrieve AccessKey

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    accesskeyId := "fb68d39a-5706-51b4-b2b2-7b4bf9cbf0af" // string | The ID (UUID) of the AccessKey.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resource, resp, err := apiClient.AccesskeysApi.AccesskeysFindById(context.Background(), accesskeyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `AccesskeysFindById`: AccessKeyRead
    fmt.Fprintf(os.Stdout, "Response from `AccesskeysApi.AccesskeysFindById`: %v\n", resource)
}
```

### Path Parameters

| Name            | Type                | Description                                                                 | Notes |
| --------------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**         | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **accesskeyId** | **string**          | The ID (UUID) of the AccessKey.                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysFindByIdRequest struct via the builder pattern

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

### Return type

[**AccessKeyRead**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyread.md)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## AccesskeysGet

```go
var result AccessKeyReadList = AccesskeysGet(ctx)
                      .Offset(offset)
                      .Limit(limit)
                      .FilterAccesskeyId(filterAccesskeyId)
                      .Execute()
```

Retrieve all Accesskeys

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    offset := int32(0) // int32 | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. (optional) (default to 0)
    limit := int32(100) // int32 | The maximum number of elements to return. Use together with offset for pagination. (optional) (default to 100)
    filterAccesskeyId := "filterAccesskeyId_example" // string | The accesskey ID to filter by. (optional)

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resource, resp, err := apiClient.AccesskeysApi.AccesskeysGet(context.Background()).Offset(offset).Limit(limit).FilterAccesskeyId(filterAccesskeyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `AccesskeysGet`: AccessKeyReadList
    fmt.Fprintf(os.Stdout, "Response from `AccesskeysApi.AccesskeysGet`: %v\n", resource)
}
```

### Path Parameters

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysGetRequest struct via the builder pattern

| Name                  | Type       | Description                                                                                                           | Notes             |
| --------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------- | ----------------- |
| **offset**            | **int32**  | The first element (of the total list of elements) to include in the response. Use together with limit for pagination. | \[default to 0]   |
| **limit**             | **int32**  | The maximum number of elements to return. Use together with offset for pagination.                                    | \[default to 100] |
| **filterAccesskeyId** | **string** | The accesskey ID to filter by.                                                                                        |                   |

### Return type

[**AccessKeyReadList**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyreadlist.md)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## AccesskeysPost

```go
var result AccessKeyRead = AccesskeysPost(ctx)
                      .AccessKeyCreate(accessKeyCreate)
                      .Execute()
```

Create AccessKey

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    accessKeyCreate := *openapiclient.NewAccessKeyCreate(*openapiclient.NewAccessKey("Access key details", "00000Du4KiV8A1tGUbjI2Ky1YmXqXnCpaQpgWw6_1V5fhMPRnAAAAAEIkfcQAAAAAAiR9xAioHCB_FWuNJ4un864Pouw", "tFVkUARsoeCdntQs2jVSyGG6TMPfPZ+ghnsWj/gG")) // AccessKeyCreate | AccessKey to create.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resource, resp, err := apiClient.AccesskeysApi.AccesskeysPost(context.Background()).AccessKeyCreate(accessKeyCreate).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `AccesskeysPost`: AccessKeyRead
    fmt.Fprintf(os.Stdout, "Response from `AccesskeysApi.AccesskeysPost`: %v\n", resource)
}
```

### Path Parameters

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysPostRequest struct via the builder pattern

| Name                | Type                                                                                              | Description          | Notes |
| ------------------- | ------------------------------------------------------------------------------------------------- | -------------------- | ----- |
| **accessKeyCreate** | [**AccessKeyCreate**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeycreate.md) | AccessKey to create. |       |

### Return type

[**AccessKeyRead**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyread.md)

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## AccesskeysPut

```go
var result AccessKeyRead = AccesskeysPut(ctx, accesskeyId)
                      .AccessKeyEnsure(accessKeyEnsure)
                      .Execute()
```

Ensure AccessKey

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    accesskeyId := "fb68d39a-5706-51b4-b2b2-7b4bf9cbf0af" // string | The ID (UUID) of the AccessKey.
    accessKeyEnsure := *openapiclient.NewAccessKeyEnsure(*openapiclient.NewAccessKey("Access key details", "00000Du4KiV8A1tGUbjI2Ky1YmXqXnCpaQpgWw6_1V5fhMPRnAAAAAEIkfcQAAAAAAiR9xAioHCB_FWuNJ4un864Pouw", "tFVkUARsoeCdntQs2jVSyGG6TMPfPZ+ghnsWj/gG")) // AccessKeyEnsure | update AccessKey

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resource, resp, err := apiClient.AccesskeysApi.AccesskeysPut(context.Background(), accesskeyId).AccessKeyEnsure(accessKeyEnsure).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `AccesskeysPut`: AccessKeyRead
    fmt.Fprintf(os.Stdout, "Response from `AccesskeysApi.AccesskeysPut`: %v\n", resource)
}
```

### Path Parameters

| Name            | Type                | Description                                                                 | Notes |
| --------------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**         | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **accesskeyId** | **string**          | The ID (UUID) of the AccessKey.                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysPutRequest struct via the builder pattern

| Name                | Type                                                                                              | Description      | Notes |
| ------------------- | ------------------------------------------------------------------------------------------------- | ---------------- | ----- |
| **accessKeyEnsure** | [**AccessKeyEnsure**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyensure.md) | update AccessKey |       |

### Return type

[**AccessKeyRead**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyread.md)

### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## AccesskeysRenew

```go
var result AccessKeyRead = AccesskeysRenew(ctx, accesskeyId)
                      .Execute()
```

Ensure AccessKey

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    objectstoragemanagement "github.com/ionos-cloud/sdk-go-bundle/products/objectstoragemanagement"
    "github.com/ionos-cloud/sdk-go-bundle/shared"
)

func main() {
    accesskeyId := "fb68d39a-5706-51b4-b2b2-7b4bf9cbf0af" // string | The ID (UUID) of the AccessKey that should be ensured.

    configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := objectstoragemanagement.NewAPIClient(configuration)
    resource, resp, err := apiClient.AccesskeysApi.AccesskeysRenew(context.Background(), accesskeyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AccesskeysApi.AccesskeysRenew``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `AccesskeysRenew`: AccessKeyRead
    fmt.Fprintf(os.Stdout, "Response from `AccesskeysApi.AccesskeysRenew`: %v\n", resource)
}
```

### Path Parameters

| Name            | Type                | Description                                                                 | Notes |
| --------------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**         | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **accesskeyId** | **string**          | The ID (UUID) of the AccessKey that should be ensured.                      |       |

### Other Parameters

Other parameters are passed through a pointer to an apiAccesskeysRenewRequest struct via the builder pattern

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

### Return type

[**AccessKeyRead**](/cloud/go/go-bundle/sdks/objectstoragemanagement/models/accesskeyread.md)

### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/go/go-bundle/sdks/objectstoragemanagement/api/accesskeysapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
