👆 update docs & data sources (#16)

This commit is contained in:
Oscar Hermoso
2024-09-14 14:15:26 +08:00
committed by GitHub
parent 7a978731bb
commit 600e3f56e7
30 changed files with 417 additions and 182 deletions
+9 -10
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_server Data Source - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
Provides a Binary Lane Server data source. This can be used to read existing server details.
---
# binarylane_server (Data Source)
TODO
Provides a Binary Lane Server data source. This can be used to read existing server details.
@@ -19,18 +19,17 @@ TODO
- `id` (Number) The ID of the server to fetch.
### Optional
### Read-Only
- `backups` (Boolean) If true this will enable two daily backups for the server. `options.daily_backups` will override this value if provided. Setting this to false has no effect.
- `image` (String) The slug of the selected operating system.
- `name` (String) The hostname of your server, such as vps01.yourcompany.com. If not provided, the server will be created with a random name.
- `password` (String) If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions (check server.password_change_supported via the servers endpoint). If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.
- `permalink` (String) A randomly generated two-word identifier assigned to servers in regions that support this feature
- `port_blocking` (Boolean) Port blocking of outgoing connections for email, SSH and Remote Desktop (TCP ports 22, 25, and 3389) is enabled by default for all new servers. If this is false port blocking will be disabled. Disabling port blocking is only available to reviewed accounts.
- `private_ipv4_addresses` (List of String) The private IPv4 addresses assigned to the server.
- `public_ipv4_addresses` (List of String) The public IPv4 addresses assigned to the server.
- `region` (String) The slug of the selected region.
- `size` (String) The slug of the selected size.
- `ssh_keys` (List of Number) This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.
- `user_data` (String) If provided this will be used to initialise the new server. This must be left null if the Image does not support UserData, see DistributionInfo.Features for more information.
- `vpc_id` (Number) Leave null to use default (public) network for the selected region.
### Read-Only
- `image` (String) The slug of the selected operating system.
- `region` (String) The slug of the selected region.
- `size` (String) The slug of the selected size.
+1 -1
View File
@@ -15,7 +15,7 @@ TODO
<!-- schema generated by tfplugindocs -->
## Schema
### Optional
### Required
- `server_id` (Number) The ID of the server for which firewall rules should be listed.
+4 -4
View File
@@ -3,24 +3,24 @@
page_title: "binarylane_ssh_key Data Source - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_ssh_key (Data Source)
TODO
<!-- schema generated by tfplugindocs -->
## Schema
### Optional
### Required
- `default` (Boolean) Optional: If true this will be added to all new server installations (if we support SSH Key injection for the server's operating system).
- `id` (Number) The ID or fingerprint of the SSH Key to fetch.
### Read-Only
- `default` (Boolean) Optional: If true this will be added to all new server installations (if we support SSH Key injection for the server's operating system).
- `name` (String) A name to help you identify the key.
- `public_key` (String) The public key in OpenSSH "authorized_keys" format.
+4 -4
View File
@@ -3,23 +3,23 @@
page_title: "binarylane_vpc Data Source - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_vpc (Data Source)
TODO
<!-- schema generated by tfplugindocs -->
## Schema
### Optional
### Required
- `id` (Number) The target vpc id.
- `ip_range` (String) A private address range that you select during creation, such as the default value of 10.240.0.0/16. Because the virtual network is dedicated to your use, you may use whatever IP address range you like.
### Read-Only
- `ip_range` (String) A private address range that you select during creation, such as the default value of 10.240.0.0/16. Because the virtual network is dedicated to your use, you may use whatever IP address range you like.
- `name` (String) A name to help identify this VPC.
+4 -4
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_vpc_route_entries Data Source - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_vpc_route_entries (Data Source)
TODO
@@ -19,14 +19,14 @@ TODO
- `vpc_id` (Number) The target vpc id.
### Optional
### Read-Only
- `route_entries` (List of Object) Submit null to leave unaltered, submit an empty list to clear all route entries. It is not possible to PATCH individual route entries, to alter a route entry submit the entire list of route entries you wish to save. (see [below for nested schema](#nestedatt--route_entries))
<a id="nestedatt--route_entries"></a>
### Nested Schema for `route_entries`
Optional:
Read-Only:
- `description` (String)
- `destination` (String)
+2 -1
View File
@@ -25,7 +25,7 @@ Provides a Binary Lane Server resource. This can be used to create and delete se
- `backups` (Boolean) If true this will enable two daily backups for the server. `options.daily_backups` will override this value if provided. Setting this to false has no effect.
- `name` (String) The hostname of your server, such as vps01.yourcompany.com. If not provided, the server will be created with a random name.
- `password` (String, Sensitive) If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions (check server.password_change_supported via the servers endpoint). If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.
- `password` (String, Sensitive) If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions. If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.
- `port_blocking` (Boolean) Port blocking of outgoing connections for email, SSH and Remote Desktop (TCP ports 22, 25, and 3389) is enabled by default for all new servers. If this is false port blocking will be disabled. Disabling port blocking is only available to reviewed accounts.
- `public_ipv4_count` (Number) The number of public IPv4 addresses to assign to the server. If this is not provided, the server will be created with the default number of public IPv4 addresses.
- `ssh_keys` (List of Number) This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.
@@ -36,5 +36,6 @@ Provides a Binary Lane Server resource. This can be used to create and delete se
### Read-Only
- `id` (Number) The ID of the server to fetch.
- `permalink` (String) A randomly generated two-word identifier assigned to servers in regions that support this feature
- `private_ipv4_addresses` (List of String) The private IPv4 addresses assigned to the server.
- `public_ipv4_addresses` (List of String) The public IPv4 addresses assigned to the server.
+2 -2
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_server_firewall_rules Resource - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_server_firewall_rules (Resource)
TODO
+2 -2
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_ssh_key Resource - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_ssh_key (Resource)
TODO
+2 -2
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_vpc Resource - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_vpc (Resource)
TODO
+2 -2
View File
@@ -3,12 +3,12 @@
page_title: "binarylane_vpc_route_entries Resource - terraform-provider-binarylane"
subcategory: ""
description: |-
TODO
---
# binarylane_vpc_route_entries (Resource)
TODO
+8 -8
View File
@@ -49,7 +49,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-plugin v1.6.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
@@ -77,7 +77,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/onsi/gomega v1.33.1 // indirect
github.com/pb33f/libopenapi v0.15.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
@@ -97,17 +97,17 @@ require (
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.15.0 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/tools v0.22.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
+16 -16
View File
@@ -120,8 +120,8 @@ github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A=
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI=
github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
@@ -225,8 +225,8 @@ github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 h1:rICjNsHbPP1LttefanBPnwsSwl09Sq
github.com/oapi-codegen/oapi-codegen/v2 v2.3.0/go.mod h1:4k+cJeSq5ntkwlcpQSxLxICCxQzCL772o30PxdibRt4=
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA=
github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
@@ -315,8 +315,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc=
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -333,8 +333,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -366,8 +366,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@@ -378,8 +378,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
@@ -393,10 +393,10 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA=
google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+135 -45
View File
@@ -155,29 +155,47 @@ type ClientInterface interface {
PostDomainsRefreshNameserverCache(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDomainsDomainName request
DeleteDomainsDomainName(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteDomainsDomainName(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDomainsDomainName request
GetDomainsDomainName(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*http.Response, error)
GetDomainsDomainName(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDomainsDomainNameRecords request
GetDomainsDomainNameRecords(ctx context.Context, domainName string, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetDomainsDomainNameRecords(ctx context.Context, domainName struct {
union json.RawMessage
}, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostDomainsDomainNameRecordsWithBody request with any body
PostDomainsDomainNameRecordsWithBody(ctx context.Context, domainName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostDomainsDomainNameRecordsWithBody(ctx context.Context, domainName struct {
union json.RawMessage
}, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostDomainsDomainNameRecords(ctx context.Context, domainName string, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostDomainsDomainNameRecords(ctx context.Context, domainName struct {
union json.RawMessage
}, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteDomainsDomainNameRecordsRecordId request
DeleteDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
DeleteDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetDomainsDomainNameRecordsRecordId request
GetDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
GetDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
// PutDomainsDomainNameRecordsRecordIdWithBody request with any body
PutDomainsDomainNameRecordsRecordIdWithBody(ctx context.Context, domainName string, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PutDomainsDomainNameRecordsRecordIdWithBody(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PutDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PutDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFailoverIpsServerId request
GetFailoverIpsServerId(ctx context.Context, serverId int64, params *GetFailoverIpsServerIdParams, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -843,7 +861,9 @@ func (c *Client) PostDomainsRefreshNameserverCache(ctx context.Context, reqEdito
return c.Client.Do(req)
}
func (c *Client) DeleteDomainsDomainName(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) DeleteDomainsDomainName(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewDeleteDomainsDomainNameRequest(c.Server, domainName)
if err != nil {
return nil, err
@@ -855,7 +875,9 @@ func (c *Client) DeleteDomainsDomainName(ctx context.Context, domainName string,
return c.Client.Do(req)
}
func (c *Client) GetDomainsDomainName(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) GetDomainsDomainName(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetDomainsDomainNameRequest(c.Server, domainName)
if err != nil {
return nil, err
@@ -867,7 +889,9 @@ func (c *Client) GetDomainsDomainName(ctx context.Context, domainName string, re
return c.Client.Do(req)
}
func (c *Client) GetDomainsDomainNameRecords(ctx context.Context, domainName string, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) GetDomainsDomainNameRecords(ctx context.Context, domainName struct {
union json.RawMessage
}, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetDomainsDomainNameRecordsRequest(c.Server, domainName, params)
if err != nil {
return nil, err
@@ -879,7 +903,9 @@ func (c *Client) GetDomainsDomainNameRecords(ctx context.Context, domainName str
return c.Client.Do(req)
}
func (c *Client) PostDomainsDomainNameRecordsWithBody(ctx context.Context, domainName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) PostDomainsDomainNameRecordsWithBody(ctx context.Context, domainName struct {
union json.RawMessage
}, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewPostDomainsDomainNameRecordsRequestWithBody(c.Server, domainName, contentType, body)
if err != nil {
return nil, err
@@ -891,7 +917,9 @@ func (c *Client) PostDomainsDomainNameRecordsWithBody(ctx context.Context, domai
return c.Client.Do(req)
}
func (c *Client) PostDomainsDomainNameRecords(ctx context.Context, domainName string, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) PostDomainsDomainNameRecords(ctx context.Context, domainName struct {
union json.RawMessage
}, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewPostDomainsDomainNameRecordsRequest(c.Server, domainName, body)
if err != nil {
return nil, err
@@ -903,7 +931,9 @@ func (c *Client) PostDomainsDomainNameRecords(ctx context.Context, domainName st
return c.Client.Do(req)
}
func (c *Client) DeleteDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) DeleteDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewDeleteDomainsDomainNameRecordsRecordIdRequest(c.Server, domainName, recordId)
if err != nil {
return nil, err
@@ -915,7 +945,9 @@ func (c *Client) DeleteDomainsDomainNameRecordsRecordId(ctx context.Context, dom
return c.Client.Do(req)
}
func (c *Client) GetDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) GetDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewGetDomainsDomainNameRecordsRecordIdRequest(c.Server, domainName, recordId)
if err != nil {
return nil, err
@@ -927,7 +959,9 @@ func (c *Client) GetDomainsDomainNameRecordsRecordId(ctx context.Context, domain
return c.Client.Do(req)
}
func (c *Client) PutDomainsDomainNameRecordsRecordIdWithBody(ctx context.Context, domainName string, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) PutDomainsDomainNameRecordsRecordIdWithBody(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewPutDomainsDomainNameRecordsRecordIdRequestWithBody(c.Server, domainName, recordId, contentType, body)
if err != nil {
return nil, err
@@ -939,7 +973,9 @@ func (c *Client) PutDomainsDomainNameRecordsRecordIdWithBody(ctx context.Context
return c.Client.Do(req)
}
func (c *Client) PutDomainsDomainNameRecordsRecordId(ctx context.Context, domainName string, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
func (c *Client) PutDomainsDomainNameRecordsRecordId(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewPutDomainsDomainNameRecordsRecordIdRequest(c.Server, domainName, recordId, body)
if err != nil {
return nil, err
@@ -3512,7 +3548,9 @@ func NewPostDomainsRefreshNameserverCacheRequest(server string) (*http.Request,
}
// NewDeleteDomainsDomainNameRequest generates requests for DeleteDomainsDomainName
func NewDeleteDomainsDomainNameRequest(server string, domainName string) (*http.Request, error) {
func NewDeleteDomainsDomainNameRequest(server string, domainName struct {
union json.RawMessage
}) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3546,7 +3584,9 @@ func NewDeleteDomainsDomainNameRequest(server string, domainName string) (*http.
}
// NewGetDomainsDomainNameRequest generates requests for GetDomainsDomainName
func NewGetDomainsDomainNameRequest(server string, domainName string) (*http.Request, error) {
func NewGetDomainsDomainNameRequest(server string, domainName struct {
union json.RawMessage
}) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3580,7 +3620,9 @@ func NewGetDomainsDomainNameRequest(server string, domainName string) (*http.Req
}
// NewGetDomainsDomainNameRecordsRequest generates requests for GetDomainsDomainNameRecords
func NewGetDomainsDomainNameRecordsRequest(server string, domainName string, params *GetDomainsDomainNameRecordsParams) (*http.Request, error) {
func NewGetDomainsDomainNameRecordsRequest(server string, domainName struct {
union json.RawMessage
}, params *GetDomainsDomainNameRecordsParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3684,7 +3726,9 @@ func NewGetDomainsDomainNameRecordsRequest(server string, domainName string, par
}
// NewPostDomainsDomainNameRecordsRequest calls the generic PostDomainsDomainNameRecords builder with application/json body
func NewPostDomainsDomainNameRecordsRequest(server string, domainName string, body PostDomainsDomainNameRecordsJSONRequestBody) (*http.Request, error) {
func NewPostDomainsDomainNameRecordsRequest(server string, domainName struct {
union json.RawMessage
}, body PostDomainsDomainNameRecordsJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
@@ -3695,7 +3739,9 @@ func NewPostDomainsDomainNameRecordsRequest(server string, domainName string, bo
}
// NewPostDomainsDomainNameRecordsRequestWithBody generates requests for PostDomainsDomainNameRecords with any type of body
func NewPostDomainsDomainNameRecordsRequestWithBody(server string, domainName string, contentType string, body io.Reader) (*http.Request, error) {
func NewPostDomainsDomainNameRecordsRequestWithBody(server string, domainName struct {
union json.RawMessage
}, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3731,7 +3777,9 @@ func NewPostDomainsDomainNameRecordsRequestWithBody(server string, domainName st
}
// NewDeleteDomainsDomainNameRecordsRecordIdRequest generates requests for DeleteDomainsDomainNameRecordsRecordId
func NewDeleteDomainsDomainNameRecordsRecordIdRequest(server string, domainName string, recordId int64) (*http.Request, error) {
func NewDeleteDomainsDomainNameRecordsRecordIdRequest(server string, domainName struct {
union json.RawMessage
}, recordId int64) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3772,7 +3820,9 @@ func NewDeleteDomainsDomainNameRecordsRecordIdRequest(server string, domainName
}
// NewGetDomainsDomainNameRecordsRecordIdRequest generates requests for GetDomainsDomainNameRecordsRecordId
func NewGetDomainsDomainNameRecordsRecordIdRequest(server string, domainName string, recordId int64) (*http.Request, error) {
func NewGetDomainsDomainNameRecordsRecordIdRequest(server string, domainName struct {
union json.RawMessage
}, recordId int64) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3813,7 +3863,9 @@ func NewGetDomainsDomainNameRecordsRecordIdRequest(server string, domainName str
}
// NewPutDomainsDomainNameRecordsRecordIdRequest calls the generic PutDomainsDomainNameRecordsRecordId builder with application/json body
func NewPutDomainsDomainNameRecordsRecordIdRequest(server string, domainName string, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody) (*http.Request, error) {
func NewPutDomainsDomainNameRecordsRecordIdRequest(server string, domainName struct {
union json.RawMessage
}, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
@@ -3824,7 +3876,9 @@ func NewPutDomainsDomainNameRecordsRecordIdRequest(server string, domainName str
}
// NewPutDomainsDomainNameRecordsRecordIdRequestWithBody generates requests for PutDomainsDomainNameRecordsRecordId with any type of body
func NewPutDomainsDomainNameRecordsRecordIdRequestWithBody(server string, domainName string, recordId int64, contentType string, body io.Reader) (*http.Request, error) {
func NewPutDomainsDomainNameRecordsRecordIdRequestWithBody(server string, domainName struct {
union json.RawMessage
}, recordId int64, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -8569,29 +8623,47 @@ type ClientWithResponsesInterface interface {
PostDomainsRefreshNameserverCacheWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostDomainsRefreshNameserverCacheResponse, error)
// DeleteDomainsDomainNameWithResponse request
DeleteDomainsDomainNameWithResponse(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameResponse, error)
DeleteDomainsDomainNameWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameResponse, error)
// GetDomainsDomainNameWithResponse request
GetDomainsDomainNameWithResponse(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameResponse, error)
GetDomainsDomainNameWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameResponse, error)
// GetDomainsDomainNameRecordsWithResponse request
GetDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName string, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsResponse, error)
GetDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsResponse, error)
// PostDomainsDomainNameRecordsWithBodyWithResponse request with any body
PostDomainsDomainNameRecordsWithBodyWithResponse(ctx context.Context, domainName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error)
PostDomainsDomainNameRecordsWithBodyWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error)
PostDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName string, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error)
PostDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error)
// DeleteDomainsDomainNameRecordsRecordIdWithResponse request
DeleteDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameRecordsRecordIdResponse, error)
DeleteDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameRecordsRecordIdResponse, error)
// GetDomainsDomainNameRecordsRecordIdWithResponse request
GetDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsRecordIdResponse, error)
GetDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsRecordIdResponse, error)
// PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse request with any body
PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse(ctx context.Context, domainName string, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error)
PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error)
PutDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error)
PutDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error)
// GetFailoverIpsServerIdWithResponse request
GetFailoverIpsServerIdWithResponse(ctx context.Context, serverId int64, params *GetFailoverIpsServerIdParams, reqEditors ...RequestEditorFn) (*GetFailoverIpsServerIdResponse, error)
@@ -11955,7 +12027,9 @@ func (c *ClientWithResponses) PostDomainsRefreshNameserverCacheWithResponse(ctx
}
// DeleteDomainsDomainNameWithResponse request returning *DeleteDomainsDomainNameResponse
func (c *ClientWithResponses) DeleteDomainsDomainNameWithResponse(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameResponse, error) {
func (c *ClientWithResponses) DeleteDomainsDomainNameWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameResponse, error) {
rsp, err := c.DeleteDomainsDomainName(ctx, domainName, reqEditors...)
if err != nil {
return nil, err
@@ -11964,7 +12038,9 @@ func (c *ClientWithResponses) DeleteDomainsDomainNameWithResponse(ctx context.Co
}
// GetDomainsDomainNameWithResponse request returning *GetDomainsDomainNameResponse
func (c *ClientWithResponses) GetDomainsDomainNameWithResponse(ctx context.Context, domainName string, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameResponse, error) {
func (c *ClientWithResponses) GetDomainsDomainNameWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameResponse, error) {
rsp, err := c.GetDomainsDomainName(ctx, domainName, reqEditors...)
if err != nil {
return nil, err
@@ -11973,7 +12049,9 @@ func (c *ClientWithResponses) GetDomainsDomainNameWithResponse(ctx context.Conte
}
// GetDomainsDomainNameRecordsWithResponse request returning *GetDomainsDomainNameRecordsResponse
func (c *ClientWithResponses) GetDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName string, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsResponse, error) {
func (c *ClientWithResponses) GetDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, params *GetDomainsDomainNameRecordsParams, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsResponse, error) {
rsp, err := c.GetDomainsDomainNameRecords(ctx, domainName, params, reqEditors...)
if err != nil {
return nil, err
@@ -11982,7 +12060,9 @@ func (c *ClientWithResponses) GetDomainsDomainNameRecordsWithResponse(ctx contex
}
// PostDomainsDomainNameRecordsWithBodyWithResponse request with arbitrary body returning *PostDomainsDomainNameRecordsResponse
func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithBodyWithResponse(ctx context.Context, domainName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error) {
func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithBodyWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error) {
rsp, err := c.PostDomainsDomainNameRecordsWithBody(ctx, domainName, contentType, body, reqEditors...)
if err != nil {
return nil, err
@@ -11990,7 +12070,9 @@ func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithBodyWithResponse(c
return ParsePostDomainsDomainNameRecordsResponse(rsp)
}
func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName string, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error) {
func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, body PostDomainsDomainNameRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDomainsDomainNameRecordsResponse, error) {
rsp, err := c.PostDomainsDomainNameRecords(ctx, domainName, body, reqEditors...)
if err != nil {
return nil, err
@@ -11999,7 +12081,9 @@ func (c *ClientWithResponses) PostDomainsDomainNameRecordsWithResponse(ctx conte
}
// DeleteDomainsDomainNameRecordsRecordIdWithResponse request returning *DeleteDomainsDomainNameRecordsRecordIdResponse
func (c *ClientWithResponses) DeleteDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameRecordsRecordIdResponse, error) {
func (c *ClientWithResponses) DeleteDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*DeleteDomainsDomainNameRecordsRecordIdResponse, error) {
rsp, err := c.DeleteDomainsDomainNameRecordsRecordId(ctx, domainName, recordId, reqEditors...)
if err != nil {
return nil, err
@@ -12008,7 +12092,9 @@ func (c *ClientWithResponses) DeleteDomainsDomainNameRecordsRecordIdWithResponse
}
// GetDomainsDomainNameRecordsRecordIdWithResponse request returning *GetDomainsDomainNameRecordsRecordIdResponse
func (c *ClientWithResponses) GetDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsRecordIdResponse, error) {
func (c *ClientWithResponses) GetDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, reqEditors ...RequestEditorFn) (*GetDomainsDomainNameRecordsRecordIdResponse, error) {
rsp, err := c.GetDomainsDomainNameRecordsRecordId(ctx, domainName, recordId, reqEditors...)
if err != nil {
return nil, err
@@ -12017,7 +12103,9 @@ func (c *ClientWithResponses) GetDomainsDomainNameRecordsRecordIdWithResponse(ct
}
// PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse request with arbitrary body returning *PutDomainsDomainNameRecordsRecordIdResponse
func (c *ClientWithResponses) PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse(ctx context.Context, domainName string, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error) {
func (c *ClientWithResponses) PutDomainsDomainNameRecordsRecordIdWithBodyWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error) {
rsp, err := c.PutDomainsDomainNameRecordsRecordIdWithBody(ctx, domainName, recordId, contentType, body, reqEditors...)
if err != nil {
return nil, err
@@ -12025,7 +12113,9 @@ func (c *ClientWithResponses) PutDomainsDomainNameRecordsRecordIdWithBodyWithRes
return ParsePutDomainsDomainNameRecordsRecordIdResponse(rsp)
}
func (c *ClientWithResponses) PutDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName string, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error) {
func (c *ClientWithResponses) PutDomainsDomainNameRecordsRecordIdWithResponse(ctx context.Context, domainName struct {
union json.RawMessage
}, recordId int64, body PutDomainsDomainNameRecordsRecordIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PutDomainsDomainNameRecordsRecordIdResponse, error) {
rsp, err := c.PutDomainsDomainNameRecordsRecordId(ctx, domainName, recordId, body, reqEditors...)
if err != nil {
return nil, err
-3
View File
@@ -21,9 +21,6 @@ cat <<<$(jq '.paths["/account/keys/{key_id}"].delete.parameters[0].schema |= del
# Remove the "/paths/{image_id}" path because its duplicated by "/images/{image_id_or_slug}"
cat <<<$(jq 'del(.paths."/images/{image_id}")' $OPENAPI_FILE) >$OPENAPI_FILE
# Override descriptions
cat <<<$(jq '.components.schemas.CreateServerRequest.properties.ssh_keys.description |= "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys."' $OPENAPI_FILE) >$OPENAPI_FILE
# Add x-oapi-codegen-extra-tags so Go structs can be reflected
## RouteEntryRequest
+79 -16
View File
@@ -8,7 +8,7 @@
"url": "https://support.binarylane.com.au",
"email": "support@binarylane.com.au"
},
"version": "0.24.4",
"version": "0.25.0",
"x-logo": {
"url": "https://www.binarylane.com.au/res/images/binarylane/logo.png",
"backgroundColor": "#000000",
@@ -695,10 +695,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The name of the domain to fetch.",
"description": "The name or domain ID of the domain to fetch.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
}
],
@@ -744,10 +752,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The name of the domain to delete.",
"description": "The name or domain ID of the domain to delete.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
}
],
@@ -788,10 +804,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The domain name for which records should be listed.",
"description": "The domain name or domain ID for for which records should be listed.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
},
{
@@ -883,10 +907,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The domain name for which the record should be created.",
"description": "The domain name or domain ID for for which the record should be created.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
}
],
@@ -958,10 +990,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The domain name for which the record should be fetched.",
"description": "The domain name or domain ID for for which the record should be fetched.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
},
{
@@ -1017,10 +1057,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The domain name for which the record should be updated.",
"description": "The domain name or domain ID for for which the record should be updated.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
},
{
@@ -1100,10 +1148,18 @@
{
"name": "domain_name",
"in": "path",
"description": "The domain name for which the record should be deleted.",
"description": "The domain name or domain ID for which the record should be deleted.",
"required": true,
"schema": {
"type": "string"
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"example": 5
}
},
{
@@ -10103,7 +10159,7 @@
"example": 5,
"type": "integer"
},
"description": "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.",
"description": "This may be either the SSH keys Ids or fingerprints. If this is null or not provided any SSH keys that have been marked as default will be deployed (if the operating system supports SSH keys). Submit an empty array to disable deployment of default keys.",
"nullable": true
},
"options": {
@@ -10517,11 +10573,18 @@
"Domain": {
"required": [
"current_nameservers",
"id",
"name",
"zone_file"
],
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The ID of this domain.",
"format": "int64",
"readOnly": true
},
"name": {
"minLength": 1,
"type": "string",
+46 -1
View File
@@ -1184,7 +1184,7 @@ type CreateServerRequest struct {
// Size The slug of the selected size.
Size string `json:"size"`
// SshKeys This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.
// SshKeys This may be either the SSH keys Ids or fingerprints. If this is null or not provided any SSH keys that have been marked as default will be deployed (if the operating system supports SSH keys). Submit an empty array to disable deployment of default keys.
SshKeys *[]int `json:"ssh_keys"`
// UserData If provided this will be used to initialise the new server. This must be left null if the Image does not support UserData, see DistributionInfo.Features for more information.
@@ -1364,6 +1364,9 @@ type Domain struct {
// CurrentNameservers The current authoritative name servers for this domain.
CurrentNameservers *[]string `json:"current_nameservers,omitempty"`
// Id The ID of this domain.
Id *int64 `json:"id,omitempty"`
// Name The name of the domain.
Name *string `json:"name,omitempty"`
@@ -3176,6 +3179,18 @@ type GetDomainsParams struct {
// PostDomainsJSONBody defines parameters for PostDomains.
type PostDomainsJSONBody = DomainRequest
// DeleteDomainsDomainNameParamsDomainName0 defines parameters for DeleteDomainsDomainName.
type DeleteDomainsDomainNameParamsDomainName0 = int
// DeleteDomainsDomainNameParamsDomainName1 defines parameters for DeleteDomainsDomainName.
type DeleteDomainsDomainNameParamsDomainName1 = string
// GetDomainsDomainNameParamsDomainName0 defines parameters for GetDomainsDomainName.
type GetDomainsDomainNameParamsDomainName0 = int
// GetDomainsDomainNameParamsDomainName1 defines parameters for GetDomainsDomainName.
type GetDomainsDomainNameParamsDomainName1 = string
// GetDomainsDomainNameRecordsParams defines parameters for GetDomainsDomainNameRecords.
type GetDomainsDomainNameRecordsParams struct {
// Type
@@ -3203,12 +3218,42 @@ type GetDomainsDomainNameRecordsParams struct {
PerPage *int32 `form:"per_page,omitempty" json:"per_page,omitempty"`
}
// GetDomainsDomainNameRecordsParamsDomainName0 defines parameters for GetDomainsDomainNameRecords.
type GetDomainsDomainNameRecordsParamsDomainName0 = int
// GetDomainsDomainNameRecordsParamsDomainName1 defines parameters for GetDomainsDomainNameRecords.
type GetDomainsDomainNameRecordsParamsDomainName1 = string
// PostDomainsDomainNameRecordsJSONBody defines parameters for PostDomainsDomainNameRecords.
type PostDomainsDomainNameRecordsJSONBody = DomainRecordRequest
// PostDomainsDomainNameRecordsParamsDomainName0 defines parameters for PostDomainsDomainNameRecords.
type PostDomainsDomainNameRecordsParamsDomainName0 = int
// PostDomainsDomainNameRecordsParamsDomainName1 defines parameters for PostDomainsDomainNameRecords.
type PostDomainsDomainNameRecordsParamsDomainName1 = string
// DeleteDomainsDomainNameRecordsRecordIdParamsDomainName0 defines parameters for DeleteDomainsDomainNameRecordsRecordId.
type DeleteDomainsDomainNameRecordsRecordIdParamsDomainName0 = int
// DeleteDomainsDomainNameRecordsRecordIdParamsDomainName1 defines parameters for DeleteDomainsDomainNameRecordsRecordId.
type DeleteDomainsDomainNameRecordsRecordIdParamsDomainName1 = string
// GetDomainsDomainNameRecordsRecordIdParamsDomainName0 defines parameters for GetDomainsDomainNameRecordsRecordId.
type GetDomainsDomainNameRecordsRecordIdParamsDomainName0 = int
// GetDomainsDomainNameRecordsRecordIdParamsDomainName1 defines parameters for GetDomainsDomainNameRecordsRecordId.
type GetDomainsDomainNameRecordsRecordIdParamsDomainName1 = string
// PutDomainsDomainNameRecordsRecordIdJSONBody defines parameters for PutDomainsDomainNameRecordsRecordId.
type PutDomainsDomainNameRecordsRecordIdJSONBody = DomainRecordRequest
// PutDomainsDomainNameRecordsRecordIdParamsDomainName0 defines parameters for PutDomainsDomainNameRecordsRecordId.
type PutDomainsDomainNameRecordsRecordIdParamsDomainName0 = int
// PutDomainsDomainNameRecordsRecordIdParamsDomainName1 defines parameters for PutDomainsDomainNameRecordsRecordId.
type PutDomainsDomainNameRecordsRecordIdParamsDomainName1 = string
// GetFailoverIpsServerIdParams defines parameters for GetFailoverIpsServerId.
type GetFailoverIpsServerIdParams struct {
// Page The selected page. Page numbering starts at 1
+14 -10
View File
@@ -7,8 +7,7 @@ import (
"terraform-provider-binarylane/internal/resources"
"github.com/hashicorp/terraform-plugin-framework/datasource"
d_schema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
"github.com/hashicorp/terraform-plugin-framework/types"
)
@@ -56,17 +55,22 @@ func (d *serverDataSource) Metadata(ctx context.Context, req datasource.Metadata
}
func (d *serverDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
ds, err := convertResourceSchemaToDataSourceSchema(resources.ServerResourceSchema(ctx))
ds, err := convertResourceSchemaToDataSourceSchema(
resources.ServerResourceSchema(ctx),
AttributeConfig{
RequiredAttributes: &[]string{"id"},
ExcludedAttributes: &[]string{"password"},
})
if err != nil {
resp.Diagnostics.AddError("Failed to convert resource schema to data source schema", err.Error())
return
}
resp.Schema = *ds
resp.Schema.Description = "TODO"
resp.Schema.Description = "Provides a Binary Lane Server data source. This can be used to read existing server details."
// Overrides
id := resp.Schema.Attributes["id"]
resp.Schema.Attributes["id"] = d_schema.Int64Attribute{
resp.Schema.Attributes["id"] = schema.Int64Attribute{
Description: id.GetDescription(),
MarkdownDescription: id.GetMarkdownDescription(),
Required: true, // ID is required to find the server
@@ -74,9 +78,9 @@ func (d *serverDataSource) Schema(ctx context.Context, req datasource.SchemaRequ
// Additional attributes
resp.Schema.Attributes["permalink"] = &schema.StringAttribute{
Description: "TODO",
MarkdownDescription: "TODO",
Optional: true,
Description: "A randomly generated two-word identifier assigned to servers in regions that support this feature",
MarkdownDescription: "A randomly generated two-word identifier assigned to servers in regions that support this feature",
Computed: true,
}
publicIpv4AddressesDescription := "The public IPv4 addresses assigned to the server."
@@ -84,7 +88,7 @@ func (d *serverDataSource) Schema(ctx context.Context, req datasource.SchemaRequ
Description: publicIpv4AddressesDescription,
MarkdownDescription: publicIpv4AddressesDescription,
ElementType: types.StringType,
Optional: true,
Computed: true,
}
privateIpv4AddressesDescription := "The private IPv4 addresses assigned to the server."
@@ -92,7 +96,7 @@ func (d *serverDataSource) Schema(ctx context.Context, req datasource.SchemaRequ
Description: privateIpv4AddressesDescription,
MarkdownDescription: privateIpv4AddressesDescription,
ElementType: types.StringType,
Optional: true,
Computed: true,
}
}
@@ -32,7 +32,12 @@ func (d *serverFirewallRulesDataSource) Metadata(ctx context.Context, req dataso
}
func (d *serverFirewallRulesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
ds, err := convertResourceSchemaToDataSourceSchema(resources.ServerFirewallRulesResourceSchema(ctx))
ds, err := convertResourceSchemaToDataSourceSchema(
resources.ServerFirewallRulesResourceSchema(ctx),
AttributeConfig{
RequiredAttributes: &[]string{"server_id"},
},
)
if err != nil {
resp.Diagnostics.AddError("Failed to convert resource schema to data source schema", err.Error())
return
@@ -59,7 +59,7 @@ func (r *serverFirewallRulesResource) Metadata(ctx context.Context, req resource
func (r *serverFirewallRulesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = resources.ServerFirewallRulesResourceSchema(ctx)
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
// Overrides
serverId := resp.Schema.Attributes["server_id"]
+2 -2
View File
@@ -204,8 +204,8 @@ func (r *serverResource) Schema(ctx context.Context, _ resource.SchemaRequest, r
}
resp.Schema.Attributes["permalink"] = &schema.StringAttribute{
Description: "TODO",
MarkdownDescription: "TODO",
Description: "A randomly generated two-word identifier assigned to servers in regions that support this feature",
MarkdownDescription: "A randomly generated two-word identifier assigned to servers in regions that support this feature",
// read only
Optional: false,
Required: false,
+7 -2
View File
@@ -47,13 +47,18 @@ func (d *sshKeyDataSource) Metadata(ctx context.Context, req datasource.Metadata
}
func (d *sshKeyDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
ds, err := convertResourceSchemaToDataSourceSchema(resources.SshKeyResourceSchema(ctx))
ds, err := convertResourceSchemaToDataSourceSchema(
resources.SshKeyResourceSchema(ctx),
AttributeConfig{
RequiredAttributes: &[]string{"id"},
},
)
if err != nil {
resp.Diagnostics.AddError("Failed to convert resource schema to data source schema", err.Error())
return
}
resp.Schema = *ds
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
}
func (d *sshKeyDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
+1 -1
View File
@@ -55,7 +55,7 @@ func (r *sshKeyResource) Metadata(ctx context.Context, req resource.MetadataRequ
func (r *sshKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = resources.SshKeyResourceSchema(ctx)
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
// Overrides
default_ := resp.Schema.Attributes["default"]
+41 -19
View File
@@ -2,6 +2,7 @@ package provider
import (
"fmt"
"slices"
"strings"
d_schema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
@@ -9,7 +10,13 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
)
func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Schema, error) {
type AttributeConfig struct {
RequiredAttributes *[]string
OptionalAttributes *[]string
ExcludedAttributes *[]string
}
func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema, cfg AttributeConfig) (*d_schema.Schema, error) {
ds := d_schema.Schema{
Attributes: make(map[string]d_schema.Attribute, len(rs.Attributes)),
Blocks: make(map[string]d_schema.Block),
@@ -18,12 +25,19 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
DeprecationMessage: rs.GetDeprecationMessage(),
}
for name, attr := range rs.Attributes {
if cfg.ExcludedAttributes != nil && slices.Contains(*cfg.ExcludedAttributes, name) {
continue
}
required := cfg.RequiredAttributes != nil && slices.Contains(*cfg.RequiredAttributes, name)
optional := cfg.OptionalAttributes != nil && slices.Contains(*cfg.OptionalAttributes, name)
switch attr.GetType() {
case types.BoolType:
ds.Attributes[name] = d_schema.BoolAttribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -31,8 +45,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.DynamicType:
ds.Attributes[name] = d_schema.DynamicAttribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -40,8 +55,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.Float32Type:
ds.Attributes[name] = d_schema.Float32Attribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -49,8 +65,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.Float64Type:
ds.Attributes[name] = d_schema.Float64Attribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -58,8 +75,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.Int32Type:
ds.Attributes[name] = d_schema.Int32Attribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -67,8 +85,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.Int64Type:
ds.Attributes[name] = d_schema.Int64Attribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -76,8 +95,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.NumberType:
ds.Attributes[name] = d_schema.NumberAttribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -85,8 +105,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
case types.StringType:
ds.Attributes[name] = d_schema.StringAttribute{
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
@@ -97,8 +118,9 @@ func convertResourceSchemaToDataSourceSchema(rs r_schema.Schema) (*d_schema.Sche
ds.Attributes[name] = d_schema.ListAttribute{
ElementType: attr.GetType().(types.ListType).ElemType,
Description: attr.GetDescription(),
Optional: attr.IsOptional(),
Computed: true,
Required: required,
Optional: optional,
Computed: !required,
Sensitive: attr.IsSensitive(),
MarkdownDescription: attr.GetMarkdownDescription(),
DeprecationMessage: attr.GetDeprecationMessage(),
+7 -2
View File
@@ -50,14 +50,19 @@ func (d *vpcDataSource) Metadata(ctx context.Context, req datasource.MetadataReq
}
func (d *vpcDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
ds, err := convertResourceSchemaToDataSourceSchema(resources.VpcResourceSchema(ctx))
ds, err := convertResourceSchemaToDataSourceSchema(
resources.VpcResourceSchema(ctx),
AttributeConfig{
RequiredAttributes: &[]string{"id"},
},
)
if err != nil {
resp.Diagnostics.AddError("Failed to convert resource schema to data source schema", err.Error())
return
}
resp.Schema = *ds
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
}
func (d *vpcDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
+1 -1
View File
@@ -56,7 +56,7 @@ func (r *vpcResource) Metadata(ctx context.Context, req resource.MetadataRequest
func (r *vpcResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = resources.VpcResourceSchema(ctx)
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
// Overrides
id := resp.Schema.Attributes["id"]
@@ -32,13 +32,18 @@ func (d *vpcRouteEntriesDataSource) Metadata(ctx context.Context, req datasource
}
func (d *vpcRouteEntriesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
ds, err := convertResourceSchemaToDataSourceSchema(resources.VpcRouteEntriesResourceSchema(ctx))
ds, err := convertResourceSchemaToDataSourceSchema(
resources.VpcRouteEntriesResourceSchema(ctx),
AttributeConfig{
RequiredAttributes: &[]string{"vpc_id"},
},
)
if err != nil {
resp.Diagnostics.AddError("Failed to convert resource schema to data source schema", err.Error())
return
}
resp.Schema = *ds
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
// Overrides
vpcId := resp.Schema.Attributes["vpc_id"]
@@ -43,7 +43,7 @@ func (r *vpcRouteEntriesResource) Metadata(ctx context.Context, req resource.Met
func (r *vpcRouteEntriesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = resources.VpcRouteEntriesResourceSchema(ctx)
resp.Schema.Description = "TODO"
// resp.Schema.Description = "TODO"
// Overrides
vpcId := resp.Schema.Attributes["vpc_id"]
+4 -4
View File
@@ -40,8 +40,8 @@ func ServerResourceSchema(ctx context.Context) schema.Schema {
"password": schema.StringAttribute{
Optional: true,
Computed: true,
Description: "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions (check server.password_change_supported via the servers endpoint). If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n",
MarkdownDescription: "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions (check server.password_change_supported via the servers endpoint). If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n",
Description: "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions. If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n",
MarkdownDescription: "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions. If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n",
},
"port_blocking": schema.BoolAttribute{
Optional: true,
@@ -69,8 +69,8 @@ func ServerResourceSchema(ctx context.Context) schema.Schema {
ElementType: types.Int64Type,
Optional: true,
Computed: true,
Description: "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.",
MarkdownDescription: "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.",
Description: "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.\n",
MarkdownDescription: "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.\n",
},
"user_data": schema.StringAttribute{
Optional: true,
+2 -2
View File
@@ -32,7 +32,7 @@
"name": "password",
"string": {
"computed_optional_required": "computed_optional",
"description": "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions (check server.password_change_supported via the servers endpoint). If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n"
"description": "If this is provided the specified or default remote user's account password will be set to this value. Only valid if the server supports password change actions. If omitted and the server supports password change actions a random password will be generated and emailed to the account email address.\n"
}
},
{
@@ -87,7 +87,7 @@
"element_type": {
"int64": {}
},
"description": "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys."
"description": "This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to disable deployment of default keys.\n"
}
},
{
+7 -13
View File
@@ -29,27 +29,21 @@ resources:
server_id: id
overrides:
backups:
type: bool
description: >
If true this will enable two daily backups for the server. `options.daily_backups` will override this
value if provided. Setting this to false has no effect.
optional: true
default:
static: false
computed: false
image:
type: string
description: The slug of the selected operating system.
example: 'ubuntu-24.04'
password:
type: string
description: >
If this is provided the specified or default remote user's account password will be set to this value.
Only valid if the server supports password change actions (check server.password_change_supported via the
servers endpoint). If omitted and the server supports password change actions a random password will be
generated and emailed to the account email address.
sensitive: true
optional_required: optional
Only valid if the server supports password change actions. If omitted and the server supports password
change actions a random password will be generated and emailed to the account email address.
ssh_keys:
description: >
This is a list of SSH key ids. If this is null or not provided, any SSH keys that have been marked as
default will be deployed (assuming the operating system supports SSH Keys). Submit an empty list to
disable deployment of default keys.
ignores:
- ipv6
- licenses