All URIs are relative to https://api.aptible.com
Method | HTTP request | Description |
---|---|---|
CreateCertificate | Post /accounts/{account_id}/certificates | create certificate |
DeleteCertificate | Delete /certificates/{id} | delete certificate |
GetCertificate | Get /certificates/{id} | show certificate |
ListCertificatesForAccount | Get /accounts/{account_id}/certificates | list certificates |
PatchCertificate | Patch /certificates/{id} | update certificate |
UpdateCertificate | Put /certificates/{id} | update certificate |
Certificate CreateCertificate(ctx, accountId).CreateCertificateRequest(createCertificateRequest).Execute()
create certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
accountId := int32(56) // int32 | account_id
createCertificateRequest := *openapiclient.NewCreateCertificateRequest("CertificateBody_example", "PrivateKey_example") // CreateCertificateRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.CreateCertificate(context.Background(), accountId).CreateCertificateRequest(createCertificateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.CreateCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCertificate`: Certificate
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.CreateCertificate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
accountId | int32 | account_id |
Other parameters are passed through a pointer to a apiCreateCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createCertificateRequest | CreateCertificateRequest | |
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCertificate(ctx, id).Execute()
delete certificate
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)
r, err := apiClient.CertificatesAPI.DeleteCertificate(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.DeleteCertificate``: %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 | int32 | id |
Other parameters are passed through a pointer to a apiDeleteCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Certificate GetCertificate(ctx, id).Execute()
show certificate
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.CertificatesAPI.GetCertificate(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.GetCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCertificate`: Certificate
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.GetCertificate`: %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 apiGetCertificateRequest 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]
ListCertificatesForAccount200Response ListCertificatesForAccount(ctx, accountId).Page(page).Execute()
list certificates
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
accountId := int32(56) // int32 | account_id
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesAPI.ListCertificatesForAccount(context.Background(), accountId).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.ListCertificatesForAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCertificatesForAccount`: ListCertificatesForAccount200Response
fmt.Fprintf(os.Stdout, "Response from `CertificatesAPI.ListCertificatesForAccount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
accountId | int32 | account_id |
Other parameters are passed through a pointer to a apiListCertificatesForAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | current page of results for pagination |
ListCertificatesForAccount200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchCertificate(ctx, id).UpdateCertificateRequest(updateCertificateRequest).Execute()
update certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
updateCertificateRequest := *openapiclient.NewUpdateCertificateRequest() // UpdateCertificateRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CertificatesAPI.PatchCertificate(context.Background(), id).UpdateCertificateRequest(updateCertificateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.PatchCertificate``: %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 | int32 | id |
Other parameters are passed through a pointer to a apiPatchCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCertificateRequest | UpdateCertificateRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateCertificate(ctx, id).UpdateCertificateRequest(updateCertificateRequest).Execute()
update certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
updateCertificateRequest := *openapiclient.NewUpdateCertificateRequest() // UpdateCertificateRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CertificatesAPI.UpdateCertificate(context.Background(), id).UpdateCertificateRequest(updateCertificateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesAPI.UpdateCertificate``: %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 | int32 | id |
Other parameters are passed through a pointer to a apiUpdateCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateCertificateRequest | UpdateCertificateRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]