Skip to content

Commit

Permalink
[reservedIPs]: update reserved ip examples
Browse files Browse the repository at this point in the history
  • Loading branch information
loosla committed Dec 3, 2024
1 parent d661057 commit aba41d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ source: |-
)
func main() {
token := os.Getenv("DIGITALOCEAN_TOKEN")
token := os.Getenv("DIGITALOCEAN_TOKEN")
client := godo.NewFromToken(token)
ctx := context.TODO()
client := godo.NewFromToken(token)
ctx := context.TODO()
createRequest := &godo.ReservedIPCreateRequest{
DropletID: 123456,
createRequest := &godo.ReservedIPCreateRequest{
DropletID: 123456,
Region: "nyc3",
ProjectID: "1234a77a-12cd-11ed-909f-43c99lbf6030",
}
}
reservedIP, _, err := client.ReservedIPs.Create(ctx, createRequest)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ source: |-
action, _, err := client.ReservedIPActions.Assign(ctx, "45.55.96.47", 8219222)
// Unassign a Reserved IP
// action, _, err := client.ReservedIPActions.Unassign(ctx, "45.55.96.47")
action, _, err := client.ReservedIPActions.Unassign(ctx, "45.55.96.47")
}

0 comments on commit aba41d0

Please sign in to comment.