All URIs are relative to https://api.aptible.com
Method | HTTP request | Description |
---|---|---|
GetDatabaseCredential | Get /database_credentials/{id} | show database_credential |
ListDatabaseCredentialsForDatabase | Get /databases/{database_id}/database_credentials | list database_credentials |
DatabaseCredential GetDatabaseCredential(ctx, id).Execute()
show database_credential
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseCredentialsAPI.GetDatabaseCredential(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseCredentialsAPI.GetDatabaseCredential``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDatabaseCredential`: DatabaseCredential
fmt.Fprintf(os.Stdout, "Response from `DatabaseCredentialsAPI.GetDatabaseCredential`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiGetDatabaseCredentialRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListDatabaseCredentialsForDatabase200Response ListDatabaseCredentialsForDatabase(ctx, databaseId).Page(page).Execute()
list database_credentials
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
databaseId := int32(56) // int32 | database_id
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DatabaseCredentialsAPI.ListDatabaseCredentialsForDatabase(context.Background(), databaseId).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DatabaseCredentialsAPI.ListDatabaseCredentialsForDatabase``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDatabaseCredentialsForDatabase`: ListDatabaseCredentialsForDatabase200Response
fmt.Fprintf(os.Stdout, "Response from `DatabaseCredentialsAPI.ListDatabaseCredentialsForDatabase`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
databaseId | int32 | database_id |
Other parameters are passed through a pointer to a apiListDatabaseCredentialsForDatabaseRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | current page of results for pagination |
ListDatabaseCredentialsForDatabase200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]