Skip to content

Latest commit

 

History

History
990 lines (635 loc) · 31.4 KB

DomainsAPI.md

File metadata and controls

990 lines (635 loc) · 31.4 KB

\DomainsAPI

All URIs are relative to https://api.linode.com

Method HTTP request Description
DeleteDomain Delete /{apiVersion}/domains/{domainId} Delete a domain
DeleteDomainRecord Delete /{apiVersion}/domains/{domainId}/records/{recordId} Delete a domain record
GetDomain Get /{apiVersion}/domains/{domainId} Get a domain
GetDomainRecord Get /{apiVersion}/domains/{domainId}/records/{recordId} Get a domain record
GetDomainRecords Get /{apiVersion}/domains/{domainId}/records List domain records
GetDomainZone Get /{apiVersion}/domains/{domainId}/zone-file Get a domain zone file
GetDomains Get /{apiVersion}/domains List domains
PostCloneDomain Post /{apiVersion}/domains/{domainId}/clone Clone a domain
PostDomain Post /{apiVersion}/domains Create a domain
PostDomainRecord Post /{apiVersion}/domains/{domainId}/records Create a domain record
PostImportDomain Post /{apiVersion}/domains/import Import a domain
PutDomain Put /{apiVersion}/domains/{domainId} Update a domain
PutDomainRecord Put /{apiVersion}/domains/{domainId}/records/{recordId} Update a domain record

DeleteDomain

map[string]interface{} DeleteDomain(ctx, apiVersion, domainId).Execute()

Delete a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain to access.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.DeleteDomain(context.Background(), apiVersion, domainId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.DeleteDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteDomain`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.DeleteDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain to access.

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteDomainRecord

map[string]interface{} DeleteDomainRecord(ctx, apiVersion, domainId, recordId).Execute()

Delete a domain record

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain whose Record you are accessing.
	recordId := int32(56) // int32 | The ID of the Record you are accessing.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.DeleteDomainRecord(context.Background(), apiVersion, domainId, recordId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.DeleteDomainRecord``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteDomainRecord`: map[string]interface{}
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.DeleteDomainRecord`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain whose Record you are accessing.
recordId int32 The ID of the Record you are accessing.

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDomain

Domain GetDomain(ctx, apiVersion, domainId).Execute()

Get a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain to access.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.GetDomain(context.Background(), apiVersion, domainId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.GetDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDomain`: Domain
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.GetDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain to access.

Other Parameters

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

Name Type Description Notes

Return type

Domain

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDomainRecord

GetDomainRecords200ResponseDataInner GetDomainRecord(ctx, apiVersion, domainId, recordId).Execute()

Get a domain record

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain whose Record you are accessing.
	recordId := int32(56) // int32 | The ID of the Record you are accessing.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.GetDomainRecord(context.Background(), apiVersion, domainId, recordId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.GetDomainRecord``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDomainRecord`: GetDomainRecords200ResponseDataInner
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.GetDomainRecord`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain whose Record you are accessing.
recordId int32 The ID of the Record you are accessing.

Other Parameters

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

Name Type Description Notes

Return type

GetDomainRecords200ResponseDataInner

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDomainRecords

GetDomainRecords200Response GetDomainRecords(ctx, apiVersion, domainId).Page(page).PageSize(pageSize).Execute()

List domain records

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain we are accessing Records for.
	page := int32(56) // int32 | The page of a collection to return. (optional) (default to 1)
	pageSize := int32(56) // int32 | The number of items to return per page. (optional) (default to 100)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.GetDomainRecords(context.Background(), apiVersion, domainId).Page(page).PageSize(pageSize).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.GetDomainRecords``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDomainRecords`: GetDomainRecords200Response
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.GetDomainRecords`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain we are accessing Records for.

Other Parameters

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

Name Type Description Notes

page | int32 | The page of a collection to return. | [default to 1] pageSize | int32 | The number of items to return per page. | [default to 100]

Return type

GetDomainRecords200Response

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDomainZone

GetDomainZone200Response GetDomainZone(ctx, apiVersion, domainId).Execute()

Get a domain zone file

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := "domainId_example" // string | ID of the Domain.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.GetDomainZone(context.Background(), apiVersion, domainId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.GetDomainZone``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDomainZone`: GetDomainZone200Response
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.GetDomainZone`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId string ID of the Domain.

Other Parameters

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

Name Type Description Notes

Return type

GetDomainZone200Response

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDomains

GetDomains200Response GetDomains(ctx, apiVersion).Page(page).PageSize(pageSize).Execute()

List domains

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	page := int32(56) // int32 | The page of a collection to return. (optional) (default to 1)
	pageSize := int32(56) // int32 | The number of items to return per page. (optional) (default to 100)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.GetDomains(context.Background(), apiVersion).Page(page).PageSize(pageSize).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.GetDomains``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetDomains`: GetDomains200Response
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.GetDomains`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]

Other Parameters

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

Name Type Description Notes

page | int32 | The page of a collection to return. | [default to 1] pageSize | int32 | The number of items to return per page. | [default to 100]

Return type

GetDomains200Response

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostCloneDomain

Domain PostCloneDomain(ctx, apiVersion, domainId).PostCloneDomainRequest(postCloneDomainRequest).Execute()

Clone a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := "domainId_example" // string | ID of the Domain to clone.
	postCloneDomainRequest := *openapiclient.NewPostCloneDomainRequest("example.org") // PostCloneDomainRequest | Information about the Domain to clone.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PostCloneDomain(context.Background(), apiVersion, domainId).PostCloneDomainRequest(postCloneDomainRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PostCloneDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostCloneDomain`: Domain
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PostCloneDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId string ID of the Domain to clone.

Other Parameters

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

Name Type Description Notes

postCloneDomainRequest | PostCloneDomainRequest | Information about the Domain to clone. |

Return type

Domain

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostDomain

Domain PostDomain(ctx, apiVersion).PostDomainRequest(postDomainRequest).Execute()

Create a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	postDomainRequest := *openapiclient.NewPostDomainRequest("example.org", "master") // PostDomainRequest | Information about the domain you are registering.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PostDomain(context.Background(), apiVersion).PostDomainRequest(postDomainRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PostDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostDomain`: Domain
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PostDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]

Other Parameters

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

Name Type Description Notes

postDomainRequest | PostDomainRequest | Information about the domain you are registering. |

Return type

Domain

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostDomainRecord

GetDomainRecords200ResponseDataInner PostDomainRecord(ctx, apiVersion, domainId).PostDomainRecordRequest(postDomainRecordRequest).Execute()

Create a domain record

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain we are accessing Records for.
	postDomainRecordRequest := *openapiclient.NewPostDomainRecordRequest("A") // PostDomainRecordRequest | Information about the new Record to add.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PostDomainRecord(context.Background(), apiVersion, domainId).PostDomainRecordRequest(postDomainRecordRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PostDomainRecord``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostDomainRecord`: GetDomainRecords200ResponseDataInner
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PostDomainRecord`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain we are accessing Records for.

Other Parameters

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

Name Type Description Notes

postDomainRecordRequest | PostDomainRecordRequest | Information about the new Record to add. |

Return type

GetDomainRecords200ResponseDataInner

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostImportDomain

Domain PostImportDomain(ctx, apiVersion).PostImportDomainRequest(postImportDomainRequest).Execute()

Import a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	postImportDomainRequest := *openapiclient.NewPostImportDomainRequest("example.com", "examplenameserver.com") // PostImportDomainRequest | Information about the Domain to import. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PostImportDomain(context.Background(), apiVersion).PostImportDomainRequest(postImportDomainRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PostImportDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostImportDomain`: Domain
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PostImportDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]

Other Parameters

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

Name Type Description Notes

postImportDomainRequest | PostImportDomainRequest | Information about the Domain to import. |

Return type

Domain

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutDomain

Domain PutDomain(ctx, apiVersion, domainId).Domain(domain).Execute()

Update a domain

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain to access.
	domain := *openapiclient.NewDomain() // Domain | The Domain information to update.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PutDomain(context.Background(), apiVersion, domainId).Domain(domain).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PutDomain``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutDomain`: Domain
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PutDomain`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain to access.

Other Parameters

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

Name Type Description Notes

domain | Domain | The Domain information to update. |

Return type

Domain

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutDomainRecord

GetDomainRecords200ResponseDataInner PutDomainRecord(ctx, apiVersion, domainId, recordId).PutDomainRecordRequest(putDomainRecordRequest).Execute()

Update a domain record

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
	apiVersion := "apiVersion_example" // string | __Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta. (default to "v4")
	domainId := int32(56) // int32 | The ID of the Domain whose Record you are accessing.
	recordId := int32(56) // int32 | The ID of the Record you are accessing.
	putDomainRecordRequest := *openapiclient.NewPutDomainRecordRequest() // PutDomainRecordRequest | The values to change.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.DomainsAPI.PutDomainRecord(context.Background(), apiVersion, domainId, recordId).PutDomainRecordRequest(putDomainRecordRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DomainsAPI.PutDomainRecord``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutDomainRecord`: GetDomainRecords200ResponseDataInner
	fmt.Fprintf(os.Stdout, "Response from `DomainsAPI.PutDomainRecord`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
apiVersion string Enum Call either the `v4` URL, or `v4beta` for operations still in Beta. [default to "v4"]
domainId int32 The ID of the Domain whose Record you are accessing.
recordId int32 The ID of the Record you are accessing.

Other Parameters

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

Name Type Description Notes

putDomainRecordRequest | PutDomainRecordRequest | The values to change. |

Return type

GetDomainRecords200ResponseDataInner

Authorization

personalAccessToken, oauth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]