All URIs are relative to https://cloud.mongodb.com
Method | HTTP request | Description |
---|---|---|
GetAWSCustomDNS | Get /api/atlas/v2/groups/{groupId}/awsCustomDNS | Return One Custom DNS Configuration for Atlas Clusters on AWS |
ToggleAWSCustomDNS | Patch /api/atlas/v2/groups/{groupId}/awsCustomDNS | Toggle State of One Custom DNS Configuration for Atlas Clusters on AWS |
AWSCustomDNSEnabled GetAWSCustomDNS(ctx, groupId).Execute()
Return One Custom DNS Configuration for Atlas Clusters on AWS
package main
import (
"context"
"fmt"
"os"
"go.mongodb.org/atlas-sdk/v20231115008/admin"
)
func main() {
apiKey := os.Getenv("MONGODB_ATLAS_PUBLIC_KEY")
apiSecret := os.Getenv("MONGODB_ATLAS_PRIVATE_KEY")
sdk := admin.NewClient(admin.UseDigestAuth(apiKey, apiSecret))
groupId := "32b6e34b3d91647abb20e7b8" // string |
resp, r, err := sdk.AWSClustersDNSApi.GetAWSCustomDNS(context.Background(), groupId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSClustersDNSApi.GetAWSCustomDNS``: %v\n", err)
apiError := admin.AsError(err)
fmt.Fprintf(os.Stderr, "Error obj: %v\n", apiError)
}
// response from `GetAWSCustomDNS`: AWSCustomDNSEnabled
fmt.Fprintf(os.Stdout, "Response from `AWSClustersDNSApi.GetAWSCustomDNS`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access. NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups. |
Other parameters are passed through a pointer to a apiGetAWSCustomDNSRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/vnd.atlas.2023-01-01+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AWSCustomDNSEnabled ToggleAWSCustomDNS(ctx, groupId, aWSCustomDNSEnabled AWSCustomDNSEnabled).Execute()
Toggle State of One Custom DNS Configuration for Atlas Clusters on AWS
package main
import (
"context"
"fmt"
"os"
"go.mongodb.org/atlas-sdk/v20231115008/admin"
)
func main() {
apiKey := os.Getenv("MONGODB_ATLAS_PUBLIC_KEY")
apiSecret := os.Getenv("MONGODB_ATLAS_PRIVATE_KEY")
sdk := admin.NewClient(admin.UseDigestAuth(apiKey, apiSecret))
groupId := "32b6e34b3d91647abb20e7b8" // string |
aWSCustomDNSEnabled := *openapiclient.NewAWSCustomDNSEnabled(false) // AWSCustomDNSEnabled |
resp, r, err := sdk.AWSClustersDNSApi.ToggleAWSCustomDNS(context.Background(), groupId, &aWSCustomDNSEnabled).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSClustersDNSApi.ToggleAWSCustomDNS``: %v\n", err)
apiError := admin.AsError(err)
fmt.Fprintf(os.Stderr, "Error obj: %v\n", apiError)
}
// response from `ToggleAWSCustomDNS`: AWSCustomDNSEnabled
fmt.Fprintf(os.Stdout, "Response from `AWSClustersDNSApi.ToggleAWSCustomDNS`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string | Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access. NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups. |
Other parameters are passed through a pointer to a apiToggleAWSCustomDNSRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
aWSCustomDNSEnabled | AWSCustomDNSEnabled | Enables or disables the custom DNS configuration for AWS clusters in the specified project. |
- Content-Type: application/vnd.atlas.2023-01-01+json
- Accept: application/vnd.atlas.2023-01-01+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]