All URIs are relative to https://api.au.sumologic.com/api
Method | HTTP request | Description |
---|---|---|
CreateAccessKey | Post /v1/accessKeys | Create an access key. |
DeleteAccessKey | Delete /v1/accessKeys/{id} | Delete an access key. |
ListAccessKeys | Get /v1/accessKeys | List all access keys. |
ListPersonalAccessKeys | Get /v1/accessKeys/personal | List personal keys. |
UpdateAccessKey | Put /v1/accessKeys/{id} | Update an access key. |
AccessKey CreateAccessKey(ctx).AccessKeyCreateRequest(accessKeyCreateRequest).Execute()
Create an access key.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
accessKeyCreateRequest := *openapiclient.NewAccessKeyCreateRequest("automation access key") // AccessKeyCreateRequest |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AccessKeyManagementApi.CreateAccessKey(context.Background()).AccessKeyCreateRequest(accessKeyCreateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeyManagementApi.CreateAccessKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAccessKey`: AccessKey
fmt.Fprintf(os.Stdout, "Response from `AccessKeyManagementApi.CreateAccessKey`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAccessKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
accessKeyCreateRequest | AccessKeyCreateRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAccessKey(ctx, id).Execute()
Delete an access key.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The accessId of the access key to delete.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AccessKeyManagementApi.DeleteAccessKey(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeyManagementApi.DeleteAccessKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The accessId of the access key to delete. |
Other parameters are passed through a pointer to a apiDeleteAccessKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedListAccessKeysResult ListAccessKeys(ctx).Limit(limit).Token(token).Execute()
List all access keys.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := int32(56) // int32 | Limit the number of access keys returned in the response. The number of access keys returned may be less than the `limit`. (optional) (default to 100)
token := "token_example" // string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. `token` is set to null when no more pages are left. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AccessKeyManagementApi.ListAccessKeys(context.Background()).Limit(limit).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeyManagementApi.ListAccessKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAccessKeys`: PaginatedListAccessKeysResult
fmt.Fprintf(os.Stdout, "Response from `AccessKeyManagementApi.ListAccessKeys`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListAccessKeysRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Limit the number of access keys returned in the response. The number of access keys returned may be less than the `limit`. | [default to 100] |
token | string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. `token` is set to null when no more pages are left. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAccessKeysResult ListPersonalAccessKeys(ctx).Execute()
List personal keys.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AccessKeyManagementApi.ListPersonalAccessKeys(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeyManagementApi.ListPersonalAccessKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListPersonalAccessKeys`: ListAccessKeysResult
fmt.Fprintf(os.Stdout, "Response from `AccessKeyManagementApi.ListPersonalAccessKeys`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListPersonalAccessKeysRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccessKeyPublic UpdateAccessKey(ctx, id).AccessKeyUpdateRequest(accessKeyUpdateRequest).Execute()
Update an access key.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | The accessId of the access key to update.
accessKeyUpdateRequest := *openapiclient.NewAccessKeyUpdateRequest(true) // AccessKeyUpdateRequest |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AccessKeyManagementApi.UpdateAccessKey(context.Background(), id).AccessKeyUpdateRequest(accessKeyUpdateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccessKeyManagementApi.UpdateAccessKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAccessKey`: AccessKeyPublic
fmt.Fprintf(os.Stdout, "Response from `AccessKeyManagementApi.UpdateAccessKey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The accessId of the access key to update. |
Other parameters are passed through a pointer to a apiUpdateAccessKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
accessKeyUpdateRequest | AccessKeyUpdateRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]