Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dns_destination_ips_id and ipv4_destination_backup to TeamsLocation #3699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dfialho
Copy link
Contributor

@dfialho dfialho commented Dec 4, 2024

Add these missing fields to TeamsLocation

Description

Has your change been tested?

Ran it against my account and updated unit tests.

ctx := context.Background()
accountId := ""
locations, _, err := api.TeamsLocations(ctx, accountId)
if err != nil {
	log.Fatal(err)
}
for _, l := range locations {
	fmt.Println(l)
}

location := locations[0]
location.IPv4DestinationBackup = "172.64.36.3"
location.DnsDestinationIpsIds = "0e4a32c6-6fb8-4858-9296-98f51631e8e5"
location, err = api.UpdateTeamsLocation(ctx, accountId, location)
if err != nil {
	log.Fatal(err)
}
println(location.DnsDestinationIpsIds)
println(location.IPv4DestinationBackup)

Types of changes

What sort of change does your code introduce/modify?

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented in cloudflare/api-schemas
    and relies on stable APIs.

Took the opportunity to add
`ipv4_destination_backup` as well that was also
missing
Copy link
Contributor

github-actions bot commented Dec 4, 2024

Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/cloudflare-go/blob/master/docs/changelog-process.md.

Example:

```release-note:TYPE
Release note
```

If you do not require a release note to be included, please add the workflow/skip-changelog-entry label.

@@ -34,6 +34,8 @@ type TeamsLocation struct {
Subdomain string `json:"doh_subdomain"`
AnonymizedLogsEnabled bool `json:"anonymized_logs_enabled"`
IPv4Destination string `json:"ipv4_destination"`
IPv4DestinationBackup string `json:"ipv4_destination_backup"`
DnsDestinationIpsIds string `json:"dns_destination_ips_id"`
Copy link
Member

@jacobbednarz jacobbednarz Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be singular?

Suggested change
DnsDestinationIpsIds string `json:"dns_destination_ips_id"`
DNSDestinationIPsID string `json:"dns_destination_ips_id"`

IPv4Destination: "",
IPv4Destination: "1.2.3.4",
IPv4DestinationBackup: "1.2.3.5",
DnsDestinationIpsIds: "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DnsDestinationIpsIds: "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",
DNSDestinationIPsID: "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants