diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c68a5d1e..5b0ff773 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,16 +1,16 @@ lockVersion: 2.0.0 id: e3bbe1e9-fe63-436b-a42c-05e3e3f77633 management: - docChecksum: e7a742f9d0dd1e6876879540116a4475 + docChecksum: 002faaceab14103f88b30dbd985ce4ce docVersion: 2.0.0 speakeasyVersion: 1.676.1 generationVersion: 2.781.2 releaseVersion: 0.15.0 configChecksum: 10a1c34dd7e930e8b02ddbb2cd997dce persistentEdits: - generation_id: bdcfa4d2-cc28-47b5-a068-7d636ef9a7d4 - pristine_commit_hash: ba49c3d8a4c186216de2a088a660c509a3ac9258 - pristine_tree_hash: da3574276d265de93cf26e3e4c8b6fb107a6e896 + generation_id: 983d37da-37fc-46d5-9ff8-ba1232451d8b + pristine_commit_hash: 7b7cb7a14df587ada8994a3a1360914c9b7c8636 + pristine_tree_hash: d4c5c6c68f08bc4f9e12765ee8cd0a1b5f369411 features: terraform: additionalDependencies: 0.1.0 @@ -20,8 +20,10 @@ features: deprecations: 2.82.0 globalSecurity: 2.82.1 globalServerURLs: 2.83.0 + groups: 2.81.3 ignores: 2.81.1 inputOutputModels: 2.83.0 + methodServerURLs: 2.83.0 nameOverrides: 2.81.3 nullables: 0.0.0 pagination: 2.83.5 @@ -156,8 +158,8 @@ trackedFiles: pristine_git_object: c80bf2c219ae1622f515677d2e6f127473920898 examples/resources/konnect-beta_auth_server_clients/resource.tf: id: 4f79cb66b7aa - last_write_checksum: sha1:ee5ed5bd46908aca532074bc8e58e447fccec48e - pristine_git_object: aa450b8c18729970cb19a380c890676f2480e469 + last_write_checksum: sha1:17c55fc7861a3b2ea95c58af3b8f31684f64b3e5 + pristine_git_object: 7a0e9aa52fd0a21020e035d38805e4801d50b2a2 examples/resources/konnect-beta_auth_server_scopes/import-by-string-id.tf: id: 351abdfb74e1 last_write_checksum: sha1:fa7588c78a97c70b1089add3d1d46853f0e081cc @@ -170,6 +172,18 @@ trackedFiles: id: a44b127425a7 last_write_checksum: sha1:0216912a2a1e21f309bf0046c68d2cf57151db53 pristine_git_object: ede0f012fc5e697e921f184f0329d11d28661e5e + examples/resources/konnect-beta_cloud_gateway_add_on/import-by-string-id.tf: + id: b1db1450b72e + last_write_checksum: sha1:50ef79a428a2dab81108b26f1774c541367fbf94 + pristine_git_object: f32579141bfa6ea7ad84498a94326d337a08fa0a + examples/resources/konnect-beta_cloud_gateway_add_on/import.sh: + id: "236632041369" + last_write_checksum: sha1:c426b5050159e67ce6f1e46f72053b2dce1d5743 + pristine_git_object: 93c1e9bbd1ad3303f9e97de8b21c8da463503a01 + examples/resources/konnect-beta_cloud_gateway_add_on/resource.tf: + id: 875b3b11d43d + last_write_checksum: sha1:82f0cb403f712967eb16b3debdded98279cbd52f + pristine_git_object: fb9f0695d253402c98901ef63eda1447de82fa98 examples/resources/konnect-beta_dashboard/import-by-string-id.tf: id: f03a90968e12 last_write_checksum: sha1:437720f13856aba7df4cd92cc52ee0b779ffa064 @@ -180,8 +194,8 @@ trackedFiles: pristine_git_object: 28c69d75241998f09b5cc0e2619ea2bbbeabacae examples/resources/konnect-beta_dashboard/resource.tf: id: a4c255ed4a38 - last_write_checksum: sha1:68e4f03dfa6a2cc5e5b0d016e7ae2c9bac090ac8 - pristine_git_object: b649e308594eae9d74d06a67334ec4720b866e5e + last_write_checksum: sha1:04732982b4576f4814f384e6c7efe2c9f00528f1 + pristine_git_object: 9c98b58ac885de4dd021c6d03d52e445326b340a examples/resources/konnect-beta_event_gateway/import-by-string-id.tf: id: be42442113af last_write_checksum: sha1:5a364f28aea2518b24bab9a3b2272e39fd921b8f @@ -216,8 +230,8 @@ trackedFiles: pristine_git_object: ee92e6cabb498368d565cd425cf4bf87d394aa2d examples/resources/konnect-beta_event_gateway_cluster_policy_acls/resource.tf: id: e3afe17fe29c - last_write_checksum: sha1:b3e553b921db7255ecc574fcb643c457449c97b8 - pristine_git_object: c8efe74e28dd14312661c4a8b55d2b36117be0d3 + last_write_checksum: sha1:686ec9990c38ebe0011e690b174ceb195ac55a5f + pristine_git_object: a0f9889819e125d1fd9e932dc50ef7799d3eef36 examples/resources/konnect-beta_event_gateway_consume_policy_decrypt/import-by-string-id.tf: id: a997034c7db2 last_write_checksum: sha1:6541ed38b4b58621e82b7db58bcc2adc3feae70e @@ -252,8 +266,8 @@ trackedFiles: pristine_git_object: a8793d37ab9e79d3d9d77d44ef58288f3fb362c1 examples/resources/konnect-beta_event_gateway_consume_policy_schema_validation/resource.tf: id: 9ede8fc237f2 - last_write_checksum: sha1:723787429971873b40fe7400c5b7a33147f465ad - pristine_git_object: 8832df96e73a4069720dc3119842e4e6fa5fe97a + last_write_checksum: sha1:1411ff7684ffbc55a256da9cf72f2067286a04bb + pristine_git_object: f70c1cb5a0f95637cd590d032a3ea9d037e5f734 examples/resources/konnect-beta_event_gateway_consume_policy_skip_record/import-by-string-id.tf: id: 2e9fcc51bf76 last_write_checksum: sha1:18b018e9322df755513eee7096620376bd717f4b @@ -292,28 +306,28 @@ trackedFiles: pristine_git_object: bf91ce0b418549bb73400b2c7f012bcde909606d examples/resources/konnect-beta_event_gateway_listener_policy_forward_to_virtual_cluster/import-by-string-id.tf: id: d130b0db3981 - last_write_checksum: sha1:54541a2d6911bbb107f11038e482448c46c088c4 - pristine_git_object: 9292c30d27e23224f0e0673943d47cd5343e115c + last_write_checksum: sha1:f777c59bc19893b7da4d87aede0dfe0ef469a2f9 + pristine_git_object: d7501b858266fc1a011bd6b6a8e8ba0369b70d6f examples/resources/konnect-beta_event_gateway_listener_policy_forward_to_virtual_cluster/import.sh: id: 93b115670ae7 - last_write_checksum: sha1:d513c7f26a83199ae8a9a701dc03af5ed549ca27 - pristine_git_object: 246315837d5c660cc139092f41133ea2fd4de7e0 + last_write_checksum: sha1:4d6a6dfd4105f6cc4943dbae1d664c5de8b9708d + pristine_git_object: 52ee35c1891268a3bc16aafd725c2106ee5c88bb examples/resources/konnect-beta_event_gateway_listener_policy_forward_to_virtual_cluster/resource.tf: id: 0ad1e03f397e - last_write_checksum: sha1:ffc87221c540f42453e4cfa196730eaf4d6da564 - pristine_git_object: 55457cb8bc07f2940286d7fdb9c7d9066fb5f606 + last_write_checksum: sha1:a15e540c43a2b5be9c3773e628eafb310eb7fc66 + pristine_git_object: fe0b391dd9dd08baa0ece0894d76112a83c74ec9 examples/resources/konnect-beta_event_gateway_listener_policy_tls_server/import-by-string-id.tf: id: 5a8ada8ba2ce - last_write_checksum: sha1:c0c1928712c7ab1f0b5cd661c466915a51dd009b - pristine_git_object: 2e6ffd5ed5c95237231e3e2d1d34676a22aaa09e + last_write_checksum: sha1:2c5850486e565b329dad7ac88e2b8fbfe34b565a + pristine_git_object: 47307594c955711a572b752f82c639f2e03be4b4 examples/resources/konnect-beta_event_gateway_listener_policy_tls_server/import.sh: id: 420d0ddacabe - last_write_checksum: sha1:e44747172dfb18995c3a27b93115f5e42148208c - pristine_git_object: ef0648c8dde4019624350c2c64e4a250ac53838c + last_write_checksum: sha1:acc8898ccf83aa4034b82876a5e6b28332fa6a36 + pristine_git_object: ae73ee1ef036a934095b54201f005913a5f133ed examples/resources/konnect-beta_event_gateway_listener_policy_tls_server/resource.tf: id: 7b5529d457ab - last_write_checksum: sha1:8a0c57ae9ec99350ad21bab46a53fb64e38cd745 - pristine_git_object: 496a9828a47ce03f3274ca0279120009346aa7b1 + last_write_checksum: sha1:b9aff6c691c94f3e9b177bc9ff405c60cdefa79e + pristine_git_object: 54901ef8ce55ce5aed48e16ea30d83c7b1d27348 examples/resources/konnect-beta_event_gateway_produce_policy_encrypt/import-by-string-id.tf: id: dc778209e41a last_write_checksum: sha1:49e82e34c777d72adf9892d508d23cc5ee8d206d @@ -324,8 +338,8 @@ trackedFiles: pristine_git_object: 69e58d3d6c55bddfe5678f7e46096d0534333f48 examples/resources/konnect-beta_event_gateway_produce_policy_encrypt/resource.tf: id: b82e999dca63 - last_write_checksum: sha1:96f3a09fae9d628cc6da00dd051c426202c56cc0 - pristine_git_object: b93e29137ac9f6fce03d22a6b76ed136cb163bb2 + last_write_checksum: sha1:16f5dfb742f61896edb187e15081aa03cec4d336 + pristine_git_object: e72b1cad8097d9e5323c968223714afc73caf697 examples/resources/konnect-beta_event_gateway_produce_policy_modify_headers/import-by-string-id.tf: id: bb9587b41c3e last_write_checksum: sha1:d46bc7686164b7551ed4902aaad67a9307bd5e80 @@ -348,8 +362,8 @@ trackedFiles: pristine_git_object: 6ce456e7d1dde99f4908998c095f29c3a615c155 examples/resources/konnect-beta_event_gateway_produce_policy_schema_validation/resource.tf: id: 7b21a13c1211 - last_write_checksum: sha1:8ab953eba1b18a415982772600243c07eb94ea96 - pristine_git_object: 739f936cc5a1ea40bf18515c4d0ac8177dfd4b26 + last_write_checksum: sha1:0bcb4e85f2d9ff04f54c9334588294990ddb2a5a + pristine_git_object: 7354a573cb9a811488ac782c357c244d667bb504 examples/resources/konnect-beta_event_gateway_schema_registry/import-by-string-id.tf: id: 746bab37e919 last_write_checksum: sha1:b47745703fe64acbf914bb12ed4991f2fd120beb @@ -916,8 +930,8 @@ trackedFiles: pristine_git_object: 5e2537e3fb800784e4a4864dfedd4f2abb974c8d go.mod: id: c47645c391ad - last_write_checksum: sha1:0e139c5e436f6db6bddf78b4d5984074fb68a9cf - pristine_git_object: b0bf1011f35b7c300e60f99f71854d4ee0afaac8 + last_write_checksum: sha1:4c8fee4be0f719c8d1c07c0d9d61b2f24293efe1 + pristine_git_object: 7edf8eecc9b2afe63fe7a13cedca2a559f845ca8 internal/planmodifiers/boolplanmodifier/suppress_diff.go: id: 3cf85b98963e last_write_checksum: sha1:514a576081b053eca73d5376de591929138489b3 @@ -1032,12 +1046,12 @@ trackedFiles: pristine_git_object: 7209dcc8c080610d81055c01c774b9a6bfa0fcb9 internal/provider/authserverclients_resource.go: id: da47f1d88fae - last_write_checksum: sha1:1b73f51ae6ea6be8aa03860bf8f9e88d2829b00b - pristine_git_object: a39567e1a62a218cba28710433f350eab7289648 + last_write_checksum: sha1:6790ae50d21d7e698ab273ae2f655ded32561622 + pristine_git_object: be2ce396c55989f97cd31cffca404b7f7cf92128 internal/provider/authserverclients_resource_sdk.go: id: e0c9ec7f117f - last_write_checksum: sha1:7fa1708335dd4149d61eefe82eea2c3445af8eea - pristine_git_object: 9ab8cc09e379d39a8f24123c1d6696d260a40fb6 + last_write_checksum: sha1:6a4226b2793736c186c5d2e1ee0a0fc7abbfb945 + pristine_git_object: 8545a9aeca6156db50d17017c9d25c90bcc5a6c1 internal/provider/authserverscopes_resource.go: id: a72acbc13263 last_write_checksum: sha1:8b059c4d7b3ef199d435826d0773f4928e81b341 @@ -1046,6 +1060,14 @@ trackedFiles: id: 078a9e050e56 last_write_checksum: sha1:bb7ec07a621b5d9405f299a4b817350ba497f071 pristine_git_object: f1c58b0215df0ac6a5b109ed359cecc3d50f972c + internal/provider/cloudgatewayaddon_resource.go: + id: 35eb5cdbfe40 + last_write_checksum: sha1:ebde0b473d97b8655cc5dda6dcbe960ce4858bda + pristine_git_object: 837f3dfd80145a6ed82c6a10a4574b197a704dd3 + internal/provider/cloudgatewayaddon_resource_sdk.go: + id: a4f9b8f4cb77 + last_write_checksum: sha1:abb00e17a00ada1bd25564febdd3e13ef0025999 + pristine_git_object: a28dac8db0b57114ba4ccb2486f9be10452cc075 internal/provider/dashboard_resource.go: id: ed676b0ddc21 last_write_checksum: sha1:be2bb57eda48bf07ce467e7f852b7c644c0a52c5 @@ -1064,48 +1086,48 @@ trackedFiles: pristine_git_object: 9cc825140e3e0540382d1832fde8f2ca10f3db7a internal/provider/eventgatewaybackendcluster_resource.go: id: 3fbb84e4cb34 - last_write_checksum: sha1:12a8744e6fd47a59516d51f5f2b9253312f5b454 - pristine_git_object: 862afce077ec73d91874f532a70c369151086239 + last_write_checksum: sha1:c9c761c407a49b1ae9a4f35a1e3e7a549d56378d + pristine_git_object: f75de08d127e3549dfb0a68630a3254cffffd7eb internal/provider/eventgatewaybackendcluster_resource_sdk.go: id: 85e6d3ca01be last_write_checksum: sha1:a218f8b685f380c675f490b942e7afc3ac9c4574 pristine_git_object: 87fad2ff86765ad22004ead4cb14cff042e63cc6 internal/provider/eventgatewayclusterpolicyacls_resource.go: id: a9d91722b3fb - last_write_checksum: sha1:039f5428412cb2934c8e368424c64f2d900fac80 - pristine_git_object: 3c4ddca42bafa67d8600269b9b3887109a44de26 + last_write_checksum: sha1:f05a9b852a8e111d65c40792e6e8f7a5317d2a7c + pristine_git_object: db9bc229b3b64b615a462a153ec208c92ed546b2 internal/provider/eventgatewayclusterpolicyacls_resource_sdk.go: id: 7819316e947f - last_write_checksum: sha1:c0f6ccac872e4575d68a77a46d68c3d337317610 - pristine_git_object: 566702a49c0278eba9264ecace4bf2e79557772b + last_write_checksum: sha1:68452ae00368f119ef0c93432978c3163028ff9f + pristine_git_object: 747536a6435468ca4c9b61fd2dc9446d79e71619 internal/provider/eventgatewayconsumepolicydecrypt_resource.go: id: c87df885eb12 - last_write_checksum: sha1:2f9d134f42798e94c0e4867ba556a1255b0820e7 - pristine_git_object: 649508bfdab676b54c8ee3218a78bfbca641fcca + last_write_checksum: sha1:922f2d60dbb74d77a10369c8a2efb6a7a9ec98bb + pristine_git_object: 88b6359875a9394a0e6af80b85789ff24ff26b34 internal/provider/eventgatewayconsumepolicydecrypt_resource_sdk.go: id: cc22f98163ef last_write_checksum: sha1:c2a9f4d7e9a4b92108e751d9516a5e9992f4fe38 pristine_git_object: 186ea0b06afaceedd703ec5eb356bec21dc4af09 internal/provider/eventgatewayconsumepolicymodifyheaders_resource.go: id: ca46291e305b - last_write_checksum: sha1:2f963179296e4e6691e723dc6031c693cd089881 - pristine_git_object: c5a52c7e966ba186a22eed7389b15851dff1bd95 + last_write_checksum: sha1:ca2ffedb4dd008c192221fea7249bff16ac4f50c + pristine_git_object: bda64ba0ccfc00581b27dca650be95c288a2350e internal/provider/eventgatewayconsumepolicymodifyheaders_resource_sdk.go: id: afb0f646c243 last_write_checksum: sha1:0f7dd504b48d76a1ab1eeb377c89c182ceea7267 pristine_git_object: b6293719f6b378c4e51ed8a105c1fba50f0b9c1b internal/provider/eventgatewayconsumepolicyschemavalidation_resource.go: id: c4eddaff3ee3 - last_write_checksum: sha1:939d6ac0efba368c07774f39d7368f72c744eb31 - pristine_git_object: c5a4bb48104772cc6eec1c92a66ba3fe08295896 + last_write_checksum: sha1:c257f49078bde8c060016d00aaa43ca61039a80c + pristine_git_object: 19776150ea261bfdfed04c770d28399ef02801bb internal/provider/eventgatewayconsumepolicyschemavalidation_resource_sdk.go: id: 7eabb92c2874 - last_write_checksum: sha1:313fa004da9dc7106d4164bb2ec3da9f323425f5 - pristine_git_object: 10300fbd10d4a71d367faae783dfebb77388c44d + last_write_checksum: sha1:c61f3fb6227c1ac8f84e3bc734c742036fe9b4dc + pristine_git_object: 3e7532d51e23bdd3bf3102319c242c35550b424b internal/provider/eventgatewayconsumepolicyskiprecord_resource.go: id: bb800e741a9a - last_write_checksum: sha1:0fe0f3dce2a17817a2150cfd7590fa0d44510194 - pristine_git_object: 114888bc38567ff19f2abe0582a4890de69a3498 + last_write_checksum: sha1:4f513d3db32fe326b5ff6f47bf3805a34bc3f917 + pristine_git_object: 2b5c51de1ae440ac93b24b576d060e604a23448e internal/provider/eventgatewayconsumepolicyskiprecord_resource_sdk.go: id: ddd5ac0c39f9 last_write_checksum: sha1:ab93d188a8a7f7074136f62aea410097e154b129 @@ -1120,52 +1142,52 @@ trackedFiles: pristine_git_object: 19389bcd658c420d6743f3dc23fdfc40c49c84f1 internal/provider/eventgatewaylistener_resource.go: id: 76b0c7bfd317 - last_write_checksum: sha1:160a8cd5eaa0aa28f198e727ecfe811fb01ef5eb - pristine_git_object: 2aa68ea4c1a9d7991a8a485925643bac2a05a2b6 + last_write_checksum: sha1:5a01dc182ae1c38ccd864c8c51a2d6ea003c403c + pristine_git_object: 31f126c4c9ebc96639382f496c3aff9aaeb1de85 internal/provider/eventgatewaylistener_resource_sdk.go: id: 5652ff3d366b last_write_checksum: sha1:f951c911026b9eea4236af01bb6d659161c953dd pristine_git_object: 475090d6552df74e6139e9261b0e9b77d15ac5ce internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource.go: id: d83cc30df1d5 - last_write_checksum: sha1:5704d1cc1f853c1ad438e54e355420e772316aeb - pristine_git_object: ba1f4b9b1e6ef46481c8fb0cf7a751622b4ea18a + last_write_checksum: sha1:b9847118ed7160320ac19499b391122eda1c6d38 + pristine_git_object: 3f0d4adfbf2ee01c74fbf8910fa4587d43abe707 internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource_sdk.go: id: 7b7510b81d32 - last_write_checksum: sha1:edd9f007288d8af73b835a0471145c2e0e9fc620 - pristine_git_object: 1b8c1633393b8d62304779088c6472e74f737c58 + last_write_checksum: sha1:414e508af6ad1942139ff3cfa4f7c475ed5ba183 + pristine_git_object: 1325f879a26a459c7dd5ff245a9076b45b8eddb4 internal/provider/eventgatewaylistenerpolicytlsserver_resource.go: id: 37fb90ff8bf6 - last_write_checksum: sha1:d989a31940e6b6c3f1dacf090e1564b4f9cd3e55 - pristine_git_object: 69c71ad20453bf27167f4057739951bc4dde3f65 + last_write_checksum: sha1:79ec0e6211e3cbef42f40b8620ad013ab1307367 + pristine_git_object: 57fe851d64f392747350cda37c4ffbf8b77b900c internal/provider/eventgatewaylistenerpolicytlsserver_resource_sdk.go: id: 20bbcfa15dc4 - last_write_checksum: sha1:030875d98cc9c78fca90e9de3b2069e364a1a92c - pristine_git_object: 8db690d09a08a3c2cb48a400e3307b03f3dac740 + last_write_checksum: sha1:7ed3fe993019589edb7ae187bbd3f9c77e6feb8f + pristine_git_object: 867a523a2d64759e9df74268a1edbb4b26ea095b internal/provider/eventgatewayproducepolicyencrypt_resource.go: id: d5e93dbf411e - last_write_checksum: sha1:c7b5270b333ab6a33f8b6ca0c09a3f912e024051 - pristine_git_object: 06ce6499d7f1369b72739fd1b1d3869e7107b63f + last_write_checksum: sha1:83729d4f498427bc2930eef8969232ae75c51c86 + pristine_git_object: da5b08d6b967ffe9e477b02133208e573219f648 internal/provider/eventgatewayproducepolicyencrypt_resource_sdk.go: id: 5ae15c6d918d - last_write_checksum: sha1:a88bde416b6f050262d36ad3ef32f84eb6334e43 - pristine_git_object: 23b052d5b272cec1ae70116b004af911f3d1b508 + last_write_checksum: sha1:b0d106b71152971a4585bee7e940f76ecaa6aa17 + pristine_git_object: c1fecef54d748284c8d22b29b72794736309df58 internal/provider/eventgatewayproducepolicymodifyheaders_resource.go: id: 8f53363af814 - last_write_checksum: sha1:51796c25af4c88443649d86741581b6f72a18c57 - pristine_git_object: beaba9c39b82334c2c0022e74752469a5c01a4df + last_write_checksum: sha1:d5f11765759da8957eb7d3cbb161d954e884c000 + pristine_git_object: a1fc65911c527fd0ab8a8ad494c10208f1cb776f internal/provider/eventgatewayproducepolicymodifyheaders_resource_sdk.go: id: dc4eb8450e4a last_write_checksum: sha1:fb8e996e721e46873745a970fa59ab90e93c0335 pristine_git_object: 9fa8aa1cc7ad002b8e0362c530e829e2e8b9d0d0 internal/provider/eventgatewayproducepolicyschemavalidation_resource.go: id: 91c3b216a135 - last_write_checksum: sha1:6559a665c977079863e74d52f06c400ab6248687 - pristine_git_object: 2923a758027025aac87afa4ee01b2d4bf5c0e3b1 + last_write_checksum: sha1:06e622b3ae84de14ef50695db1909a8f2467009b + pristine_git_object: b1f53d852fe3356066640bdd375450cbb4ac22a4 internal/provider/eventgatewayproducepolicyschemavalidation_resource_sdk.go: id: 60a8b01272d3 - last_write_checksum: sha1:6134b88e87a645b18361973fe603fa4a6c5a51dd - pristine_git_object: e9c75ee8a13b3e5cb1fee8d67a2948b38e5554be + last_write_checksum: sha1:8cdcd8f41ed275a4ea3d4b05948cd851a5a3a563 + pristine_git_object: 3781fedf0d83d93a4aa2d786016f233a96aae730 internal/provider/eventgatewayschemaregistry_resource.go: id: e5a89583fd6f last_write_checksum: sha1:f01b62b37ed4016b4220ef982912001dc973f894 @@ -1404,8 +1426,8 @@ trackedFiles: pristine_git_object: 9c30c87d09da835692f619134a8e7d038e9a70ca internal/provider/meshservice_resource_sdk.go: id: c265886770aa - last_write_checksum: sha1:6a33d15fcdb154fba82aa28607a4614cc3a28b7f - pristine_git_object: 487a719033f5d56a10807156f56e0fadc1ddee04 + last_write_checksum: sha1:723a773357409108a7955308d8fbe52e6def665e + pristine_git_object: 1f6937bea707c1bcfed8c7392bf06e4c16f497c7 internal/provider/meshtcproute_resource.go: id: 8c50f06a5b49 last_write_checksum: sha1:cfdc6be61021359aeff316233d8f3cba666f70bc @@ -1560,8 +1582,8 @@ trackedFiles: pristine_git_object: 1c71c80fb5c2453180d6fc79fa5d5fa1d78b9fe0 internal/provider/provider.go: id: 1e7e86841cf3 - last_write_checksum: sha1:ea416dd0f5e5bc4cd578e70b7bde57c95fbf07d6 - pristine_git_object: 6fbcf28cb5ebf0f57aaa39dc7904cba06beda493 + last_write_checksum: sha1:c9d47e6312d53ed91a5ef851bf8377ecf8d923b0 + pristine_git_object: 107ee966466c35290e2be19f62a5d2a1e3aff006 internal/provider/reflect/diags.go: id: 35b6b44972e2 last_write_checksum: sha1:ace8bc53054bb1d8ee8689acf3e4323de75a6297 @@ -1674,6 +1696,10 @@ trackedFiles: id: 9756c197c181 last_write_checksum: sha1:b4cca7d362075e874d069680723e2fb5902385bd pristine_git_object: 9662e7e8e82d9f67ea70dc281f8d99565ccbf1e6 + internal/provider/types/add_on_owner.go: + id: 244580eacbc2 + last_write_checksum: sha1:01dccfa6734759dabf886cdcc53631c578dc2b9d + pristine_git_object: 277fa4da267c28ca4a7cf97a2efaa217e64efa42 internal/provider/types/addresses.go: id: a88057fbd7fa last_write_checksum: sha1:c7ca65cb8da8312a6b138d5a129d9e587b742943 @@ -1858,6 +1884,10 @@ trackedFiles: id: 9dcdb4de45c4 last_write_checksum: sha1:a731062fa52a67d54c9bc504514030e8ad603391 pristine_git_object: bf52dd5a46ad44f1cab1165bd30b155a7f3b27ab + internal/provider/types/cloud_authentication.go: + id: 5225007dd97b + last_write_checksum: sha1:209931e25bf2ff491b2c5306a227600db677d0a1 + pristine_git_object: e51ccdeeda08243233a26bfcd9ffdb551d6b97ba internal/provider/types/cluster.go: id: 5b0b3ef72631 last_write_checksum: sha1:b20f36c3974dd24168b43a326b7e52d41090053b @@ -1886,6 +1916,14 @@ trackedFiles: id: b3703adc8327 last_write_checksum: sha1:451016e0e419266d8821aa56d6c0e7bfa390309b pristine_git_object: dc0cc6ba9ff451f7b84aaa12133f6405d54b95c5 + internal/provider/types/control_plane.go: + id: d969127f6dbc + last_write_checksum: sha1:ef459fb5dc22220ff666764fbc212dc732568a87 + pristine_git_object: 2044cb89a1065680879dead7d154103860fe1296 + internal/provider/types/control_plane_group.go: + id: 71c8a84322d4 + last_write_checksum: sha1:6de3df93c75d4543c80bef85eea28ede0749f421 + pristine_git_object: 9a9bdf51a55a20c2544c44857ddd14f70e1f217c internal/provider/types/control_plane_reference.go: id: d8f23088557b last_write_checksum: sha1:2c94e68c42d004aa409d23e61d216201d7a975ea @@ -1894,6 +1932,10 @@ trackedFiles: id: 1436cee260be last_write_checksum: sha1:9db5bf38539483d7b6dbff8c4c1dfaedbd9fa7ac pristine_git_object: 04f91dfcbf4487f4b1d3e14a4dbaf77674055896 + internal/provider/types/create_add_on_config.go: + id: 0956c96260c2 + last_write_checksum: sha1:dcde8352178b16fac011a556c01ace6183e69ea6 + pristine_git_object: 03e4666bf02c82fd9e8336ad577f7fbeb2b90606 internal/provider/types/create_api_version_request_spec.go: id: c133e5763764 last_write_checksum: sha1:7f46f6c7bdb126c7da49ad185c137a1c0843f6f2 @@ -1968,12 +2010,8 @@ trackedFiles: pristine_git_object: f381342c198b5eb704ee6138f110610db544f927 internal/provider/types/encryption_key_static.go: id: c60b5684ae6f - last_write_checksum: sha1:aba702f277ba611f42835dfe8974f09a8e9c92f0 - pristine_git_object: c96d885ba99923a111568f3f86f51fb867e4cfe8 - internal/provider/types/encryption_key_static_reference.go: - id: 33c13a43954b - last_write_checksum: sha1:0c16e76bb1e885e9dc5c7a686f71ddfe3b900bbe - pristine_git_object: 8c036f24962bb2349e5148a6df8d9897d492f043 + last_write_checksum: sha1:d663c81f9b9d1e12785505fddc9b2e46f17bdaf7 + pristine_git_object: 2d34da7f802184f5f30c762354525f90bef7a706 internal/provider/types/endpoints.go: id: f71684d397b4 last_write_checksum: sha1:377681927d6f6e58652befc50659eea0b0a6c3da @@ -1996,8 +2034,8 @@ trackedFiles: pristine_git_object: c60938a748cc952c47dc9745649475a7ce7bf781 internal/provider/types/event_gateway_acl_rule.go: id: fbd6fcd9996f - last_write_checksum: sha1:a97b6d01ffae343dc33829a67f6999b8fc298212 - pristine_git_object: 8ca5fa228a4f444366b0d13c93dbcfe662282dd4 + last_write_checksum: sha1:8b63f62f6af67a06b695bbdc5909c95770cd44b2 + pristine_git_object: 866d970207af85d5170e7484ad93b42e901e29f8 internal/provider/types/event_gateway_consume_schema_validation_policy_config.go: id: fc17bc036d75 last_write_checksum: sha1:48f959b5b737933a0793786750e885d6cdaaffd8 @@ -2092,8 +2130,8 @@ trackedFiles: pristine_git_object: e8c48c692ce2601bd275308fccf5c29fa9ae0dd0 internal/provider/types/forward_to_cluster_by_port_mapping_config.go: id: e4f5cb354463 - last_write_checksum: sha1:4ba9b2d7ca180c7ceb8870cd8aa467eccad921ff - pristine_git_object: 4a7487a9d60c9dcf746b73508f68b048654d7ba8 + last_write_checksum: sha1:8e930a79fb4616f53dcf8fa2ab05cae9c32a3eea + pristine_git_object: 97d497518fd568548eab4c4c4c1dc9ad27c2b0b7 internal/provider/types/forward_to_cluster_by_sni_config.go: id: e8c369e3448f last_write_checksum: sha1:d55c6ff1762778d3544bbde4fdf2199741eab60f @@ -2210,6 +2248,26 @@ trackedFiles: id: 8828ea00f74f last_write_checksum: sha1:5d52c32afec3a6f25998e803ae97c278d730999f pristine_git_object: 593e78c989d1914ecefb160768bcb8d180ad0d34 + internal/provider/types/managed_cache.go: + id: a6f396600eb5 + last_write_checksum: sha1:262dbd7a90d9655e90195c620d288b55a30bcd77 + pristine_git_object: 17e1959ddf28265ecb8687318114d3762f463455 + internal/provider/types/managed_cache_add_on_config_response.go: + id: b24ceab0be9f + last_write_checksum: sha1:392970c9e50c4a92fe7570a549cd404dfa2d527e + pristine_git_object: 2d1515260f0ad9179ba07501c2d546600d10bf38 + internal/provider/types/managed_cache_add_on_config_response_state_metadata.go: + id: c622cfbcdc54 + last_write_checksum: sha1:482d63ac3c5c488c53ebdbab7b6c2846c8c2cd78 + pristine_git_object: 5716532dd38683be62d2d62954c5f2847691b719 + internal/provider/types/managed_cache_add_on_data_plane_group.go: + id: 453cc1fbed03 + last_write_checksum: sha1:8cde3effee70ec7b1fae03e896f773d692c75bb3 + pristine_git_object: e48ea97d4ec55c4effd7ae397d46418bfa32ec19 + internal/provider/types/managed_cache_capacity_config.go: + id: a6e75a849f6f + last_write_checksum: sha1:96285945025c345454efcb46cc1db9c542cccd68 + pristine_git_object: cf393ee230b2e9eba0ff632e6fcab62a6ec4ba69 internal/provider/types/match.go: id: 683334e1c79c last_write_checksum: sha1:578c4f37d0a26e8b241ea95b33239210e6c62191 @@ -2834,6 +2892,10 @@ trackedFiles: id: 4513152bb648 last_write_checksum: sha1:3d47765f8a1d15d8c8ac4c05b0f48cb83693347f pristine_git_object: 8bbc4e73680b64ae8c7cac68e6ac74ca0231d044 + internal/provider/types/resource_names.go: + id: 8c5bf91388d7 + last_write_checksum: sha1:b1c82e4559250f4291a9be71920e2aca106a6245 + pristine_git_object: 8e0b89542d8ad5d1f3f8e5dd540ac86460e6c88a internal/provider/types/resources.go: id: a09ef6208297 last_write_checksum: sha1:bc5c6dc5024788e53266d3c7aef494a7ecbfb956 @@ -2880,12 +2942,8 @@ trackedFiles: pristine_git_object: c8ca5ad397978d93caf18a678401dc6240e31956 internal/provider/types/schema_registry_reference.go: id: e76cbbeb2428 - last_write_checksum: sha1:4fc55b00a9dbf77f27a8b00d5b736bcda2c8341a - pristine_git_object: 115150be5b96b8a4ab8a3bd658985771b623f542 - internal/provider/types/schema_registry_reference_by_id.go: - id: 3dd0da1adb70 - last_write_checksum: sha1:3b1230af299917ab0d350391b5871227e186821f - pristine_git_object: d9bd514f1698b9fdd4bfdd0596b34d5fa5ccd927 + last_write_checksum: sha1:3b2730cb76076651b6cc86e73cc2ab58ad59ff0b + pristine_git_object: 9065d87ffae097009ed3d342bab19d6ed1185bc6 internal/provider/types/secret_ref.go: id: 6f7b005bf935 last_write_checksum: sha1:afa3cadb9395c09e3b9ab05297a66ed315e6308c @@ -2922,6 +2980,10 @@ trackedFiles: id: 3e579aaf6f65 last_write_checksum: sha1:9b448258bc5cea96117af31bd145f0eeb2a0eed6 pristine_git_object: 7b2a02e0884d65f06ae1f5e4c84e7134c3775d9b + internal/provider/types/state_metadata.go: + id: 35bf24b26a11 + last_write_checksum: sha1:ae38b34125e5b27b619ab659941c0f3a32ab7755 + pristine_git_object: a9b2d62967c3b07190cec01f164522d7762ad98c internal/provider/types/status.go: id: f7605ef7c692 last_write_checksum: sha1:c5588ab408e2333471bd28cc5d7db01eef62f950 @@ -2958,6 +3020,10 @@ trackedFiles: id: 4795f1f940b0 last_write_checksum: sha1:7694a7bb12d906d04cbc97dc8a044dafd4f17778 pristine_git_object: e102cfa34fa19f3d95e5d8dce08719e3fc78bee9 + internal/provider/types/tiered.go: + id: e2f864426e0f + last_write_checksum: sha1:94d1eb62b62247b48242c03e0e5197f3d7a19782 + pristine_git_object: 6db6615a5dcb38093beb749c61f938063fa95f6f internal/provider/types/tile.go: id: 418c7dafe589 last_write_checksum: sha1:d5f41bf70470b3c753b3f46a7cf4e9c3a89b5792 @@ -3086,10 +3152,6 @@ trackedFiles: id: dd003c159a56 last_write_checksum: sha1:e57423517b612c2fd6198abe2e99f2edee554e2b pristine_git_object: 9b0aa85825a18e7e925ea91ffadcf0c585565b9c - internal/provider/types/virtual_cluster_reference.go: - id: fb627aac56bc - last_write_checksum: sha1:ee6bb02d026f1414fed51bd91eeadd3c00891cd7 - pristine_git_object: 035319d4284bcccec41a7f117778786bafb49ac2 internal/provider/types/virtual_host.go: id: 275dba020d86 last_write_checksum: sha1:672bdb8a6414f7ae910998af60183418d4d37346 @@ -3186,6 +3248,10 @@ trackedFiles: id: ce7fc0b97fe5 last_write_checksum: sha1:714e51491a2f2dc41422f8c49a71215f0556e675 pristine_git_object: ecd5e1c2dfe5623a470dcb68a07bcb922b9fd252 + internal/sdk/cloudgateways.go: + id: 40b5a9f732b4 + last_write_checksum: sha1:5371c55bcaccede3ceb3dfb8b0430d5a2f30a006 + pristine_git_object: c2ce165c20fcbc1330ec07028e6f2cebae4c327d internal/sdk/dashboards.go: id: 067fe5157d4e last_write_checksum: sha1:a1d1affb7e80b79abceb334f2b15cbdf620ae4f8 @@ -3312,8 +3378,8 @@ trackedFiles: pristine_git_object: 0415b536598baa76c5d1a8fc32816ed1b83f9137 internal/sdk/konnectbeta.go: id: 34b8a82d72ce - last_write_checksum: sha1:bc27461c55315dfc8bf9c17abf4204846f11ef5d - pristine_git_object: 629064ac7f16f76e6138dedc7a4753b9b7a19751 + last_write_checksum: sha1:05b83bfcd8316175ad7057ec56a1d6f6cb8e8346 + pristine_git_object: b7e684089d0df06bb3439667edab6ea69c5baf7d internal/sdk/mesh.go: id: c3f36614baba last_write_checksum: sha1:15d8c778a2a2286b003fcf6225acdb8343d25c30 @@ -3418,6 +3484,10 @@ trackedFiles: id: 19b5a8d3586b last_write_checksum: sha1:5d65fce5049df7c5113e11c9ccb1e4c46b91901c pristine_git_object: c633d568d96b5297c7d2edfc9d22fc717428edf1 + internal/sdk/models/operations/createaddon.go: + id: c72a244c1276 + last_write_checksum: sha1:4abc4c7b2d2bb9372a1b6cbe3960dcadbff38671 + pristine_git_object: a454cce15bbee7a1a00db61fc86fcadeb7d744e0 internal/sdk/models/operations/createapi.go: id: 86fb3550322c last_write_checksum: sha1:c700b90069b7b8c286b4cd53474053221e518bca @@ -3476,12 +3546,12 @@ trackedFiles: pristine_git_object: 0c9cb15f4264fdf5ec63f70205f15e4c7ace86df internal/sdk/models/operations/createeventgatewaylistenerpolicyforwardtovirtualcluster.go: id: 77ce2d82c042 - last_write_checksum: sha1:7de7b775a0a512b71f3b504d94a5b050166c9db1 - pristine_git_object: bdab73d75fd07f99cddac40bb71975cdedf18c9e + last_write_checksum: sha1:eb849cfbdca77742980cc843fd7d21ba58732552 + pristine_git_object: 546ae80f48ca6e873630ae0c891ad8480352a778 internal/sdk/models/operations/createeventgatewaylistenerpolicytlsserver.go: id: 88bc7bb68e71 - last_write_checksum: sha1:6c41933c83af22092f4130dd7a65876dc5849023 - pristine_git_object: 3f265b8ea54f68ee35adea2e76e8f8d39ddc36c6 + last_write_checksum: sha1:6562c926cafaecda835632d2e6eac5cad21319d0 + pristine_git_object: 87d49edccabb7e7a5329e95c3585a312cd2694a2 internal/sdk/models/operations/createeventgatewayschemaregistry.go: id: 6518fc45014c last_write_checksum: sha1:45ea1d46c82dc257a03e09bde7b3ae5c7d0b228b @@ -3578,6 +3648,10 @@ trackedFiles: id: 20c3d23a7c26 last_write_checksum: sha1:9cf4a6b942946c2a53958ac868e807544ee19710 pristine_git_object: b23a22d9ac5dff0842505a12123eeb72971d8d1c + internal/sdk/models/operations/deleteaddon.go: + id: af0fda17f11c + last_write_checksum: sha1:d62fc1568123b4de1ab52b4f3cac91505165639c + pristine_git_object: 5d27212ee56d1b62e0931a8b3327e181e5fd3947 internal/sdk/models/operations/deleteapi.go: id: 452cbeb96903 last_write_checksum: sha1:768b616aa02b981e88cd172463dc4d3b59bbf94c @@ -3632,12 +3706,12 @@ trackedFiles: pristine_git_object: 9c72eec5164768cfa427f2333e31a470d4d7ee8e internal/sdk/models/operations/deleteeventgatewaylistenerpolicyforwardtovirtualcluster.go: id: 0b56b50e7283 - last_write_checksum: sha1:4ab444acb506776088b4804d1748b78dfe983cfc - pristine_git_object: b68449a5608c3dc89b9bdb4de8bca350d3a598e0 + last_write_checksum: sha1:c2ed2c4874bf0b3a863187649a1292a83c4ea6a2 + pristine_git_object: ccff64cf680cb3077af30938378e46a499289b1c internal/sdk/models/operations/deleteeventgatewaylistenerpolicytlsserver.go: id: 48f310ae42b7 - last_write_checksum: sha1:4de5dfe3f52d752d2798b5d36045bde5838c98da - pristine_git_object: df0f8e07e350647ad1cc89b978fe43b4b4b0217f + last_write_checksum: sha1:743e23bbf424bc0dfe2e9c67eecd618ef76cf299 + pristine_git_object: 95f6211fc4e6fc31b73dafe7285d71b7cba9b15e internal/sdk/models/operations/deleteeventgatewayschemaregistry.go: id: a3d91efa8790 last_write_checksum: sha1:09891a5a98c1c45bc3e1b7996ce90e55dfdc2ce7 @@ -3882,6 +3956,10 @@ trackedFiles: id: f6cb5b064588 last_write_checksum: sha1:183d7f4bb7b5cd7da2a71b0ff366e1aebc072bc6 pristine_git_object: 3002d10d6515dc695ba08c938dad2dde9daa34b3 + internal/sdk/models/operations/getaddon.go: + id: 443a3b973812 + last_write_checksum: sha1:9b8bb407948875219c833641c96a60860db6d55a + pristine_git_object: f23b3ef58120597d3320832f65eddaf2f112e304 internal/sdk/models/operations/getauthserver.go: id: 400b28b11c53 last_write_checksum: sha1:7cb7108b1e89e7c61fc494acd9a7b0bc360eb73c @@ -3916,12 +3994,12 @@ trackedFiles: pristine_git_object: fce934f4fe4c0805e757174d9e05c631b574d940 internal/sdk/models/operations/geteventgatewaylistenerpolicyforwardtovirtualcluster.go: id: bb0e65bb32fa - last_write_checksum: sha1:1e6522f846a83cda729bdc6781b39a08e09ef963 - pristine_git_object: e3713e3c5605901d053785517caeeb441134bf5f + last_write_checksum: sha1:fdf637e89f68f5e6b858c157122b2b6aa27ac20b + pristine_git_object: 2910ba529dda21ad184ef8f43f5020f51f677f7b internal/sdk/models/operations/geteventgatewaylistenerpolicytlsserver.go: id: abf09fd4c151 - last_write_checksum: sha1:2cbea1d0977ff7e9f9ba4854c9449b9446a020d4 - pristine_git_object: 1a596f2e5e1acc70787d24604a8a7f742f401aba + last_write_checksum: sha1:b3135058ab34376d80a936747fd89aa6938df180 + pristine_git_object: c95cd6d0cbfa346c4c1aec7775ef00c4fc9888a7 internal/sdk/models/operations/geteventgatewayschemaregistry.go: id: 8d26a22b4538 last_write_checksum: sha1:372f3aed78715e30da56ee354cffc80400627c3c @@ -4464,12 +4542,12 @@ trackedFiles: pristine_git_object: 921e3bd27b2845d882d8458cd96171e9dd8ea5f9 internal/sdk/models/operations/updateeventgatewaylistenerpolicyforwardtovirtualcluster.go: id: bc886f68609c - last_write_checksum: sha1:b7513341606dc7af341a93a59888dee561e898d5 - pristine_git_object: dcc0eebc58aa653c3e149063dc578859277a3696 + last_write_checksum: sha1:f3a1118fe3f75accea49338733841b5c37286707 + pristine_git_object: 3b34a9306ffb9677806ce910e733f86a3afee5f2 internal/sdk/models/operations/updateeventgatewaylistenerpolicytlsserver.go: id: cd1e08e2a1b2 - last_write_checksum: sha1:b6966518486d484139a860056e2735d95f8b1f20 - pristine_git_object: 2374cb8124711f78f157cf1848e61d2130335db5 + last_write_checksum: sha1:f1e29fe89af8d8b72b63f92379e52912f1768554 + pristine_git_object: 3b5505096b7eb25ae13eccbd901497557d340a30 internal/sdk/models/operations/updateeventgatewayschemaregistry.go: id: c05ff9c2ed36 last_write_checksum: sha1:57c586be5385e3f2332e30d3ba72ce660de2eac8 @@ -4586,14 +4664,30 @@ trackedFiles: id: da62ec1b3f49 last_write_checksum: sha1:393bef5c8d91c3efa1828b928be8452421c20cac pristine_git_object: 54572d20fa850f6810eb90dab3d044029078b261 + internal/sdk/models/shared/addonconfigresponse.go: + id: 0560eb7f8344 + last_write_checksum: sha1:263e5cf83f09f72d0f1b0696e0f8710640306583 + pristine_git_object: 06d5304e2ccbebf7adce134a4643952d60cedabf + internal/sdk/models/shared/addonowner.go: + id: b991f1b4a8d1 + last_write_checksum: sha1:3dfe5940a5956d8024b3fb509b375cabcf8c8dff + pristine_git_object: 4c0ab4cb48d4ba964cad2b836157c568d6ef8e2d + internal/sdk/models/shared/addonresponse.go: + id: 6e37b239a1d8 + last_write_checksum: sha1:34ad85082666ebe3226af1c41ce1647e647b1521 + pristine_git_object: 0101efcfb7cefcb3c2712ea439bffce59ac9b069 + internal/sdk/models/shared/addonstate.go: + id: 9a1d6813ae10 + last_write_checksum: sha1:d26805fb19f6cb91a710b014d91020e092003d4f + pristine_git_object: 709a78766671214fa6cc2a56a20137c3679804ac internal/sdk/models/shared/advancedfilters.go: id: 8c3134ce6035 last_write_checksum: sha1:6bcba9ffc2f52681c56ab6765801c21c9caa05e5 pristine_git_object: 7e06dcc53b62bd3d293f7ea14a486b2001793550 internal/sdk/models/shared/advancedmetrics.go: id: 43b6fa8d903e - last_write_checksum: sha1:e3237800f7b593c932d9e53baf2c617054b6f550 - pristine_git_object: 40eaacc68bb6bbd6ac618fb5a22f6fa718dd8d20 + last_write_checksum: sha1:94dda8af09957d3ff6d9cbb6db3f2067a0e57771 + pristine_git_object: 207edca3185a0a6b85732bd0545826e14332299d internal/sdk/models/shared/advancedquery.go: id: 1f8a433d676e last_write_checksum: sha1:d8c53f14ed9bf202a1cb99f97c22a82af111b3f8 @@ -4764,8 +4858,8 @@ trackedFiles: pristine_git_object: 206be002aa5315054c843c818580edd9a712b5e7 internal/sdk/models/shared/client.go: id: deed25f741a6 - last_write_checksum: sha1:4245149b169350dc39f8adec71b09f249cf66a7c - pristine_git_object: db77917fb62dbb7af7a4a9f26fc8f9ee19fd8ce9 + last_write_checksum: sha1:9e90f3a607ee941d851f79d0bc441df65bd1604e + pristine_git_object: 12095d0b64d933d7b0e5bffe33abf55c16ef5a35 internal/sdk/models/shared/conflicterror.go: id: b6df3db576b0 last_write_checksum: sha1:2678e952690b5699d899c8ce92b17e107a19eeb9 @@ -4778,10 +4872,30 @@ trackedFiles: id: 3c6b183e36d1 last_write_checksum: sha1:e5ce6a9b7401ecb810e616ddfdf97bf24bce3460 pristine_git_object: a0e75796ce95ecdc27259201d5f282eeda3f82da + internal/sdk/models/shared/controlplane.go: + id: 08ebd7f2bc84 + last_write_checksum: sha1:2b348dcbb0b784217d1a44bb11b037519e23172b + pristine_git_object: e817e8cd59d045fe44cf63c7d84b0594f228d5e7 + internal/sdk/models/shared/controlplanegeo.go: + id: 20624856b343 + last_write_checksum: sha1:45e5e67b474bca6dd392b61ba9d60ccbf3059d94 + pristine_git_object: 4a915bcb788fb543ad51535da2ff1fe3aaa6f2bf + internal/sdk/models/shared/controlplanegroup.go: + id: b9de52ab2746 + last_write_checksum: sha1:67fd7ac559fc0d18e6ba86759da672567850b7b4 + pristine_git_object: 13305011c2006d2a7aa63990f9f751b7ea38c69e internal/sdk/models/shared/controlplanereference.go: id: 9ed677886294 last_write_checksum: sha1:2a3c8fd64e4c3b00db1d07a837da0c3bcf5933a4 pristine_git_object: 35d1508a08617299cfeb041e381444390fde117c + internal/sdk/models/shared/createaddonconfig.go: + id: 9aabf9160e9a + last_write_checksum: sha1:b095319a0823b5d44776e85b45c8557a287e8939 + pristine_git_object: 5d5c8b7b0639916c72b0b4f3cb56fb579b62ab46 + internal/sdk/models/shared/createaddonrequest.go: + id: e3d22fbbc8e2 + last_write_checksum: sha1:7537f83eeaec9902b04bdf10910df7ff4831d47d + pristine_git_object: 71176eda1fc03b876833cbd26fba736f346901bf internal/sdk/models/shared/createapidocumentrequest.go: id: f153af110c47 last_write_checksum: sha1:907e0affff08cfee5640a90e80a92efa244acdea @@ -4804,28 +4918,28 @@ trackedFiles: pristine_git_object: 1afa08f30ca4488398fc8c6fb92be7fa39c55e94 internal/sdk/models/shared/createbackendclusterrequest.go: id: 2ddf802cbb5d - last_write_checksum: sha1:dbc00bc82c88731df121dd8d7190f56dfa4ce9e5 - pristine_git_object: 5eef4816ddddf5ebe4a98898ed50fb75b1197234 + last_write_checksum: sha1:f13374ebb612879fcf2661b9fbd21ffd314c9fa7 + pristine_git_object: 189f595d9eef6da0ad5938db18df030d1029579a internal/sdk/models/shared/createclaim.go: id: 4caad1971bb1 last_write_checksum: sha1:5a8f2a4e98ed689cc488edec48c9c7789636d54a pristine_git_object: b4083bee0d57be03b59d8a7d18cfe634414b62e4 internal/sdk/models/shared/createclient.go: id: 938c165c046e - last_write_checksum: sha1:10b547f40c3cb7ef48d93453d259e876972a2619 - pristine_git_object: 286adfa79f7d09de25af5f4e3f1c81a72aa38cd6 + last_write_checksum: sha1:891cf7bac6ca8d4b00b502007fcbdec8edbb26d7 + pristine_git_object: 38e586bd85101331c63a94596a78b8916aea6bc6 internal/sdk/models/shared/createdclient.go: id: 7b57a38b5bdf - last_write_checksum: sha1:2257b0c2b825999214162c4d647cdd80ae500f55 - pristine_git_object: efc836170d348aae759719bc24866f7f3c65ff5b + last_write_checksum: sha1:8ebdd77dc7c6f4de41b652120c2808511184d9c6 + pristine_git_object: efa14c47eab39ea441c91c8179cc9f9af8cb0aa9 internal/sdk/models/shared/createeventgatewaydataplanecertificaterequest.go: id: "432976321e70" last_write_checksum: sha1:d701ec5eeeb4c6c1aad52c0730ced31ef7ba44df pristine_git_object: 6f55991a6dd83bd31a87ff8ca17cd7493840c969 internal/sdk/models/shared/createeventgatewaylistenerrequest.go: id: 18ce4d91b758 - last_write_checksum: sha1:fa396b061aaa818eefef872ccbbc3cd38bfba1e1 - pristine_git_object: 8294012af52443157bccb6d312538f6016ace6f8 + last_write_checksum: sha1:048fd54e8277b860fab5ad369de734c28b639425 + pristine_git_object: 1159733f6f0cd940e0a768004cd8f1456afab452 internal/sdk/models/shared/creategatewayrequest.go: id: cdbb52b9d5d2 last_write_checksum: sha1:24c61eba3852b90f76702269312302914d801d12 @@ -4896,12 +5010,12 @@ trackedFiles: pristine_git_object: b5b926d6e33f0b5ee7fe4d4ecbbc351e75253146 internal/sdk/models/shared/encryptionkeystatic.go: id: e1261789b215 - last_write_checksum: sha1:9833f3c12da1fcea13b05c5df77053f5eacfa04c - pristine_git_object: 93096fe05b749a97a56a5d64860d5970b67fdb9e + last_write_checksum: sha1:f676696f2b74acb54d3bafeac428fd0c13efa35b + pristine_git_object: 13c247cadf1b5e07c3b6ff82e3091366ce59193b internal/sdk/models/shared/encryptionkeystaticreference.go: id: 59f582243b99 - last_write_checksum: sha1:313235d4441635945586016ee6e4e6a63796341b - pristine_git_object: 1fbab142f244c97fd64b41b6c84f23e3e043aaea + last_write_checksum: sha1:f38bbc6247ae26a89559ea962af0cf760071ed7a + pristine_git_object: 630ec4ae0613e473f80717c6b912d3b23636f323 internal/sdk/models/shared/encryptionrecordpart.go: id: d4d62695355b last_write_checksum: sha1:5496b55621cbf8e56b7f705f4fa20acd5a010d8b @@ -4916,32 +5030,32 @@ trackedFiles: pristine_git_object: 6b2d6634f5e86a2248b7e3dafc1b228a8f45a65f internal/sdk/models/shared/eventgatewayaclresourcename.go: id: 53c2aba818ae - last_write_checksum: sha1:bc9f41dbcb0ea31a3d2fe7aa94bf0def3363f232 - pristine_git_object: e72c80ad63ff2a3be3b744bcaa949abf1c130b67 + last_write_checksum: sha1:7b98124c46e5cbd7d099c31104d8104e68081a23 + pristine_git_object: cc47cc5a2046ba8e9857d45c632aada9e8bd06ba internal/sdk/models/shared/eventgatewayaclrule.go: id: 57f5eee75865 - last_write_checksum: sha1:5152d39f54307258f4f0d469d524d829ce0a183b - pristine_git_object: ded913ca0b0e9e7d4f12cb6a15a248bca2741add + last_write_checksum: sha1:c44f628811254793e1784bb9521ca967dc0faab8 + pristine_git_object: bfc8614f763f3124d518143e758bf7e6e501ec1e internal/sdk/models/shared/eventgatewayaclspolicy.go: id: 81368ac8ee2e - last_write_checksum: sha1:6a06a8570758e35aef8b377b21e7c00bcd129742 - pristine_git_object: a3e5511aecae7d08defd705b98a5cec4d3325a1e + last_write_checksum: sha1:1b8c366ec9681cd0b631e9e09e88d9420aa7c929 + pristine_git_object: fb97c09d7691cdb5529fc5e876e76584d4ddf7d7 internal/sdk/models/shared/eventgatewayawskeysource.go: id: fe6b54221a82 last_write_checksum: sha1:687f6aee6d24fa2335e211a182c7ca5faaf46782 pristine_git_object: 14a4aa7a77c9b33d0ba46443cb709f3c92813913 internal/sdk/models/shared/eventgatewayconsumeschemavalidationpolicy.go: id: 12b289092dda - last_write_checksum: sha1:67e3735638fb4fadbfbbdebc73a6a6fab753c994 - pristine_git_object: a2ea95623a3526e767c7ba86d50380c711574932 + last_write_checksum: sha1:6aecae3c4a87fe176f258bff4ef9916555a702cb + pristine_git_object: af383767d5db648f8764bd92a669d6cee9b9132c internal/sdk/models/shared/eventgatewaydataplanecertificate.go: id: d6c51d22803c last_write_checksum: sha1:d55cc422f1cd29d0d32b4833bf515d098e0862d3 pristine_git_object: 2fb0e36c19afe74a1b97c841a5910c961fe30e1a internal/sdk/models/shared/eventgatewaydecryptpolicy.go: id: ce5b7d1fe6cc - last_write_checksum: sha1:5df33083b9657cbf58caef59b83a8abb3762754e - pristine_git_object: 586ae0e6c1abc67a1940499d2758de8d92479211 + last_write_checksum: sha1:8acbdd9f1aaa535b0802bf1e5e61ccb70ce2223d + pristine_git_object: 7a8cfdadc8dd60c7ed3b8f0d6945602003984cbe internal/sdk/models/shared/eventgatewaydecryptpolicyconfig.go: id: da3dc9dbcc35 last_write_checksum: sha1:f08be2ffeb7dbb6d97a4b6f8731a4b355326d195 @@ -4952,8 +5066,8 @@ trackedFiles: pristine_git_object: a5574cf1e00f570013d3c2df87c2aa8a8377df20 internal/sdk/models/shared/eventgatewayencryptpolicy.go: id: ac42eef887d3 - last_write_checksum: sha1:825135f3e931e0e47204f92e37a2da77eb2f3fe0 - pristine_git_object: 494cf298a31b17789a19b87f5b67b398b3809f7c + last_write_checksum: sha1:ce9751a980b7179333893dfc1fe00a6478469957 + pristine_git_object: 2d87c14b21b7bc54754b23fb73b4ff6c6c5fef02 internal/sdk/models/shared/eventgatewayenvvault.go: id: 8ee14a4d5eac last_write_checksum: sha1:bc43b8f2ad93c402615de859eedcb3170bf0c20b @@ -4976,8 +5090,8 @@ trackedFiles: pristine_git_object: 115d258596bb497681001374512d17928e3b12cb internal/sdk/models/shared/eventgatewaylistenerpolicy.go: id: c7cae77c8dad - last_write_checksum: sha1:387cbef140835b8001ea546e323d9e7bc3a2357e - pristine_git_object: 8e11ce3fb7b1e7dec95aecd8d537ab37ce1efec7 + last_write_checksum: sha1:93233b8fa07cf15dd6312399af580c260294bc2f + pristine_git_object: 20b613988076bcdc6505e0af3414c231bd9e62da internal/sdk/models/shared/eventgatewaymodifyheaderaction.go: id: 64ae6cd2fb9f last_write_checksum: sha1:1d1dd8e65c166d76e507b6bb80bc60dc516f70af @@ -4992,48 +5106,48 @@ trackedFiles: pristine_git_object: 5dcaaf47c7285ec45ba6bf302fc4c27122a45d55 internal/sdk/models/shared/eventgatewaymodifyheaderspolicy.go: id: 9b49fa941317 - last_write_checksum: sha1:dcc75885b87b4b64c9c848b8c301f7124526d09e - pristine_git_object: aa938c6fdd1c506311dbc81dc55cc13f5e16c6e7 + last_write_checksum: sha1:3adda05576415b0b5eafbdb1efa6f773278a3dfd + pristine_git_object: dac6d7c5e3ead6e851e9f06e76e240af85c482c9 internal/sdk/models/shared/eventgatewaymodifyheaderspolicycreate.go: id: 9b203a35ce49 - last_write_checksum: sha1:3f69417b7ee4c3f5db465c75e84c117112b899af - pristine_git_object: 8abff3c04d5f9cd36bb5851ff68becc0bd8cb5bf + last_write_checksum: sha1:7f5d8773327db352c5f3412a185a169040055e92 + pristine_git_object: ce43e4f06299c26ff75f45387e748bf8ac6fe5d8 internal/sdk/models/shared/eventgatewaymodifyvault.go: id: cb27383fadbd last_write_checksum: sha1:b2dba120101317a95f6c5e0bf4d77318b4a8c57e pristine_git_object: 86abd24608b31b3021dfe480207ee8275746b801 internal/sdk/models/shared/eventgatewaypolicy.go: id: 2dd96ff43892 - last_write_checksum: sha1:a22dfbe238c45b5292fd06ec567d764d892df37b - pristine_git_object: 172b67220f5858edb63fb688dff3f125ee572db8 + last_write_checksum: sha1:bf9d5fa7fdd19d6d2ca066b0061f15e925e66d8c + pristine_git_object: 13066018a34ebc18f4839ee84da443ceed2a5b4d internal/sdk/models/shared/eventgatewayproducepolicyschemavalidationtfonly.go: id: 7c21ae29fb76 - last_write_checksum: sha1:79da149eb2e04d13baf1fc3f86ebc2b1001d0cc5 - pristine_git_object: 0b7a39f4a610828f1a0992bcd00881117c7bd6cb + last_write_checksum: sha1:439b693df311ee65738610898913b9acaa9fb5ce + pristine_git_object: b73b3fd9adcddb90cd6727f8f4c49292ac42292d internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicy.go: id: e2d9a52e7629 - last_write_checksum: sha1:c13eb9f2c003bf1dd51e891cdfcd124db5e6a260 - pristine_git_object: 19df139d712151682526120bdcc2fbac4f52d7d0 + last_write_checksum: sha1:0a0fd3f54294fbedfe359a20f4c5e521521f01a2 + pristine_git_object: 937572a0326c0950365e8f885dde01b209305bcd internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyconfig.go: id: 7008f411b23b last_write_checksum: sha1:b293b2e7e53b95aa6f77deb29d1ffb7b00bf1722 pristine_git_object: b8d7a852cc5fc00a6658e0e69e2d6c37300fabc5 internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyjsonconfig.go: id: 6bba759da002 - last_write_checksum: sha1:d3a8977679f4551a3af53c4a0ecd1d2f0d340131 - pristine_git_object: 57918cbfd89a0198befafe794b7e174cbffe2dcd + last_write_checksum: sha1:5abcb2533e61a9216eff3e04b69799e769bbb285 + pristine_git_object: 93a8459d191e3573f71e8e09a0b520fc10d3eec9 internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyschemaregistryconfig.go: id: 5ee482553091 - last_write_checksum: sha1:3475e9ee382648bfdf63b4f087edf3be7e987953 - pristine_git_object: 964c2ea3e32f846fb0282bbfea6511b5a152ef37 + last_write_checksum: sha1:2f67a3092970bd079f3f18239fcbe8ddcd547151 + pristine_git_object: f4c32808b3ad65a940b4f38a43f846b7da0afb56 internal/sdk/models/shared/eventgatewayskiprecordpolicy.go: id: 0fb2047528cf - last_write_checksum: sha1:64b5db69abfdf21243b2f8b0b5bc635008772340 - pristine_git_object: 3486e0e8150c96e69b42574730674e7ce868f9d3 + last_write_checksum: sha1:4a105e30618d9eb1f21b05e438f2019e1a417675 + pristine_git_object: 1cbbea8f97d1ccab78cc436f443a51df924d3b24 internal/sdk/models/shared/eventgatewayskiprecordpolicycreate.go: id: cc3ba92db08d - last_write_checksum: sha1:f4495f5de60e1f0069143c9764f421202f7cd9e7 - pristine_git_object: 084d28f81a6d48440f2bff2db9d725dc47bf831a + last_write_checksum: sha1:f366819f92535556d4c282b2a47922f17c9b7361 + pristine_git_object: 408695305834dcbaf6008b0eaf8b602101cac64c internal/sdk/models/shared/eventgatewaystatickey.go: id: 6b2e9626e672 last_write_checksum: sha1:fcffe685b853149025e639ee0fb65dd5106bb76f @@ -5048,8 +5162,8 @@ trackedFiles: pristine_git_object: 535557a03273aa600ee657a0a2d63c304728d5e0 internal/sdk/models/shared/eventgatewaytlslistenerpolicy.go: id: 9b24728ae6be - last_write_checksum: sha1:ba4fe2d0fbc4d7cb91d113d2b8e2e22f548813da - pristine_git_object: f0dfea3aed6832ab1c89e02784ec303c5e0e937d + last_write_checksum: sha1:23c458a09ca56c488446857be8c02edcf2393aae + pristine_git_object: 8fce3546bbde0345855ec753a87c6555caafbb83 internal/sdk/models/shared/eventgatewaytlslistenerpolicyconfig.go: id: fc7c874b85d0 last_write_checksum: sha1:03499f2e37e74cf9e81c8a7d4df5c6d025a0837b @@ -5060,8 +5174,8 @@ trackedFiles: pristine_git_object: 3dde344ef22f1712560272464844238c376f3ad5 internal/sdk/models/shared/eventgatewaytlslistenersensitivedataawarepolicy.go: id: b8daef072999 - last_write_checksum: sha1:4646015857f12c908fc86fb6409889284e2e178b - pristine_git_object: 55fa2cf8f7724183cc48d95982a757a696aeccf2 + last_write_checksum: sha1:61353f0c64c1bf3857a867f658473f38d8112d63 + pristine_git_object: 44a0a6067d8a0b1387e79b7f6adc4d2fcd93622e internal/sdk/models/shared/eventgatewayvault.go: id: 87c43cb1bc69 last_write_checksum: sha1:8dcac5fd905cc78bf6333c821bebd30390d1159b @@ -5072,20 +5186,20 @@ trackedFiles: pristine_git_object: e9c3237336e0b8f688017cc00dd971b2fec09686 internal/sdk/models/shared/forwardtoclusterbyportmappingconfig.go: id: 133f1f9aafc6 - last_write_checksum: sha1:5e1e6f18ad229ed55ce7af6dd1dead023f853a06 - pristine_git_object: e90d912c0faec6b3eeeba6554b9e5c1c71a27205 + last_write_checksum: sha1:baa7f9e1d7d0bdf91a25f309394bf3f0b6b7ceca + pristine_git_object: 84e8913cc0f71bce14b35af26801146788d0cc64 internal/sdk/models/shared/forwardtoclusterbysniconfig.go: id: 124a3cc24abd last_write_checksum: sha1:ed4a329f9a642f6b4fb0730fe7b92e4876535728 pristine_git_object: 6ac155d205a1276f3ae2b285e43cf0cfade82e2f internal/sdk/models/shared/forwardtovirtualclusterpolicy.go: id: 5914e93d63e0 - last_write_checksum: sha1:2b93fb7fe31a9e18baa1ac6fbf1cad80511d8cf2 - pristine_git_object: b77c087fd79f2f4b2291a3221b6480ac6b392332 + last_write_checksum: sha1:05e94986ac52dd777d15fa2b7d29ad2f9406977f + pristine_git_object: 8c028eed46d33a9fcca8f3c0a21e32a62abf3b20 internal/sdk/models/shared/granttype.go: id: 18782ffd03f6 - last_write_checksum: sha1:f7e4a00e95a9e534bff4f2e667df22e307216428 - pristine_git_object: 37b6d7c72952db8dda5be9911abf47c4477b67ae + last_write_checksum: sha1:3e3da698142a3752b943569719eef60dede5cf72 + pristine_git_object: ce14381da0bc5dcc1a8be2365759fd912f3060b0 internal/sdk/models/shared/granularity.go: id: bebe7d182280 last_write_checksum: sha1:7d3208414c0c285cb74ac2ec11d1b34b73688652 @@ -5148,12 +5262,28 @@ trackedFiles: pristine_git_object: d928494203eeb3d08cd44c09c13f794665ae222a internal/sdk/models/shared/llmmetrics.go: id: ea6fbecf82e5 - last_write_checksum: sha1:97908071eda390a28fecdd0f44689d6ea4f31f69 - pristine_git_object: f8ac0ba6fae360addff5f30cb7c7996b9ea3401a + last_write_checksum: sha1:29b6176db6f96e43d85c2f0c937c342e5a759363 + pristine_git_object: a29f13405620a3f55772252a86d6e606cb996e45 internal/sdk/models/shared/llmquery.go: id: 3c441bd3ba28 last_write_checksum: sha1:3d21dcb2c67fecf8c690a9aae8f8836cf33d276f pristine_git_object: c48d1dcd639823ea1e7507d0c4f5e20478492c0d + internal/sdk/models/shared/managedcache.go: + id: c101ffe5e176 + last_write_checksum: sha1:5d903595196003e20bdfb8369f9adbc1fad6c2b7 + pristine_git_object: 917076f19b54083a771c1c043baf0a9eb56f540f + internal/sdk/models/shared/managedcacheaddonconfigresponse.go: + id: 3f0809dc920e + last_write_checksum: sha1:747a8e1220c8610d6612ec6a18865055f6ba01e2 + pristine_git_object: 50316d1d4959e721dd476b8849e20324c242b95b + internal/sdk/models/shared/managedcacheaddondataplanegroup.go: + id: 09d36b2de0e0 + last_write_checksum: sha1:9122033c1bad6d11ef645490694ea6e307ed4104 + pristine_git_object: 24a1bf9963a5a192a62c9c2214c7dedb3098b93a + internal/sdk/models/shared/managedcachecapacityconfig.go: + id: cb979a4fee29 + last_write_checksum: sha1:c60a86c3285070d0c50885f11cc55e8fdbd69043 + pristine_git_object: 89949a0b0cf2d2b2e91c39909a7fa4f65f7b4c56 internal/sdk/models/shared/meshaccesslogcreateorupdatesuccessresponse.go: id: a477d95b4444 last_write_checksum: sha1:7d644c08334362a3852beb862b78eb690754052b @@ -5468,8 +5598,8 @@ trackedFiles: pristine_git_object: 658d1ed463e8780cf409fb388b1e0c02fa7bbf0b internal/sdk/models/shared/meshserviceitem.go: id: 1be93bf94673 - last_write_checksum: sha1:24d0757345abf878702be63c9a14996b83cb18fb - pristine_git_object: e6d5dd88027d132ff34478e6ed876c126f3cacbd + last_write_checksum: sha1:5ef2cc28ff87183609755606676486574ea3ae24 + pristine_git_object: 0bb0011690a048eb236f16a938350c88bedb191a internal/sdk/models/shared/meshservicelist.go: id: fe3ec79ec681 last_write_checksum: sha1:54338d8daebcbd76bf0dbf9b30e421bb1ae32faa @@ -5682,6 +5812,10 @@ trackedFiles: id: e0ba07894c9d last_write_checksum: sha1:cf46dd291cd0fd86452bd99bb62bd4b65c6d0efc pristine_git_object: 7363dfde8526c6800198c4e670ed646db87a91c9 + internal/sdk/models/shared/providername.go: + id: a46a24e9a977 + last_write_checksum: sha1:4fb094d894f4c0b0c9857e4ca459d8ea81273f66 + pristine_git_object: 086626e78822c28d8457362c0548f289332e70b5 internal/sdk/models/shared/publishedstatus.go: id: 27bcee5f5492 last_write_checksum: sha1:0657bc7f739827d0e05d3b0236500052045a51bb @@ -5690,18 +5824,10 @@ trackedFiles: id: 5da986446659 last_write_checksum: sha1:8aa28353f9c702e207a15f025ff0b171ea8062e0 pristine_git_object: db860085b5c2f9f78536c14c108ccddb349aa071 - internal/sdk/models/shared/referencebyid.go: - id: dd5ecac7dbaa - last_write_checksum: sha1:d8023717324455e5c9338e85f44debe4c039b7c8 - pristine_git_object: 44cca58a396730dd7bb15f9939c55ee4aa4768f5 - internal/sdk/models/shared/referencebyname.go: - id: befec149ea05 - last_write_checksum: sha1:608042571b11590dcbaec4b319b2611b62cda35b - pristine_git_object: a25cd477da83b132c18220a864b1a72024054a7d internal/sdk/models/shared/replaceclient.go: id: be4db59424e7 - last_write_checksum: sha1:d81c1fb11e3d4f46696f5fd03fc9a21e3a42b88f - pristine_git_object: 15b8730092654c16d767ccf472605a2554073b67 + last_write_checksum: sha1:c034683359346904f91c07b3d29f24e4687b0fb2 + pristine_git_object: 8291d0a574d5f2868a356066dc3586f1c45158f5 internal/sdk/models/shared/replaceportalimageasset.go: id: a0dcaffd16a7 last_write_checksum: sha1:98935d16b4754b962900254598c1933815bc4fe3 @@ -5752,16 +5878,8 @@ trackedFiles: pristine_git_object: c1c30e4bc04f41a2798a19099b66c053665a0a56 internal/sdk/models/shared/schemaregistryreference.go: id: cc710529dbc6 - last_write_checksum: sha1:35602c2f98eb785467bb58818c66459f5aef8ac0 - pristine_git_object: eb62d16026437fd2d321e01baaa33bfa3bb276be - internal/sdk/models/shared/schemaregistryreferencebyid.go: - id: 6e89f9c5caed - last_write_checksum: sha1:7a0e74650fdab687c70466edd66fe5deffa923df - pristine_git_object: 91a580681b24a3c1ccb11ed4e79b775f224f71ee - internal/sdk/models/shared/schemaregistryreferencebyname.go: - id: 49a4bc402f95 - last_write_checksum: sha1:7c968b3551e63f597352ce68427f8856609d0a22 - pristine_git_object: fd12a85e07ebeb5297bddba4ee41a41a689e6d53 + last_write_checksum: sha1:6ee2ca2f9a46aa1ceec7e0883c48eeb439b25228 + pristine_git_object: 103dca6a2677a45e94f1bc075a661c027483d32e internal/sdk/models/shared/schemaregistryupdate.go: id: 87e1dd9c8a3d last_write_checksum: sha1:cc523a10756670686c2ccc771c55e7b951da5960 @@ -5810,6 +5928,10 @@ trackedFiles: id: db684bad12fe last_write_checksum: sha1:570cae8984128ebcff2de68acf18da66c542d0ad pristine_git_object: 8aa7564682d562e5b68551b1dc039e903f32c8b7 + internal/sdk/models/shared/tiered.go: + id: 3ffc5b171939 + last_write_checksum: sha1:fe908cfcf6c1f1a302b96cd88485569b663b9aeb + pristine_git_object: 67ae9eec5f0302fc2e4f25ebadc548776632ce12 internal/sdk/models/shared/tile.go: id: 0243a3b4091d last_write_checksum: sha1:b6e52110d00146a00d877a9489b3a3012b7b5dd5 @@ -5860,8 +5982,8 @@ trackedFiles: pristine_git_object: 4a798e03e4fbbbe70bc86a86b8b21a6a0b9e522d internal/sdk/models/shared/updatebackendclusterrequest.go: id: a52f46fc63ff - last_write_checksum: sha1:a2b603810cfd589cfb4d26afeaa85f0a667e798c - pristine_git_object: 26a9974b84950a2b83aca284f83e89a6106243b6 + last_write_checksum: sha1:567508c31ec9a5ec33a64a6bdc51e2dace943711 + pristine_git_object: ea0dbe7e060bc96a197e26aef962b59334308051 internal/sdk/models/shared/updateclaim.go: id: 349f01b68e80 last_write_checksum: sha1:5d34352f711f8ed383df36b5fbb36ac3fe4df355 @@ -5872,8 +5994,8 @@ trackedFiles: pristine_git_object: 9c17bf16275d5e8825d4964052a53b33adadbf63 internal/sdk/models/shared/updateeventgatewaylistenerrequest.go: id: ab051277ee01 - last_write_checksum: sha1:3b801ec26ffbfe3cf168aa76ec03f110853b431b - pristine_git_object: 66dc11557465c360afe487a9a3e3ac19b0038c85 + last_write_checksum: sha1:48d28bae2ec4f46ffec95877a1087ea21ed2e157 + pristine_git_object: 32a1607e3ca79a309c131efd41ee88cdef7638aa internal/sdk/models/shared/updategatewayrequest.go: id: 2440de676f27 last_write_checksum: sha1:e0dcea659b36dd1b0b2ca6cf31de17ccd46141c6 @@ -6004,16 +6126,8 @@ trackedFiles: pristine_git_object: f322de880ef6c02669d23c1d5955d7dc6152f040 internal/sdk/models/shared/virtualclusterreference.go: id: dd6ee7994d82 - last_write_checksum: sha1:115d8e885d64a148952d29074749d50b9b5af1d6 - pristine_git_object: 98728848388557046dfa9c2ca93bbfed9f530386 - internal/sdk/models/shared/virtualclusterreferencebyid.go: - id: "150189388954" - last_write_checksum: sha1:a4e9ba11fcd5a0e9fa22f58359b32e9f59f1efc6 - pristine_git_object: 7e6031b341b3baab0224592fec6a71a5794b694e - internal/sdk/models/shared/virtualclusterreferencebyname.go: - id: 611d96c304f1 - last_write_checksum: sha1:9b3976538e4d4e6413a4c14b67c51ed3ffe185cb - pristine_git_object: db1287970d94ff3ac563adc5ab08c16c0c576a32 + last_write_checksum: sha1:f01080c4c70b21580d110918170817a1334587f4 + pristine_git_object: b3e93f9e20c2b3cd38c13995e0c5c1d73417563e internal/sdk/models/shared/visibilitystatus.go: id: 542e53040258 last_write_checksum: sha1:bee727aa365ddbfe71c87b7273fce974a938f800 @@ -10004,10 +10118,10 @@ examples: path: authServerId: "d32d905a-ed33-46a3-a093-d8f536af9a8a" requestBody: - application/json: {"name": "", "grant_types": ["client_credentials"], "response_types": [], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "allow_all_scopes": false, "labels": {"env": "test"}, "token_endpoint_auth_method": "client_secret_post", "id": "kYa9iQFU5xPDSIUH9z1z"} + application/json: {"name": "", "grant_types": ["client_credentials"], "response_types": [], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "refresh_token_duration": 2592000, "allow_all_scopes": false, "labels": {"env": "test"}, "token_endpoint_auth_method": "client_secret_post", "id": "kYa9iQFU5xPDSIUH9z1z"} responses: "201": - application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://improbable-stitcher.net", "https://caring-switchboard.net"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "allow_all_scopes": false, "allow_scopes": ["ee2ba59e-da21-42fb-8fe0-5795664e508c", "708d5afa-b5af-42bc-b519-345a24cd65bf"], "labels": {"env": "test"}, "response_types": ["none"], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z", "client_secret": "YAzsyUlNZ5gNGeKS9H3VAdxVPzhPo4ae"} + application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://improbable-stitcher.net", "https://caring-switchboard.net"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "refresh_token_duration": 2592000, "allow_all_scopes": false, "allow_scopes": ["ee2ba59e-da21-42fb-8fe0-5795664e508c", "708d5afa-b5af-42bc-b519-345a24cd65bf"], "labels": {"env": "test"}, "response_types": ["none"], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z", "client_secret": "YAzsyUlNZ5gNGeKS9H3VAdxVPzhPo4ae"} "400": application/problem+json: {"status": 696696, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_digits", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "404": @@ -10022,7 +10136,7 @@ examples: clientId: "kYa9iQFU5xPDSIUH9z1z" responses: "200": - application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://considerate-duster.org/", "https://mature-reward.name/"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "allow_all_scopes": false, "allow_scopes": ["fa1d7070-1590-41da-bb80-cb595abf3c5a"], "labels": {"env": "test"}, "response_types": [], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://considerate-duster.org/", "https://mature-reward.name/"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "refresh_token_duration": 2592000, "allow_all_scopes": false, "allow_scopes": ["fa1d7070-1590-41da-bb80-cb595abf3c5a"], "labels": {"env": "test"}, "response_types": [], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z"} "404": application/problem+json: {"status": 404, "title": "Not Found", "type": "https://httpstatuses.com/404", "instance": "kong:trace:1234567890", "detail": "Not found"} replaceAuthServerClient: @@ -10032,10 +10146,10 @@ examples: authServerId: "d32d905a-ed33-46a3-a093-d8f536af9a8a" clientId: "kYa9iQFU5xPDSIUH9z1z" requestBody: - application/json: {"name": "", "client_secret": "", "grant_types": ["implicit"], "response_types": ["token"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "allow_all_scopes": false, "token_endpoint_auth_method": "client_secret_post", "labels": {"env": "test"}} + application/json: {"name": "", "client_secret": "", "grant_types": ["implicit"], "response_types": ["token"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "refresh_token_duration": 2592000, "allow_all_scopes": false, "token_endpoint_auth_method": "client_secret_post", "labels": {"env": "test"}} responses: "200": - application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://waterlogged-hawk.name", "https://difficult-dress.name/"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "allow_all_scopes": false, "allow_scopes": ["93b41707-d271-44fa-b251-d7b877d625f5", "f5754ec2-8c7b-40b2-bbee-00625d564ac0"], "labels": {"env": "test"}, "response_types": [], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"id": "kYa9iQFU5xPDSIUH9z1z", "name": "", "grant_types": [], "redirect_uris": ["https://waterlogged-hawk.name", "https://difficult-dress.name/"], "login_uri": null, "access_token_duration": 300, "id_token_duration": 300, "refresh_token_duration": 2592000, "allow_all_scopes": false, "allow_scopes": ["93b41707-d271-44fa-b251-d7b877d625f5", "f5754ec2-8c7b-40b2-bbee-00625d564ac0"], "labels": {"env": "test"}, "response_types": [], "token_endpoint_auth_method": "client_secret_post", "created_at": "2022-11-04T20:10:06.927Z", "updated_at": "2022-11-04T20:10:06.927Z"} "400": application/problem+json: {"status": 84109, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "404": @@ -11111,7 +11225,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "06a1da50-18ba-4734-a0a9-e00dd52dfc9b", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "06a1da50-18ba-4734-a0a9-e00dd52dfc9b", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11126,10 +11240,10 @@ examples: eventGatewayListenerId: "8150b381-175e-48cc-b79b-78d1d98707a8" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "tls_server", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"certificates": [{"certificate": "", "key": "${vault.env['MY_ENV_VAR']}"}], "versions": {"min": "TLSv1.2", "max": "TLSv1.3"}, "allow_plaintext": false}} + application/json: {"type": "tls_server", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"certificates": [{"certificate": "", "key": "${vault.env['MY_ENV_VAR']}"}], "versions": {"min": "TLSv1.2", "max": "TLSv1.3"}, "allow_plaintext": false}} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "3252186a-a8d6-45c3-ae43-7f70c4575b09", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "3252186a-a8d6-45c3-ae43-7f70c4575b09", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "400": application/problem+json: {"status": 976208, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11159,7 +11273,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f674c0bd-d6b4-488d-a8b4-ff7fdb36b038", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f674c0bd-d6b4-488d-a8b4-ff7fdb36b038", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11174,10 +11288,10 @@ examples: eventGatewayListenerId: "60c0a875-ed08-4959-a810-6710c2d37b44" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "forward_to_virtual_cluster", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "sni", "sni_suffix": ".example.com", "advertised_port": 985890, "broker_host_format": null}} + application/json: {"type": "forward_to_virtual_cluster", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "sni", "sni_suffix": ".example.com", "advertised_port": 985890, "broker_host_format": null}} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "a964a42a-4b6e-438a-847c-79680f3800f7", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "a964a42a-4b6e-438a-847c-79680f3800f7", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "400": application/problem+json: {"status": 258360, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_symbols", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "401": @@ -11205,10 +11319,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" eventGatewayListenerId: "fbb26749-530c-4cd0-8d52-9db9d81c3f08" requestBody: - application/json: {"type": "tls_server", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"certificates": [{"certificate": "", "key": "${vault.env['MY_ENV_VAR']}"}], "versions": {"min": "TLSv1.2", "max": "TLSv1.3"}, "allow_plaintext": false}} + application/json: {"type": "tls_server", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"certificates": [{"certificate": "", "key": "${vault.env['MY_ENV_VAR']}"}], "versions": {"min": "TLSv1.2", "max": "TLSv1.3"}, "allow_plaintext": false}} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "009e4bb7-902f-439c-ba0f-6126abc8ab52", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "009e4bb7-902f-439c-ba0f-6126abc8ab52", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "400": application/problem+json: {"status": 830414, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "enum", "reason": "is a required field", "choices": ["", ""], "source": "body"}]} "401": @@ -11222,10 +11336,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" eventGatewayListenerId: "cc1f804b-d05f-4c4b-ae7c-01ee08446fa7" requestBody: - application/json: {"type": "forward_to_virtual_cluster", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "sni", "sni_suffix": ".example.com", "advertised_port": 971355, "broker_host_format": null}} + application/json: {"type": "forward_to_virtual_cluster", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "sni", "sni_suffix": ".example.com", "advertised_port": 971355, "broker_host_format": null}} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "55a6e644-871e-4251-8b96-3dbbcc3555cf", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "55a6e644-871e-4251-8b96-3dbbcc3555cf", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z"} "400": application/problem+json: {"status": 712567, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11241,7 +11355,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "ef80a11c-170f-4544-9076-8efb8e319de7", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "ef80a11c-170f-4544-9076-8efb8e319de7", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11256,10 +11370,10 @@ examples: virtualClusterId: "7c38d3f3-5c9a-49b5-9b67-2e4f8e1f2a25" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "modify_headers", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "modify_headers", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "507871d9-bb97-48d2-9a55-a4be33f78881", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "507871d9-bb97-48d2-9a55-a4be33f78881", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 711740, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "401": @@ -11289,7 +11403,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "34538704-755b-4b27-9f94-acccd39923d1", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "34538704-755b-4b27-9f94-acccd39923d1", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11304,10 +11418,10 @@ examples: virtualClusterId: "4fb63c2c-47c0-451b-a606-7002570cfd42" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "schema_validation", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "confluent_schema_registry"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "schema_validation", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "confluent_schema_registry"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "5b2191fd-223a-44f7-9d8b-d018a6e9ee5d", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "5b2191fd-223a-44f7-9d8b-d018a6e9ee5d", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 409111, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "enum", "reason": "is a required field", "choices": [""], "source": "body"}]} "401": @@ -11337,7 +11451,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f444cc2a-8835-42ed-b86d-e8d664dfdb3b", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f444cc2a-8835-42ed-b86d-e8d664dfdb3b", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11352,10 +11466,10 @@ examples: virtualClusterId: "eb84f991-ae6d-4ed9-a84f-dd27dd8493c1" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "decrypt", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "key_sources": [{"type": "static"}], "part_of_record": ["value"]}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "decrypt", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "key_sources": [{"type": "static"}], "part_of_record": ["value"]}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b7a563ad-fad7-4c5f-b18a-ba17dd92a28a", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b7a563ad-fad7-4c5f-b18a-ba17dd92a28a", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 180267, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "max_length", "maximum": 8, "source": "body", "reason": "must not have more than 8 characters"}]} "401": @@ -11385,7 +11499,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "617a6a0d-2e44-47c7-8782-f21636ed5b03", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "617a6a0d-2e44-47c7-8782-f21636ed5b03", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11400,10 +11514,10 @@ examples: virtualClusterId: "b85a6bf7-2401-433a-b62d-05759913d341" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "skip_record", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "skip_record", "description": "", "enabled": true, "labels": {"env": "test"}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "d0435f74-88f6-4183-b808-33363bc99d2e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "d0435f74-88f6-4183-b808-33363bc99d2e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 643328, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "source": "body", "reason": "is a required field"}]} "401": @@ -11431,10 +11545,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "87299e77-284a-47bd-9ab3-a097848681e1" requestBody: - application/json: {"type": "modify_headers", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "modify_headers", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "ea2b1fb4-aa48-439f-84c9-a592b6fd8d58", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "ea2b1fb4-aa48-439f-84c9-a592b6fd8d58", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 487642, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "source": "body", "reason": "is a required field"}]} "401": @@ -11448,10 +11562,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "e26dd505-ebbf-4297-994b-16b07ec83735" requestBody: - application/json: {"type": "schema_validation", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "json"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "schema_validation", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"type": "json"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "e4117cbb-3be1-4097-80e4-cff0af8e4d75", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "e4117cbb-3be1-4097-80e4-cff0af8e4d75", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 885533, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "dependent_fields", "reason": "is a required field", "dependents": null, "source": "body"}]} "401": @@ -11465,10 +11579,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "995bc147-2750-4c10-a0e2-ec9b901491eb" requestBody: - application/json: {"type": "decrypt", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "key_sources": [{"type": "aws"}], "part_of_record": ["value"]}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "decrypt", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "key_sources": [{"type": "aws"}], "part_of_record": ["value"]}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "627ce5c5-8fd9-43a2-8c83-eafe3d39fe8e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "627ce5c5-8fd9-43a2-8c83-eafe3d39fe8e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 191667, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_uppercase", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "401": @@ -11482,10 +11596,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "a5e310a4-a4c6-4950-aa8f-3767751d9b74" requestBody: - application/json: {"type": "skip_record", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "skip_record", "description": "", "enabled": true, "labels": {"env": "test"}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "975cc614-a984-4c1a-831d-f45e0b1f071e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "975cc614-a984-4c1a-831d-f45e0b1f071e", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 492591, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11501,7 +11615,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b391fbb8-2e27-47a6-a351-647b26be417b", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b391fbb8-2e27-47a6-a351-647b26be417b", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11516,10 +11630,10 @@ examples: virtualClusterId: "1ca6bca6-4a82-4d94-a3d7-098134851e5b" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "modify_headers", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "modify_headers", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "e203f9d4-2bec-4e8b-a4c8-7b6d178a38ca", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "e203f9d4-2bec-4e8b-a4c8-7b6d178a38ca", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 474674, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "source": "body", "reason": "is a required field"}]} "401": @@ -11549,7 +11663,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "d0e0237c-69b1-426c-8e22-068ae5fad280", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "d0e0237c-69b1-426c-8e22-068ae5fad280", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11564,10 +11678,10 @@ examples: virtualClusterId: "584123c6-1da3-4626-b4e1-d74eaa2e89ac" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "schema_validation", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"key_validation_action": "mark", "value_validation_action": "mark", "type": "confluent_schema_registry"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "schema_validation", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"key_validation_action": "mark", "value_validation_action": "mark", "type": "confluent_schema_registry"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "2ad3cdfd-1f2f-4d97-a2d3-c62063981d3d", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "2ad3cdfd-1f2f-4d97-a2d3-c62063981d3d", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 504318, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_digits", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "401": @@ -11597,7 +11711,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b516476b-9fb4-4089-bf7a-a71dc943479d", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "b516476b-9fb4-4089-bf7a-a71dc943479d", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11612,10 +11726,10 @@ examples: virtualClusterId: "f5cf6665-58bb-47f4-be01-926b2c0b6612" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "encrypt", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "part_of_record": ["key"], "encryption_key": {"type": "aws", "arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"}}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "encrypt", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "passthrough", "part_of_record": ["key"], "encryption_key": {"type": "aws", "arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"}}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f9bcd779-cf70-4a2f-949f-99f677043c70", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "f9bcd779-cf70-4a2f-949f-99f677043c70", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 790793, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": null, "reason": "is a required field", "dependents": null, "source": "body"}]} "401": @@ -11691,10 +11805,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "90d7fe42-a5e1-45c2-b20f-d8903a6badad" requestBody: - application/json: {"type": "modify_headers", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} + application/json: {"type": "modify_headers", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"actions": null}, "condition": "record.value.content.foo.bar == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "c438b205-c91f-463b-a808-4442555c5c49", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "c438b205-c91f-463b-a808-4442555c5c49", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 923814, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_uppercase", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} "401": @@ -11708,10 +11822,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "4c1ea4c2-dca9-4107-85f5-586e47f34147" requestBody: - application/json: {"type": "schema_validation", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"key_validation_action": "mark", "value_validation_action": "reject", "type": "json"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "schema_validation", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"key_validation_action": "mark", "value_validation_action": "reject", "type": "json"}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "565102af-89d6-424b-87d2-8133b0fcb8b8", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "565102af-89d6-424b-87d2-8133b0fcb8b8", "config": {}, "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 677192, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11725,10 +11839,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "593ecd65-910f-4bd8-9c22-0dd3eaa403c3" requestBody: - application/json: {"type": "encrypt", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "error", "part_of_record": [], "encryption_key": {"type": "aws", "arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"}}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} + application/json: {"type": "encrypt", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"failure_mode": "error", "part_of_record": [], "encryption_key": {"type": "aws", "arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"}}, "condition": "context.topic.name.endsWith(\"my_suffix\") && records.headers[\"x-flag\"] == \"a-value\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "bd47b7ed-1b37-4332-8874-76c9a0e498b9", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "bd47b7ed-1b37-4332-8874-76c9a0e498b9", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 876417, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11761,7 +11875,7 @@ examples: policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "64de57a6-a53e-4b74-82f3-bbfbace3f7e1", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "64de57a6-a53e-4b74-82f3-bbfbace3f7e1", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "401": application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} "403": @@ -11776,10 +11890,10 @@ examples: virtualClusterId: "ae29d4be-1b79-482c-881a-3476b4ebb7cf" policyId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" requestBody: - application/json: {"type": "acls", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"rules": []}, "condition": "context.auth.principal.name == \"this-user\""} + application/json: {"type": "acls", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"rules": []}, "condition": "context.auth.principal.name == \"this-user\""} responses: "200": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "16ab9abb-c439-4776-9d1a-d0066e92ddcf", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "16ab9abb-c439-4776-9d1a-d0066e92ddcf", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 194157, "title": "", "instance": "", "detail": "", "invalid_parameters": []} "401": @@ -11807,10 +11921,10 @@ examples: gatewayId: "9524ec7d-36d9-465d-a8c5-83a3c9390458" virtualClusterId: "1706d38f-88a4-4e72-a02d-65cac443f53c" requestBody: - application/json: {"type": "acls", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"rules": []}, "condition": "context.auth.principal.name == \"this-user\""} + application/json: {"type": "acls", "description": "", "enabled": true, "labels": {"env": "test"}, "config": {"rules": []}, "condition": "context.auth.principal.name == \"this-user\""} responses: "201": - application/json: {"type": "", "name": null, "description": "", "enabled": true, "labels": {"env": "test"}, "id": "323ea8c8-dae4-457b-abc2-abeec4051474", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} + application/json: {"type": "", "description": "", "enabled": true, "labels": {"env": "test"}, "id": "323ea8c8-dae4-457b-abc2-abeec4051474", "created_at": "2022-11-04T20:10:06.927Z", "parent_policy_id": null, "updated_at": "2022-11-04T20:10:06.927Z", "condition": ""} "400": application/problem+json: {"status": 253786, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "source": "body", "reason": "is a required field"}]} "401": @@ -12403,6 +12517,51 @@ examples: responses: "200": application/json: {} + create-add-on: + speakeasy-default-create-add-on: + requestBody: + application/json: {"name": "my-add-on", "owner": {"kind": "control-plane-group", "control_plane_group_id": "123e4567-e89b-12d3-a456-426614174000", "control_plane_group_geo": "sg"}, "config": {"kind": "managed-cache.v0", "capacity_config": {"kind": "tiered", "tier": "small"}}} + responses: + "201": + application/json: {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "my-add-on", "owner": {"kind": "control-plane", "control_plane_id": "123e4567-e89b-12d3-a456-426614174000", "control_plane_geo": "me"}, "config": {"kind": "managed-cache.v0", "capacity_config": {"kind": "tiered", "tier": "small"}, "data_plane_groups": [], "state_metadata": {"cache_config_id": "edaf40f9-9fb0-4ffe-bb74-4e763a6bd471", "cache_server_name": "{vault://env/ADDON_MANAGED_CACHE_SERVER_NAME}", "cache_host": "{vault://env/ADDON_MANAGED_CACHE_HOST}", "cache_port": "{vault://env/ADDON_MANAGED_CACHE_PORT}", "cache_username": "{vault://env/ADDON_MANAGED_CACHE_USERNAME}", "cloud_authentication": null}}, "entity_version": 1, "state": "ready", "created_at": "2025-08-26T06:56:41Z", "updated_at": "2025-08-26T06:56:41Z"} + "400": + application/problem+json: {"status": 529641, "title": "", "instance": "", "detail": "", "invalid_parameters": [{"field": "name", "rule": "min_lowercase", "minimum": 8, "source": "body", "reason": "must have at least 8 characters"}]} + "401": + application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} + "403": + application/problem+json: {"status": 403, "title": "Forbidden", "type": "https://httpstatuses.com/403", "instance": "kong:trace:1234567890", "detail": "Forbidden"} + "404": + application/problem+json: {"status": 404, "title": "Not Found", "type": "https://httpstatuses.com/404", "instance": "kong:trace:1234567890", "detail": "Not found"} + "409": + application/problem+json: {"status": 409, "title": "Conflict", "type": "https://httpstatuses.com/409", "instance": "kong:trace:1234567890", "detail": "Conflict"} + get-add-on: + speakeasy-default-get-add-on: + parameters: + path: + addOnId: "550e8400-e29b-41d4-a716-446655440000" + responses: + "200": + application/json: {"id": "550e8400-e29b-41d4-a716-446655440000", "name": "my-add-on", "owner": {"kind": "control-plane", "control_plane_id": "123e4567-e89b-12d3-a456-426614174000", "control_plane_geo": "eu"}, "config": {"kind": "managed-cache.v0", "capacity_config": {"kind": "tiered", "tier": "4xlarge"}, "data_plane_groups": [{"id": "1150820b-c69f-4a2a-b9be-bbcdbc5cd618", "cloud_gateway_network_id": "36ae63d3-efd1-4bec-b246-62aa5d3f5695", "provider": "aws", "region": "us-east-1", "state": "terminating", "state_metadata": {"error_reason": "Failed to create managed cache add-on due to invalid configuration.\n"}}], "state_metadata": {"cache_config_id": "edaf40f9-9fb0-4ffe-bb74-4e763a6bd471", "cache_server_name": "{vault://env/ADDON_MANAGED_CACHE_SERVER_NAME}", "cache_host": "{vault://env/ADDON_MANAGED_CACHE_HOST}", "cache_port": "{vault://env/ADDON_MANAGED_CACHE_PORT}", "cache_username": "{vault://env/ADDON_MANAGED_CACHE_USERNAME}", "cloud_authentication": null}}, "entity_version": 1, "state": "terminating", "created_at": "2025-08-26T06:56:41Z", "updated_at": "2025-08-26T06:56:41Z"} + "401": + application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} + "403": + application/problem+json: {"status": 403, "title": "Forbidden", "type": "https://httpstatuses.com/403", "instance": "kong:trace:1234567890", "detail": "Forbidden"} + "404": + application/problem+json: {"status": 404, "title": "Not Found", "type": "https://httpstatuses.com/404", "instance": "kong:trace:1234567890", "detail": "Not found"} + delete-add-on: + speakeasy-default-delete-add-on: + parameters: + path: + addOnId: "550e8400-e29b-41d4-a716-446655440000" + responses: + "400": + application/problem+json: {"status": 799729, "title": "", "instance": "", "detail": "", "invalid_parameters": []} + "401": + application/problem+json: {"status": 401, "title": "Unauthorized", "type": "https://httpstatuses.com/401", "instance": "kong:trace:1234567890", "detail": "Invalid credentials"} + "403": + application/problem+json: {"status": 403, "title": "Forbidden", "type": "https://httpstatuses.com/403", "instance": "kong:trace:1234567890", "detail": "Forbidden"} + "404": + application/problem+json: {"status": 404, "title": "Not Found", "type": "https://httpstatuses.com/404", "instance": "kong:trace:1234567890", "detail": "Not found"} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/Makefile b/Makefile index 23d6535a..6088917e 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ generate: generate-plan-modifiers speakeasy speakeasy: check-speakeasy @rm -rf examples/resources - speakeasy run --skip-versioning --output console --minimal + speakeasy run --skip-versioning --output console --minimal --skip-compile @go mod tidy @go generate . @git checkout -- README.md diff --git a/README.md b/README.md index 67a01b1f..fafba012 100644 --- a/README.md +++ b/README.md @@ -35,4 +35,112 @@ e.g. `KONNECT_TOKEN=kpat_YOUR_PAT terraform apply` + +## Summary + +Konnect API (BETA): This is a BETA specification. Endpoints in this specification may change with zero notice + + + +## Table of Contents + +* [terraform-provider-konnect-beta](#terraform-provider-konnect-beta) + * [Usage](#usage) + * [Installation](#installation) + * [Authentication](#authentication) + * [Testing the provider locally](#testing-the-provider-locally) + + + + +## Installation + +To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`. + +```hcl +terraform { + required_providers { + konnect-beta = { + source = "kong/konnect-beta" + version = "0.15.0" + } + } +} + +provider "konnect-beta" { + # Configuration options +} +``` + + + +## Authentication + +This provider supports authentication configuration via environment variables and provider configuration. + +The configuration precedence is: + +- Provider configuration +- Environment variables + +Available configuration: + +| Provider Attribute | Description | +|---|---| +| `konnect_access_token` | The Konnect access token is meant to be used by the Konnect dashboard and the decK CLI authenticate with. +. | +| `personal_access_token` | The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs. +You can generate a Personal Access Token (PAT) from the [personal access token page](https://cloud.konghq.com/global/account/tokens/) in the Konnect dashboard. +The PAT token must be passed in the header of a request, for example: +`curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer kpat_xgfT...'` +. Configurable via environment variable `KONNECT_TOKEN`. | +| `system_account_access_token` | The system account access token is meant for automations and integrations that are not directly associated with a human identity. +You can generate a system account Access Token by creating a system account and then obtaining a system account access token for that account. +The access token must be passed in the header of a request, for example: +`curl -X GET 'https://global.api.konghq.com/v2/users/' --header 'Authorization: Bearer spat_i2Ej...'` +. Configurable via environment variable `KONNECT_SPAT`. | + + + +## Testing the provider locally + +#### Local Provider + +Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally. + +This also allows for debuggers (e.g. delve) to be attached to the provider. + +```sh +go run main.go --debug +# Copy the TF_REATTACH_PROVIDERS env var +# In a new terminal +cd examples/your-example +TF_REATTACH_PROVIDERS=... terraform init +TF_REATTACH_PROVIDERS=... terraform apply +``` + +#### Compiled Provider + +Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods. + +1. Execute `go build` to construct a binary called `terraform-provider-konnect-beta` +2. Ensure that the `.terraformrc` file is configured with a `dev_overrides` section such that your local copy of terraform can see the provider binary + +Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set. + +``` +provider_installation { + + dev_overrides { + "registry.terraform.io/kong/konnect-beta" = "" + } + + # For all other providers, install them directly from their origin provider + # registries as normal. If you omit this, Terraform will _only_ use + # the dev_overrides block, and so no other providers will be available. + direct {} +} +``` + + diff --git a/docs/data-sources/mesh_control_planes.md b/docs/data-sources/mesh_control_planes.md new file mode 100644 index 00000000..162be3d5 --- /dev/null +++ b/docs/data-sources/mesh_control_planes.md @@ -0,0 +1,62 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "konnect-beta_mesh_control_planes Data Source - terraform-provider-konnect-beta" +subcategory: "" +description: |- + MeshControlPlanes DataSource +--- + +# konnect-beta_mesh_control_planes (Data Source) + +MeshControlPlanes DataSource + +## Example Usage + +```terraform +data "konnect-beta_mesh_control_planes" "my_meshcontrolplanes" { +} +``` + + +## Schema + +### Read-Only + +- `data` (Attributes List) (see [below for nested schema](#nestedatt--data)) + + +### Nested Schema for `data` + +Read-Only: + +- `created_at` (String) +- `description` (String) +- `features` (Attributes List) (see [below for nested schema](#nestedatt--data--features)) +- `id` (String) ID of the control plane. +- `labels` (Map of String) Labels to facilitate tagged search on control planes. Keys must be of length 1-63 characters. +- `name` (String) The name of the control plane. +- `updated_at` (String) + + +### Nested Schema for `data.features` + +Read-Only: + +- `hostname_generator_creation` (Attributes) (see [below for nested schema](#nestedatt--data--features--hostname_generator_creation)) +- `mesh_creation` (Attributes) (see [below for nested schema](#nestedatt--data--features--mesh_creation)) +- `type` (String) + + +### Nested Schema for `data.features.hostname_generator_creation` + +Read-Only: + +- `enabled` (Boolean) + + + +### Nested Schema for `data.features.mesh_creation` + +Read-Only: + +- `enabled` (Boolean) diff --git a/docs/data-sources/portal.md b/docs/data-sources/portal.md new file mode 100644 index 00000000..400b316f --- /dev/null +++ b/docs/data-sources/portal.md @@ -0,0 +1,226 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "konnect-beta_portal Data Source - terraform-provider-konnect-beta" +subcategory: "" +description: |- + Portal DataSource +--- + +# konnect-beta_portal (Data Source) + +Portal DataSource + +## Example Usage + +```terraform +data "konnect-beta_portal" "my_portal" { + filter = { + authentication_enabled = false + auto_approve_applications = true + auto_approve_developers = true + canonical_domain = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_api_visibility = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_application_auth_strategy_id = { + eq = "...my_eq..." + neq = "...my_neq..." + oeq = "...my_oeq..." + } + default_domain = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_page_visibility = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + description = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + id = { + eq = "...my_eq..." + neq = "...my_neq..." + oeq = "...my_oeq..." + } + name = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + rbac_enabled = true + } + sort = "...my_sort..." +} +``` + + +## Schema + +### Optional + +- `filter` (Attributes) Filter portals returned in the response. (see [below for nested schema](#nestedatt--filter)) +- `sort` (String) Sorts a collection of portals. Supported sort attributes are: + - name + - description + - authentication_enabled + - rbac_enabled + - auto_approve_applications + - auto_approve_developers + - default_domain + - canonical_domain + - created_at + - updated_at + +### Read-Only + +- `authentication_enabled` (Boolean) Whether the portal supports developer authentication. If disabled, developers cannot register for accounts or create applications. +- `auto_approve_applications` (Boolean) Whether requests from applications to register for APIs will be automatically approved, or if they will be set to pending until approved by an admin. +- `auto_approve_developers` (Boolean) Whether developer account registrations will be automatically approved, or if they will be set to pending until approved by an admin. +- `canonical_domain` (String) The canonical domain of the developer portal +- `created_at` (String) An ISO-8601 timestamp representation of entity creation date. +- `default_api_visibility` (String) The default visibility of APIs in the portal. If set to `public`, newly published APIs are visible to unauthenticated developers. If set to `private`, newly published APIs are hidden from unauthenticated developers. +- `default_application_auth_strategy_id` (String) The default authentication strategy for APIs published to the portal. Newly published APIs will use this authentication strategy unless overridden during publication. If set to `null`, API publications will not use an authentication strategy unless set during publication. +- `default_domain` (String) The domain assigned to the portal by Konnect. This is the default place to access the portal and its API if not using a `custom_domain``. +- `default_page_visibility` (String) The default visibility of pages in the portal. If set to `public`, newly created pages are visible to unauthenticated developers. If set to `private`, newly created pages are hidden from unauthenticated developers. +- `description` (String) A description of the portal. +- `display_name` (String) The display name of the portal. This value will be the portal's `name` in Portal API. +- `id` (String) Contains a unique identifier used for this resource. +- `labels` (Map of String) Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. + +Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". +- `name` (String) The name of the portal, used to distinguish it from other portals. Name must be unique. +- `rbac_enabled` (Boolean) Whether the portal resources are protected by Role Based Access Control (RBAC). If enabled, developers view or register for APIs until unless assigned to teams with access to view and consume specific APIs. Authentication must be enabled to use RBAC. +- `sipr_enabled` (Boolean) Whether ip allow list is enabled for the organization. +- `updated_at` (String) An ISO-8601 timestamp representation of entity update date. + + +### Nested Schema for `filter` + +Optional: + +- `authentication_enabled` (Boolean) Filter by a boolean value (true/false). +- `auto_approve_applications` (Boolean) Filter by a boolean value (true/false). +- `auto_approve_developers` (Boolean) Filter by a boolean value (true/false). +- `canonical_domain` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--canonical_domain)) +- `default_api_visibility` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--default_api_visibility)) +- `default_application_auth_strategy_id` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq` (see [below for nested schema](#nestedatt--filter--default_application_auth_strategy_id)) +- `default_domain` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--default_domain)) +- `default_page_visibility` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--default_page_visibility)) +- `description` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--description)) +- `id` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq` (see [below for nested schema](#nestedatt--filter--id)) +- `name` (Attributes) Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains` (see [below for nested schema](#nestedatt--filter--name)) +- `rbac_enabled` (Boolean) Filter by a boolean value (true/false). + + +### Nested Schema for `filter.canonical_domain` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.default_api_visibility` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.default_application_auth_strategy_id` + +Optional: + +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.default_domain` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.default_page_visibility` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.description` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.id` + +Optional: + +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `oeq` (String) The field matches any of the provided values. + + + +### Nested Schema for `filter.name` + +Optional: + +- `contains` (String) The field contains the provided value. +- `eq` (String) The field exactly matches the provided value. +- `neq` (String) The field does not match the provided value. +- `ocontains` (String) The field contains any of the provided values. +- `oeq` (String) The field matches any of the provided values. diff --git a/docs/resources/auth_server_clients.md b/docs/resources/auth_server_clients.md index 1b8be77f..239adb5f 100644 --- a/docs/resources/auth_server_clients.md +++ b/docs/resources/auth_server_clients.md @@ -35,6 +35,7 @@ resource "konnect_auth_server_clients" "my_authserverclients" { redirect_uris = [ "https://flashy-sauerkraut.com/" ] + refresh_token_duration = 84206233 response_types = [ "none" ] @@ -65,6 +66,7 @@ resource "konnect_auth_server_clients" "my_authserverclients" { Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". - `login_uri` (String) The URI of the login page where the user is redirected to authenticate in interactive flows. The login page must be secure (HTTPS). - `redirect_uris` (List of String) The URIs that the client is allowed to redirect to after authentication in interactive flows. All redirect URIs must be absolute URIs, be secure (HTTPS), and must not include a fragment component. +- `refresh_token_duration` (Number) The duration of the minted refresh token is valid for, in seconds. Default: 2592000 - `token_endpoint_auth_method` (String) Requested authentication method for OAuth 2.0 endpoints. Default: "client_secret_post"; must be one of ["client_secret_post", "none"] ### Read-Only diff --git a/docs/resources/cloud_gateway_add_on.md b/docs/resources/cloud_gateway_add_on.md new file mode 100644 index 00000000..3d5a7dc1 --- /dev/null +++ b/docs/resources/cloud_gateway_add_on.md @@ -0,0 +1,226 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "konnect_cloud_gateway_add_on Resource - terraform-provider-konnect-beta" +subcategory: "" +description: |- + CloudGatewayAddOn Resource +--- + +# konnect_cloud_gateway_add_on (Resource) + +CloudGatewayAddOn Resource + +## Example Usage + +```terraform +resource "konnect_cloud_gateway_add_on" "my_cloudgatewayaddon" { + provider = konnect-beta + config = { + managed_cache = { + capacity_config = { + tiered = { + tier = "micro" + } + } + } + } + name = "my-add-on" + owner = { + control_plane_group = { + control_plane_group_geo = "sg" + control_plane_group_id = "123e4567-e89b-12d3-a456-426614174000" + } + } +} +``` + + +## Schema + +### Required + +- `config` (Attributes) Configuration for creating different types of add-ons. Requires replacement if changed. (see [below for nested schema](#nestedatt--config)) +- `name` (String) Unique human-readable name of the add-on. Requires replacement if changed. +- `owner` (Attributes) Owner for the add-on. Requires replacement if changed. (see [below for nested schema](#nestedatt--owner)) + +### Read-Only + +- `created_at` (String) RFC-3339 timestamp representation of add-on creation date. +- `entity_version` (Number) Monotonically-increasing version count of the add-on, to indicate the order of updates to the add-on. +- `id` (String) The ID of this resource. +- `state` (String) The current state of the add-on. Possible values: +- `initializing` - The add-on is in the process of being initialized/updated. +- `ready` - The add-on is fully operational. +- `terminating` - The add-on is in the process of being deleted. +- `updated_at` (String) RFC-3339 timestamp representation of add-on update date. + + +### Nested Schema for `config` + +Optional: + +- `managed_cache` (Attributes) Configuration for creating a managed cache add-on. Requires replacement if changed. (see [below for nested schema](#nestedatt--config--managed_cache)) + +Read-Only: + +- `managed_cache_add_on_config_response` (Attributes) Configuration for managed cache add-on. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response)) + + +### Nested Schema for `config.managed_cache` + +Required: + +- `capacity_config` (Attributes) Configuration for managed cache capacity and performance characteristics. Requires replacement if changed. (see [below for nested schema](#nestedatt--config--managed_cache--capacity_config)) + + +### Nested Schema for `config.managed_cache.capacity_config` + +Optional: + +- `tiered` (Attributes) Capacity tiers with pre-configured size and performance characteristics. Requires replacement if changed. (see [below for nested schema](#nestedatt--config--managed_cache--capacity_config--tiered)) + + +### Nested Schema for `config.managed_cache.capacity_config.tiered` + +Required: + +- `tier` (String) Capacity tier that determines both cache size and performance characteristics: +- micro: ~0.5 GiB capacity +- small: ~1 GiB capacity +- medium: ~3 GiB capacity +- large: ~6 GiB capacity +- xlarge: ~12 GiB capacity +- 2xlarge: ~25 GiB capacity +- 4xlarge: ~52 GiB capacity +must be one of ["micro", "small", "medium", "large", "xlarge", "2xlarge", "4xlarge"]; Requires replacement if changed. + + + + + +### Nested Schema for `config.managed_cache_add_on_config_response` + +Read-Only: + +- `capacity_config` (Attributes) Configuration for managed cache capacity and performance characteristics. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--capacity_config)) +- `data_plane_groups` (Attributes List) List of data-plane groups where the managed cache is deployed. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--data_plane_groups)) +- `state_metadata` (Attributes) Metadata describing the state of the managed cache add-on. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--state_metadata)) + + +### Nested Schema for `config.managed_cache_add_on_config_response.capacity_config` + +Read-Only: + +- `tiered` (Attributes) Capacity tiers with pre-configured size and performance characteristics. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--capacity_config--tiered)) + + +### Nested Schema for `config.managed_cache_add_on_config_response.capacity_config.tiered` + +Read-Only: + +- `tier` (String) Capacity tier that determines both cache size and performance characteristics: +- micro: ~0.5 GiB capacity +- small: ~1 GiB capacity +- medium: ~3 GiB capacity +- large: ~6 GiB capacity +- xlarge: ~12 GiB capacity +- 2xlarge: ~25 GiB capacity +- 4xlarge: ~52 GiB capacity + + + + +### Nested Schema for `config.managed_cache_add_on_config_response.data_plane_groups` + +Read-Only: + +- `cloud_gateway_network_id` (String) Network ID this data-plane group is attached to. +- `id` (String) ID of the data-plane group. +- `provider` (String) Name of cloud provider. +- `region` (String) Region of cloud provider the data-plane group is deployed to. +- `state` (String) The current state of the managed cache add-on in the data-plane group. Possible values: +- `initializing` - The add-on is in the process of being initialized/updated and is setting up necessary resources for this data-plane group. +- `ready` - The add-on is fully operational for this data-plane group. +- `error` - The add-on is in an error state, and is not operational for this data-plane group. +- `terminating` - The add-on is in the process of being deleted for this data-plane group. +- `state_metadata` (Attributes) Metadata describing the state of the managed cache add-on in the data-plane group. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--data_plane_groups--state_metadata)) + + +### Nested Schema for `config.managed_cache_add_on_config_response.data_plane_groups.state_metadata` + +Read-Only: + +- `error_reason` (String) Reason why the managed cache add-on may be in an error state, reported from backing infrastructure. + + + + +### Nested Schema for `config.managed_cache_add_on_config_response.state_metadata` + +Read-Only: + +- `cache_config_id` (String) Reference to cache configuration for this add-on. +- `cache_host` (String) Env vault path to cache hostname. +- `cache_port` (String) Env vault path to cache port. +- `cache_server_name` (String) Env vault path to cache server name. +- `cache_username` (String) Env vault path to cache username. +- `cloud_authentication` (Attributes) Metadata describing the cloud authentication details for managed cache add-on. (see [below for nested schema](#nestedatt--config--managed_cache_add_on_config_response--state_metadata--cloud_authentication)) + + +### Nested Schema for `config.managed_cache_add_on_config_response.state_metadata.cloud_authentication` + +Read-Only: + +- `auth_provider` (String) Env vault path to cache auth provider. +- `aws_assume_role_arn` (String) Env vault path to aws assume role arn. +- `aws_cache_name` (String) Env vault path to aws cache name. +- `aws_region` (String) Env vault path to aws region. +- `azure_tenant_id` (String) Env vault path to azure tenant id. + + + + + + +### Nested Schema for `owner` + +Optional: + +- `control_plane` (Attributes) Control Plane is the owner for the add-on. Requires replacement if changed. (see [below for nested schema](#nestedatt--owner--control_plane)) +- `control_plane_group` (Attributes) Control Plane Group is the owner for the add-on. Requires replacement if changed. (see [below for nested schema](#nestedatt--owner--control_plane_group)) + + +### Nested Schema for `owner.control_plane` + +Optional: + +- `control_plane_geo` (String) Set of control-plane geos supported for deploying cloud-gateways configurations. Not Null; must be one of ["us", "eu", "au", "me", "in", "sg"]; Requires replacement if changed. +- `control_plane_id` (String) ID of the control-plane that owns this add-on. Not Null; Requires replacement if changed. + + + +### Nested Schema for `owner.control_plane_group` + +Optional: + +- `control_plane_group_geo` (String) Set of control-plane geos supported for deploying cloud-gateways configurations. Not Null; must be one of ["us", "eu", "au", "me", "in", "sg"]; Requires replacement if changed. +- `control_plane_group_id` (String) ID of the control-plane group that owns this add-on. Not Null; Requires replacement if changed. + +## Import + +Import is supported using the following syntax: + +In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `id` attribute, for example: + +```terraform +import { + to = konnect_cloud_gateway_add_on.my_konnect_cloud_gateway_add_on + id = "550e8400-e29b-41d4-a716-446655440000" +} +``` + +The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: + +```shell +terraform import konnect_cloud_gateway_add_on.my_konnect_cloud_gateway_add_on "550e8400-e29b-41d4-a716-446655440000" +``` diff --git a/docs/resources/dashboard.md b/docs/resources/dashboard.md index 1275b87c..54f73082 100644 --- a/docs/resources/dashboard.md +++ b/docs/resources/dashboard.md @@ -52,7 +52,7 @@ resource "konnect_dashboard" "my_dashboard" { ] granularity = "twelveHourly" metrics = [ - "kong_latency_p50" + "kong_latency_average" ] time_range = { relative = { diff --git a/docs/resources/event_gateway_backend_cluster.md b/docs/resources/event_gateway_backend_cluster.md index 33bbe842..1d49e0ab 100644 --- a/docs/resources/event_gateway_backend_cluster.md +++ b/docs/resources/event_gateway_backend_cluster.md @@ -61,7 +61,7 @@ resource "konnect_event_gateway_backend_cluster" "my_eventgatewaybackendcluster" ### Optional -- `description` (String) A human-readable description of the virtual cluster. Default: "" +- `description` (String) A human-readable description of the backend cluster. Default: "" - `insecure_allow_anonymous_virtual_cluster_auth` (Boolean) If true, virtual clusters can have allow anonymous authentication and use this backend cluster. This setting is not recommended for production use as it may create privilege escalation vulnerabilities. Default: false diff --git a/docs/resources/event_gateway_cluster_policy_acls.md b/docs/resources/event_gateway_cluster_policy_acls.md index db0475bb..1c83ba90 100644 --- a/docs/resources/event_gateway_cluster_policy_acls.md +++ b/docs/resources/event_gateway_cluster_policy_acls.md @@ -25,11 +25,9 @@ resource "konnect_event_gateway_cluster_policy_acls" "my_eventgatewayclusterpoli name = "describe_configs" } ] - resource_names = [ - { - match = "...my_match..." - } - ] + resource_names = { + str = "context.auth.tokens.claims[\"topics\"]" + } resource_type = "transactional_id" } ] @@ -85,7 +83,7 @@ Required: - `action` (String) How to handle the request if the rule matches. must be one of ["allow", "deny"] - `operations` (Attributes List) Types of Kafka operations to match against. Note that not every operation can apply to every resource type. (see [below for nested schema](#nestedatt--config--rules--operations)) -- `resource_names` (Attributes List) If any of these entries match, the resource name matches for this rule. (see [below for nested schema](#nestedatt--config--rules--resource_names)) +- `resource_names` (Attributes) If any of these entries match, the resource name matches for this rule. A maximum of 50 entries are allowed. (see [below for nested schema](#nestedatt--config--rules--resource_names)) - `resource_type` (String) This rule applies to access only for type of resource. must be one of ["topic", "group", "transactional_id", "cluster"] @@ -99,6 +97,14 @@ Required: ### Nested Schema for `config.rules.resource_names` +Optional: + +- `array_of_event_gateway_acl_resource_name` (Attributes List) (see [below for nested schema](#nestedatt--config--rules--resource_names--array_of_event_gateway_acl_resource_name)) +- `str` (String) + + +### Nested Schema for `config.rules.resource_names.array_of_event_gateway_acl_resource_name` + Required: - `match` (String) Currently supported are exact matches and globs. diff --git a/docs/resources/event_gateway_consume_policy_schema_validation.md b/docs/resources/event_gateway_consume_policy_schema_validation.md index 0e61ee58..38237816 100644 --- a/docs/resources/event_gateway_consume_policy_schema_validation.md +++ b/docs/resources/event_gateway_consume_policy_schema_validation.md @@ -19,9 +19,7 @@ resource "konnect_event_gateway_consume_policy_schema_validation" "my_eventgatew config = { key_validation_action = "mark" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "e1881384-290f-443c-a5bd-ed6f2e53d539" } type = "json" value_validation_action = "mark" @@ -80,7 +78,7 @@ Optional: to help to identify the clients violating schema. * skip - skips delivering a record. must be one of ["mark", "skip"] -- `schema_registry` (Attributes) A reference to a schema Registry. (see [below for nested schema](#nestedatt--config--schema_registry)) +- `schema_registry` (Attributes) (see [below for nested schema](#nestedatt--config--schema_registry)) - `value_validation_action` (String) Defines a behavior when record value is not valid. * mark - marks a record with kong/server header and client ID value to help to identify the clients violating schema. @@ -90,26 +88,10 @@ must be one of ["mark", "skip"] ### Nested Schema for `config.schema_registry` -Optional: - -- `schema_registry_reference_by_id` (Attributes) (see [below for nested schema](#nestedatt--config--schema_registry--schema_registry_reference_by_id)) -- `schema_registry_reference_by_name` (Attributes) Reference a schema registry by its unique name. (see [below for nested schema](#nestedatt--config--schema_registry--schema_registry_reference_by_name)) - - -### Nested Schema for `config.schema_registry.schema_registry_reference_by_id` - Required: - `id` (String) The unique identifier of the schema registry. - - -### Nested Schema for `config.schema_registry.schema_registry_reference_by_name` - -Required: - -- `name` (String) The unique name of the schema registry. - ## Import Import is supported using the following syntax: diff --git a/docs/resources/event_gateway_listener.md b/docs/resources/event_gateway_listener.md index 3113c946..7308c5e9 100644 --- a/docs/resources/event_gateway_listener.md +++ b/docs/resources/event_gateway_listener.md @@ -54,7 +54,7 @@ It's possible to combine both, e.g. [9092, "9093-9095", 9096]. ### Optional -- `description` (String) A human-readable description of the virtual cluster. Default: "" +- `description` (String) A human-readable description of the listener. Default: "" - `labels` (Map of String) Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". diff --git a/docs/resources/event_gateway_listener_policy_forward_to_virtual_cluster.md b/docs/resources/event_gateway_listener_policy_forward_to_virtual_cluster.md index c5725ffd..7f5ae016 100644 --- a/docs/resources/event_gateway_listener_policy_forward_to_virtual_cluster.md +++ b/docs/resources/event_gateway_listener_policy_forward_to_virtual_cluster.md @@ -24,14 +24,14 @@ resource "konnect_event_gateway_listener_policy_forward_to_virtual_cluster" "my_ sni_suffix = ".example.com" } } - description = "...my_description..." - enabled = false - event_gateway_listener_id = "6feda708-3b1b-4415-b1db-cf2694f34b09" - gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + description = "...my_description..." + enabled = false + gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" labels = { key = "value" } - name = "...my_name..." + listener_id = "bdaf2651-42bc-48ec-b29f-f4890f7f07fc" + name = "...my_name..." } ``` @@ -41,8 +41,8 @@ resource "konnect_event_gateway_listener_policy_forward_to_virtual_cluster" "my_ ### Required - `config` (Attributes) The configuration of the policy. (see [below for nested schema](#nestedatt--config)) -- `event_gateway_listener_id` (String) The ID of the Event Gateway Listener. - `gateway_id` (String) The UUID of your Gateway. +- `listener_id` (String) The ID of the Event Gateway Listener. ### Optional @@ -89,7 +89,7 @@ It is strongly discouraged to use port mapping in production. (see [below for ne Required: - `advertised_host` (String) Virtual brokers are advertised to clients using this host. Any kind of host supported by kafka can be used. If not defined, it's listen_address. If listen_address is `0.0.0.0` it's the destination IP of the TCP connection. -- `destination` (Attributes) A reference to a virtual cluster. (see [below for nested schema](#nestedatt--config--port_mapping--destination)) +- `destination` (Attributes) Reference a virtual cluster by its unique identifier. (see [below for nested schema](#nestedatt--config--port_mapping--destination)) Optional: @@ -106,28 +106,11 @@ Default: "at_start"; must be one of ["none", "at_start"] ### Nested Schema for `config.port_mapping.destination` -Optional: - -- `virtual_cluster_reference_by_id` (Attributes) Reference a virtual cluster by its unique identifier. (see [below for nested schema](#nestedatt--config--port_mapping--destination--virtual_cluster_reference_by_id)) -- `virtual_cluster_reference_by_name` (Attributes) Reference a virtual cluster by its unique name. (see [below for nested schema](#nestedatt--config--port_mapping--destination--virtual_cluster_reference_by_name)) - - -### Nested Schema for `config.port_mapping.destination.virtual_cluster_reference_by_id` - Required: - `id` (String) The unique identifier of the virtual cluster. - -### Nested Schema for `config.port_mapping.destination.virtual_cluster_reference_by_name` - -Required: - -- `name` (String) The name of the virtual cluster. - - - ### Nested Schema for `config.sni` @@ -171,9 +154,9 @@ In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp. import { to = konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect_event_gateway_listener_policy_forward_to_virtual_cluster id = jsonencode({ - event_gateway_listener_id = "..." gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + listener_id = "..." }) } ``` @@ -181,5 +164,5 @@ import { The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell -terraform import konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect_event_gateway_listener_policy_forward_to_virtual_cluster '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}' +terraform import konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect_event_gateway_listener_policy_forward_to_virtual_cluster '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}' ``` diff --git a/docs/resources/event_gateway_listener_policy_tls_server.md b/docs/resources/event_gateway_listener_policy_tls_server.md index 32e9d0c9..ef425ead 100644 --- a/docs/resources/event_gateway_listener_policy_tls_server.md +++ b/docs/resources/event_gateway_listener_policy_tls_server.md @@ -28,14 +28,14 @@ resource "konnect_event_gateway_listener_policy_tls_server" "my_eventgatewaylist min = "TLSv1.3" } } - description = "...my_description..." - enabled = true - event_gateway_listener_id = "34102bf1-bf41-4c00-a62f-6fca747cb8f8" - gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + description = "...my_description..." + enabled = true + gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" labels = { key = "value" } - name = "...my_name..." + listener_id = "f7d7b9be-5608-44c3-8f6a-46e055797c31" + name = "...my_name..." } ``` @@ -45,8 +45,8 @@ resource "konnect_event_gateway_listener_policy_tls_server" "my_eventgatewaylist ### Required - `config` (Attributes) The configuration of the policy. (see [below for nested schema](#nestedatt--config)) -- `event_gateway_listener_id` (String) The ID of the Event Gateway Listener. - `gateway_id` (String) The UUID of your Gateway. +- `listener_id` (String) The ID of the Event Gateway Listener. ### Optional @@ -106,9 +106,9 @@ In Terraform v1.5.0 and later, the [`import` block](https://developer.hashicorp. import { to = konnect_event_gateway_listener_policy_tls_server.my_konnect_event_gateway_listener_policy_tls_server id = jsonencode({ - event_gateway_listener_id = "..." gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + listener_id = "..." }) } ``` @@ -116,5 +116,5 @@ import { The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell -terraform import konnect_event_gateway_listener_policy_tls_server.my_konnect_event_gateway_listener_policy_tls_server '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}' +terraform import konnect_event_gateway_listener_policy_tls_server.my_konnect_event_gateway_listener_policy_tls_server '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}' ``` diff --git a/docs/resources/event_gateway_produce_policy_encrypt.md b/docs/resources/event_gateway_produce_policy_encrypt.md index d5faa7a2..8155ede1 100644 --- a/docs/resources/event_gateway_produce_policy_encrypt.md +++ b/docs/resources/event_gateway_produce_policy_encrypt.md @@ -20,9 +20,7 @@ resource "konnect_event_gateway_produce_policy_encrypt" "my_eventgatewayproducep encryption_key = { static = { key = { - reference_by_id = { - id = "9d9dcdc8-beb0-45dc-8f7e-521cf4b6c0c7" - } + id = "6e8740c2-fb76-4269-aeef-660d701c6ea1" } } } @@ -101,31 +99,15 @@ Required: Required: -- `key` (Attributes) A static encryption key reference, either by ID or by value. (see [below for nested schema](#nestedatt--config--encryption_key--static--key)) +- `key` (Attributes) A static encryption key reference by ID. (see [below for nested schema](#nestedatt--config--encryption_key--static--key)) ### Nested Schema for `config.encryption_key.static.key` -Optional: - -- `reference_by_id` (Attributes) A static encryption key reference by ID. (see [below for nested schema](#nestedatt--config--encryption_key--static--key--reference_by_id)) -- `reference_by_name` (Attributes) A static encryption key reference by name. (see [below for nested schema](#nestedatt--config--encryption_key--static--key--reference_by_name)) - - -### Nested Schema for `config.encryption_key.static.key.reference_by_id` - Required: - `id` (String) The ID of the static key defined in the key source. - - -### Nested Schema for `config.encryption_key.static.key.reference_by_name` - -Required: - -- `name` (String) The name of the static key defined in the key source. - ## Import Import is supported using the following syntax: diff --git a/docs/resources/event_gateway_produce_policy_schema_validation.md b/docs/resources/event_gateway_produce_policy_schema_validation.md index 0f50afb6..6eeb779c 100644 --- a/docs/resources/event_gateway_produce_policy_schema_validation.md +++ b/docs/resources/event_gateway_produce_policy_schema_validation.md @@ -20,18 +20,14 @@ resource "konnect_event_gateway_produce_policy_schema_validation" "my_eventgatew confluent_schema_registry = { key_validation_action = "reject" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "95ce4f52-159c-43dd-a6dd-9bb6e8e07446" } value_validation_action = "reject" } json = { key_validation_action = "mark" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "74577697-03b2-4d40-bfe2-929c891c4254" } value_validation_action = "reject" } @@ -91,7 +87,7 @@ Optional: * mark - marks a record with kong/server header and client ID value to help to identify the clients violating schema. must be one of ["reject", "mark"] -- `schema_registry` (Attributes) A reference to a schema Registry. (see [below for nested schema](#nestedatt--config--confluent_schema_registry--schema_registry)) +- `schema_registry` (Attributes) (see [below for nested schema](#nestedatt--config--confluent_schema_registry--schema_registry)) - `value_validation_action` (String) Defines a behavior when record value is not valid. * reject - rejects a batch for topic partition. Only available for produce. * mark - marks a record with kong/server header and client ID value @@ -101,28 +97,11 @@ must be one of ["reject", "mark"] ### Nested Schema for `config.confluent_schema_registry.schema_registry` -Optional: - -- `schema_registry_reference_by_id` (Attributes) (see [below for nested schema](#nestedatt--config--confluent_schema_registry--schema_registry--schema_registry_reference_by_id)) -- `schema_registry_reference_by_name` (Attributes) Reference a schema registry by its unique name. (see [below for nested schema](#nestedatt--config--confluent_schema_registry--schema_registry--schema_registry_reference_by_name)) - - -### Nested Schema for `config.confluent_schema_registry.schema_registry.schema_registry_reference_by_id` - Required: - `id` (String) The unique identifier of the schema registry. - -### Nested Schema for `config.confluent_schema_registry.schema_registry.schema_registry_reference_by_name` - -Required: - -- `name` (String) The unique name of the schema registry. - - - ### Nested Schema for `config.json` @@ -134,7 +113,7 @@ Optional: * mark - marks a record with kong/server header and client ID value to help to identify the clients violating schema. must be one of ["reject", "mark"] -- `schema_registry` (Attributes) A reference to a schema Registry. (see [below for nested schema](#nestedatt--config--json--schema_registry)) +- `schema_registry` (Attributes) (see [below for nested schema](#nestedatt--config--json--schema_registry)) - `value_validation_action` (String) Defines a behavior when record value is not valid. * reject - rejects a batch for topic partition. Only available for produce. * mark - marks a record with kong/server header and client ID value @@ -144,26 +123,10 @@ must be one of ["reject", "mark"] ### Nested Schema for `config.json.schema_registry` -Optional: - -- `schema_registry_reference_by_id` (Attributes) (see [below for nested schema](#nestedatt--config--json--schema_registry--schema_registry_reference_by_id)) -- `schema_registry_reference_by_name` (Attributes) Reference a schema registry by its unique name. (see [below for nested schema](#nestedatt--config--json--schema_registry--schema_registry_reference_by_name)) - - -### Nested Schema for `config.json.schema_registry.schema_registry_reference_by_id` - Required: - `id` (String) The unique identifier of the schema registry. - - -### Nested Schema for `config.json.schema_registry.schema_registry_reference_by_name` - -Required: - -- `name` (String) The unique name of the schema registry. - ## Import Import is supported using the following syntax: diff --git a/examples/data-sources/konnect_mesh_control_planes/data-source.tf b/examples/data-sources/konnect_mesh_control_planes/data-source.tf new file mode 100644 index 00000000..6fbb973d --- /dev/null +++ b/examples/data-sources/konnect_mesh_control_planes/data-source.tf @@ -0,0 +1,2 @@ +data "konnect-beta_mesh_control_planes" "my_meshcontrolplanes" { +} \ No newline at end of file diff --git a/examples/data-sources/konnect_portal/data-source.tf b/examples/data-sources/konnect_portal/data-source.tf new file mode 100644 index 00000000..30d29da8 --- /dev/null +++ b/examples/data-sources/konnect_portal/data-source.tf @@ -0,0 +1,61 @@ +data "konnect-beta_portal" "my_portal" { + filter = { + authentication_enabled = false + auto_approve_applications = true + auto_approve_developers = true + canonical_domain = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_api_visibility = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_application_auth_strategy_id = { + eq = "...my_eq..." + neq = "...my_neq..." + oeq = "...my_oeq..." + } + default_domain = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + default_page_visibility = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + description = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + id = { + eq = "...my_eq..." + neq = "...my_neq..." + oeq = "...my_oeq..." + } + name = { + contains = "...my_contains..." + eq = "...my_eq..." + neq = "...my_neq..." + ocontains = "...my_ocontains..." + oeq = "...my_oeq..." + } + rbac_enabled = true + } + sort = "...my_sort..." +} \ No newline at end of file diff --git a/examples/resources/konnect_auth_server_clients/resource.tf b/examples/resources/konnect_auth_server_clients/resource.tf index 08b51b9e..7a0223ba 100644 --- a/examples/resources/konnect_auth_server_clients/resource.tf +++ b/examples/resources/konnect_auth_server_clients/resource.tf @@ -20,6 +20,7 @@ resource "konnect_auth_server_clients" "my_authserverclients" { redirect_uris = [ "https://flashy-sauerkraut.com/" ] + refresh_token_duration = 84206233 response_types = [ "none" ] diff --git a/examples/resources/konnect_cloud_gateway_add_on/import-by-string-id.tf b/examples/resources/konnect_cloud_gateway_add_on/import-by-string-id.tf new file mode 100644 index 00000000..ef0f82ed --- /dev/null +++ b/examples/resources/konnect_cloud_gateway_add_on/import-by-string-id.tf @@ -0,0 +1,5 @@ +import { + provider = konnect-beta + to = konnect_cloud_gateway_add_on.my_konnect-beta_cloud_gateway_add_on + id = "550e8400-e29b-41d4-a716-446655440000" +} diff --git a/examples/resources/konnect_cloud_gateway_add_on/import.sh b/examples/resources/konnect_cloud_gateway_add_on/import.sh new file mode 100644 index 00000000..b3484346 --- /dev/null +++ b/examples/resources/konnect_cloud_gateway_add_on/import.sh @@ -0,0 +1 @@ +terraform import konnect_cloud_gateway_add_on.my_konnect_cloud_gateway_add_on "550e8400-e29b-41d4-a716-446655440000" diff --git a/examples/resources/konnect_cloud_gateway_add_on/resource.tf b/examples/resources/konnect_cloud_gateway_add_on/resource.tf new file mode 100644 index 00000000..6cd3d2e4 --- /dev/null +++ b/examples/resources/konnect_cloud_gateway_add_on/resource.tf @@ -0,0 +1,19 @@ +resource "konnect_cloud_gateway_add_on" "my_cloudgatewayaddon" { + provider = konnect-beta + config = { + managed_cache = { + capacity_config = { + tiered = { + tier = "micro" + } + } + } + } + name = "my-add-on" + owner = { + control_plane_group = { + control_plane_group_geo = "sg" + control_plane_group_id = "123e4567-e89b-12d3-a456-426614174000" + } + } +} \ No newline at end of file diff --git a/examples/resources/konnect_dashboard/resource.tf b/examples/resources/konnect_dashboard/resource.tf index 1c598c0a..89fed940 100644 --- a/examples/resources/konnect_dashboard/resource.tf +++ b/examples/resources/konnect_dashboard/resource.tf @@ -37,7 +37,7 @@ resource "konnect_dashboard" "my_dashboard" { ] granularity = "twelveHourly" metrics = [ - "kong_latency_p50" + "kong_latency_average" ] time_range = { relative = { diff --git a/examples/resources/konnect_event_gateway_cluster_policy_acls/resource.tf b/examples/resources/konnect_event_gateway_cluster_policy_acls/resource.tf index 413c1e0e..fccd9627 100644 --- a/examples/resources/konnect_event_gateway_cluster_policy_acls/resource.tf +++ b/examples/resources/konnect_event_gateway_cluster_policy_acls/resource.tf @@ -10,11 +10,9 @@ resource "konnect_event_gateway_cluster_policy_acls" "my_eventgatewayclusterpoli name = "describe_configs" } ] - resource_names = [ - { - match = "...my_match..." - } - ] + resource_names = { + str = "context.auth.tokens.claims[\"topics\"]" + } resource_type = "transactional_id" } ] diff --git a/examples/resources/konnect_event_gateway_consume_policy_schema_validation/resource.tf b/examples/resources/konnect_event_gateway_consume_policy_schema_validation/resource.tf index 58d6da55..cd23b1de 100644 --- a/examples/resources/konnect_event_gateway_consume_policy_schema_validation/resource.tf +++ b/examples/resources/konnect_event_gateway_consume_policy_schema_validation/resource.tf @@ -4,9 +4,7 @@ resource "konnect_event_gateway_consume_policy_schema_validation" "my_eventgatew config = { key_validation_action = "mark" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "e1881384-290f-443c-a5bd-ed6f2e53d539" } type = "json" value_validation_action = "mark" diff --git a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import-by-string-id.tf b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import-by-string-id.tf index 5c68271e..d291888b 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import-by-string-id.tf +++ b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import-by-string-id.tf @@ -2,8 +2,8 @@ import { provider = konnect-beta to = konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect-beta_event_gateway_listener_policy_forward_to_virtual_cluster id = jsonencode({ - event_gateway_listener_id = "..." gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + listener_id = "..." }) } diff --git a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import.sh b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import.sh index 9bc044f9..19013aca 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import.sh +++ b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/import.sh @@ -1 +1 @@ -terraform import konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect_event_gateway_listener_policy_forward_to_virtual_cluster '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}' +terraform import konnect_event_gateway_listener_policy_forward_to_virtual_cluster.my_konnect_event_gateway_listener_policy_forward_to_virtual_cluster '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}' diff --git a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/resource.tf b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/resource.tf index 95fec7de..09e233f5 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/resource.tf +++ b/examples/resources/konnect_event_gateway_listener_policy_forward_to_virtual_cluster/resource.tf @@ -9,12 +9,12 @@ resource "konnect_event_gateway_listener_policy_forward_to_virtual_cluster" "my_ sni_suffix = ".example.com" } } - description = "...my_description..." - enabled = false - event_gateway_listener_id = "6feda708-3b1b-4415-b1db-cf2694f34b09" - gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + description = "...my_description..." + enabled = false + gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" labels = { key = "value" } - name = "...my_name..." + listener_id = "bdaf2651-42bc-48ec-b29f-f4890f7f07fc" + name = "...my_name..." } \ No newline at end of file diff --git a/examples/resources/konnect_event_gateway_listener_policy_tls_server/import-by-string-id.tf b/examples/resources/konnect_event_gateway_listener_policy_tls_server/import-by-string-id.tf index fd5d3cd2..f63e69ef 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_tls_server/import-by-string-id.tf +++ b/examples/resources/konnect_event_gateway_listener_policy_tls_server/import-by-string-id.tf @@ -2,8 +2,8 @@ import { provider = konnect-beta to = konnect_event_gateway_listener_policy_tls_server.my_konnect-beta_event_gateway_listener_policy_tls_server id = jsonencode({ - event_gateway_listener_id = "..." gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + listener_id = "..." }) } diff --git a/examples/resources/konnect_event_gateway_listener_policy_tls_server/import.sh b/examples/resources/konnect_event_gateway_listener_policy_tls_server/import.sh index b81742e1..52cc2e24 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_tls_server/import.sh +++ b/examples/resources/konnect_event_gateway_listener_policy_tls_server/import.sh @@ -1 +1 @@ -terraform import konnect_event_gateway_listener_policy_tls_server.my_konnect_event_gateway_listener_policy_tls_server '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}' +terraform import konnect_event_gateway_listener_policy_tls_server.my_konnect_event_gateway_listener_policy_tls_server '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}' diff --git a/examples/resources/konnect_event_gateway_listener_policy_tls_server/resource.tf b/examples/resources/konnect_event_gateway_listener_policy_tls_server/resource.tf index 83fee5c6..0fe3ef9a 100644 --- a/examples/resources/konnect_event_gateway_listener_policy_tls_server/resource.tf +++ b/examples/resources/konnect_event_gateway_listener_policy_tls_server/resource.tf @@ -13,12 +13,12 @@ resource "konnect_event_gateway_listener_policy_tls_server" "my_eventgatewaylist min = "TLSv1.3" } } - description = "...my_description..." - enabled = true - event_gateway_listener_id = "34102bf1-bf41-4c00-a62f-6fca747cb8f8" - gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" + description = "...my_description..." + enabled = true + gateway_id = "9524ec7d-36d9-465d-a8c5-83a3c9390458" labels = { key = "value" } - name = "...my_name..." + listener_id = "f7d7b9be-5608-44c3-8f6a-46e055797c31" + name = "...my_name..." } \ No newline at end of file diff --git a/examples/resources/konnect_event_gateway_produce_policy_encrypt/resource.tf b/examples/resources/konnect_event_gateway_produce_policy_encrypt/resource.tf index 215ae961..2eddea33 100644 --- a/examples/resources/konnect_event_gateway_produce_policy_encrypt/resource.tf +++ b/examples/resources/konnect_event_gateway_produce_policy_encrypt/resource.tf @@ -5,9 +5,7 @@ resource "konnect_event_gateway_produce_policy_encrypt" "my_eventgatewayproducep encryption_key = { static = { key = { - reference_by_id = { - id = "9d9dcdc8-beb0-45dc-8f7e-521cf4b6c0c7" - } + id = "6e8740c2-fb76-4269-aeef-660d701c6ea1" } } } diff --git a/examples/resources/konnect_event_gateway_produce_policy_schema_validation/resource.tf b/examples/resources/konnect_event_gateway_produce_policy_schema_validation/resource.tf index fc91f4b9..811f1cf8 100644 --- a/examples/resources/konnect_event_gateway_produce_policy_schema_validation/resource.tf +++ b/examples/resources/konnect_event_gateway_produce_policy_schema_validation/resource.tf @@ -5,18 +5,14 @@ resource "konnect_event_gateway_produce_policy_schema_validation" "my_eventgatew confluent_schema_registry = { key_validation_action = "reject" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "95ce4f52-159c-43dd-a6dd-9bb6e8e07446" } value_validation_action = "reject" } json = { key_validation_action = "mark" schema_registry = { - schema_registry_reference_by_name = { - name = "...my_name..." - } + id = "74577697-03b2-4d40-bfe2-929c891c4254" } value_validation_action = "reject" } diff --git a/go.mod b/go.mod index b0bf1011..56c5c60d 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/kong/terraform-provider-konnect-beta go 1.24.1 -toolchain go1.24.3 - require ( github.com/Kong/shared-speakeasy/customtypes v0.2.5 github.com/Kong/shared-speakeasy/hclbuilder v0.0.1 diff --git a/internal/provider/authserverclients_resource.go b/internal/provider/authserverclients_resource.go index 7855838d..47f6edfe 100644 --- a/internal/provider/authserverclients_resource.go +++ b/internal/provider/authserverclients_resource.go @@ -55,6 +55,7 @@ type AuthServerClientsResourceModel struct { LoginURI types.String `tfsdk:"login_uri"` Name types.String `tfsdk:"name"` RedirectUris []types.String `tfsdk:"redirect_uris"` + RefreshTokenDuration types.Int64 `tfsdk:"refresh_token_duration"` ResponseTypes []types.String `tfsdk:"response_types"` TokenEndpointAuthMethod types.String `tfsdk:"token_endpoint_auth_method"` UpdatedAt types.String `tfsdk:"updated_at"` @@ -163,6 +164,15 @@ func (r *AuthServerClientsResource) Schema(ctx context.Context, req resource.Sch ElementType: types.StringType, Description: `The URIs that the client is allowed to redirect to after authentication in interactive flows. All redirect URIs must be absolute URIs, be secure (HTTPS), and must not include a fragment component.`, }, + "refresh_token_duration": schema.Int64Attribute{ + Computed: true, + Optional: true, + Default: int64default.StaticInt64(2592000), + Description: `The duration of the minted refresh token is valid for, in seconds. Default: 2592000`, + Validators: []validator.Int64{ + int64validator.Between(60, 157680000), + }, + }, "response_types": schema.ListAttribute{ Required: true, ElementType: types.StringType, diff --git a/internal/provider/authserverclients_resource_sdk.go b/internal/provider/authserverclients_resource_sdk.go index 9ab8cc09..8545a9ae 100644 --- a/internal/provider/authserverclients_resource_sdk.go +++ b/internal/provider/authserverclients_resource_sdk.go @@ -40,6 +40,7 @@ func (r *AuthServerClientsResourceModel) RefreshFromSharedClient(ctx context.Con for _, v := range resp.RedirectUris { r.RedirectUris = append(r.RedirectUris, types.StringValue(v)) } + r.RefreshTokenDuration = types.Int64PointerValue(resp.RefreshTokenDuration) r.ResponseTypes = make([]types.String, 0, len(resp.ResponseTypes)) for _, v := range resp.ResponseTypes { r.ResponseTypes = append(r.ResponseTypes, types.StringValue(string(v))) @@ -85,6 +86,7 @@ func (r *AuthServerClientsResourceModel) RefreshFromSharedCreatedClient(ctx cont for _, v := range resp.RedirectUris { r.RedirectUris = append(r.RedirectUris, types.StringValue(v)) } + r.RefreshTokenDuration = types.Int64PointerValue(resp.RefreshTokenDuration) r.ResponseTypes = make([]types.String, 0, len(resp.ResponseTypes)) for _, v := range resp.ResponseTypes { r.ResponseTypes = append(r.ResponseTypes, types.StringValue(string(v))) @@ -216,6 +218,12 @@ func (r *AuthServerClientsResourceModel) ToSharedCreateClient(ctx context.Contex } else { idTokenDuration = nil } + refreshTokenDuration := new(int64) + if !r.RefreshTokenDuration.IsUnknown() && !r.RefreshTokenDuration.IsNull() { + *refreshTokenDuration = r.RefreshTokenDuration.ValueInt64() + } else { + refreshTokenDuration = nil + } allowAllScopes := new(bool) if !r.AllowAllScopes.IsUnknown() && !r.AllowAllScopes.IsNull() { *allowAllScopes = r.AllowAllScopes.ValueBool() @@ -262,6 +270,7 @@ func (r *AuthServerClientsResourceModel) ToSharedCreateClient(ctx context.Contex LoginURI: loginURI, AccessTokenDuration: accessTokenDuration, IDTokenDuration: idTokenDuration, + RefreshTokenDuration: refreshTokenDuration, AllowAllScopes: allowAllScopes, AllowScopes: allowScopes, Labels: labels, @@ -312,6 +321,12 @@ func (r *AuthServerClientsResourceModel) ToSharedReplaceClient(ctx context.Conte } else { idTokenDuration = nil } + refreshTokenDuration := new(int64) + if !r.RefreshTokenDuration.IsUnknown() && !r.RefreshTokenDuration.IsNull() { + *refreshTokenDuration = r.RefreshTokenDuration.ValueInt64() + } else { + refreshTokenDuration = nil + } allowAllScopes := new(bool) if !r.AllowAllScopes.IsUnknown() && !r.AllowAllScopes.IsNull() { *allowAllScopes = r.AllowAllScopes.ValueBool() @@ -347,6 +362,7 @@ func (r *AuthServerClientsResourceModel) ToSharedReplaceClient(ctx context.Conte LoginURI: loginURI, AccessTokenDuration: accessTokenDuration, IDTokenDuration: idTokenDuration, + RefreshTokenDuration: refreshTokenDuration, AllowAllScopes: allowAllScopes, AllowScopes: allowScopes, TokenEndpointAuthMethod: tokenEndpointAuthMethod, diff --git a/internal/provider/cloudgatewayaddon_resource.go b/internal/provider/cloudgatewayaddon_resource.go new file mode 100644 index 00000000..a490a2a8 --- /dev/null +++ b/internal/provider/cloudgatewayaddon_resource.go @@ -0,0 +1,627 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package provider + +import ( + "context" + "fmt" + "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/attr" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectdefault" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + speakeasy_int64planmodifier "github.com/kong/terraform-provider-konnect-beta/internal/planmodifiers/int64planmodifier" + speakeasy_objectplanmodifier "github.com/kong/terraform-provider-konnect-beta/internal/planmodifiers/objectplanmodifier" + speakeasy_stringplanmodifier "github.com/kong/terraform-provider-konnect-beta/internal/planmodifiers/stringplanmodifier" + tfTypes "github.com/kong/terraform-provider-konnect-beta/internal/provider/types" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk" + speakeasy_stringvalidators "github.com/kong/terraform-provider-konnect-beta/internal/validators/stringvalidators" +) + +// Ensure provider defined types fully satisfy framework interfaces. +var _ resource.Resource = &CloudGatewayAddOnResource{} +var _ resource.ResourceWithImportState = &CloudGatewayAddOnResource{} + +func NewCloudGatewayAddOnResource() resource.Resource { + return &CloudGatewayAddOnResource{} +} + +// CloudGatewayAddOnResource defines the resource implementation. +type CloudGatewayAddOnResource struct { + // Provider configured SDK client. + client *sdk.KonnectBeta +} + +// CloudGatewayAddOnResourceModel describes the resource data model. +type CloudGatewayAddOnResourceModel struct { + Config tfTypes.CreateAddOnConfig `tfsdk:"config"` + CreatedAt types.String `tfsdk:"created_at"` + EntityVersion types.Int64 `tfsdk:"entity_version"` + ID types.String `tfsdk:"id"` + Name types.String `tfsdk:"name"` + Owner tfTypes.AddOnOwner `tfsdk:"owner"` + State types.String `tfsdk:"state"` + UpdatedAt types.String `tfsdk:"updated_at"` +} + +func (r *CloudGatewayAddOnResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = "konnect_cloud_gateway_add_on" +} + +func (r *CloudGatewayAddOnResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + MarkdownDescription: "CloudGatewayAddOn Resource", + Attributes: map[string]schema.Attribute{ + "config": schema.SingleNestedAttribute{ + Required: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, + Attributes: map[string]schema.Attribute{ + "managed_cache": schema.SingleNestedAttribute{ + Optional: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + }, + Attributes: map[string]schema.Attribute{ + "capacity_config": schema.SingleNestedAttribute{ + Required: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + }, + Attributes: map[string]schema.Attribute{ + "tiered": schema.SingleNestedAttribute{ + Optional: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + }, + Attributes: map[string]schema.Attribute{ + "tier": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + MarkdownDescription: `Capacity tier that determines both cache size and performance characteristics:` + "\n" + + `- micro: ~0.5 GiB capacity` + "\n" + + `- small: ~1 GiB capacity` + "\n" + + `- medium: ~3 GiB capacity` + "\n" + + `- large: ~6 GiB capacity` + "\n" + + `- xlarge: ~12 GiB capacity` + "\n" + + `- 2xlarge: ~25 GiB capacity` + "\n" + + `- 4xlarge: ~52 GiB capacity` + "\n" + + `must be one of ["micro", "small", "medium", "large", "xlarge", "2xlarge", "4xlarge"]; Requires replacement if changed.`, + Validators: []validator.String{ + stringvalidator.OneOf( + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge", + "4xlarge", + ), + }, + }, + }, + Description: `Capacity tiers with pre-configured size and performance characteristics. Requires replacement if changed.`, + }, + }, + Description: `Configuration for managed cache capacity and performance characteristics. Requires replacement if changed.`, + }, + }, + Description: `Configuration for creating a managed cache add-on. Requires replacement if changed.`, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("managed_cache_add_on_config_response"), + }...), + }, + }, + "managed_cache_add_on_config_response": schema.SingleNestedAttribute{ + Computed: true, + Attributes: map[string]schema.Attribute{ + "capacity_config": schema.SingleNestedAttribute{ + Computed: true, + Attributes: map[string]schema.Attribute{ + "tiered": schema.SingleNestedAttribute{ + Computed: true, + Attributes: map[string]schema.Attribute{ + "tier": schema.StringAttribute{ + Computed: true, + MarkdownDescription: `Capacity tier that determines both cache size and performance characteristics:` + "\n" + + `- micro: ~0.5 GiB capacity` + "\n" + + `- small: ~1 GiB capacity` + "\n" + + `- medium: ~3 GiB capacity` + "\n" + + `- large: ~6 GiB capacity` + "\n" + + `- xlarge: ~12 GiB capacity` + "\n" + + `- 2xlarge: ~25 GiB capacity` + "\n" + + `- 4xlarge: ~52 GiB capacity`, + }, + }, + Description: `Capacity tiers with pre-configured size and performance characteristics.`, + }, + }, + Description: `Configuration for managed cache capacity and performance characteristics.`, + }, + "data_plane_groups": schema.ListNestedAttribute{ + Computed: true, + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "cloud_gateway_network_id": schema.StringAttribute{ + Computed: true, + Description: `Network ID this data-plane group is attached to.`, + }, + "id": schema.StringAttribute{ + Computed: true, + Description: `ID of the data-plane group.`, + }, + "provider": schema.StringAttribute{ + Computed: true, + Description: `Name of cloud provider.`, + }, + "region": schema.StringAttribute{ + Computed: true, + Description: `Region of cloud provider the data-plane group is deployed to.`, + }, + "state": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + MarkdownDescription: `The current state of the managed cache add-on in the data-plane group. Possible values:` + "\n" + + `- ` + "`" + `initializing` + "`" + ` - The add-on is in the process of being initialized/updated and is setting up necessary resources for this data-plane group.` + "\n" + + `- ` + "`" + `ready` + "`" + ` - The add-on is fully operational for this data-plane group.` + "\n" + + `- ` + "`" + `error` + "`" + ` - The add-on is in an error state, and is not operational for this data-plane group.` + "\n" + + `- ` + "`" + `terminating` + "`" + ` - The add-on is in the process of being deleted for this data-plane group.`, + }, + "state_metadata": schema.SingleNestedAttribute{ + Computed: true, + Attributes: map[string]schema.Attribute{ + "error_reason": schema.StringAttribute{ + Computed: true, + Description: `Reason why the managed cache add-on may be in an error state, reported from backing infrastructure.`, + }, + }, + Description: `Metadata describing the state of the managed cache add-on in the data-plane group.`, + }, + }, + }, + Description: `List of data-plane groups where the managed cache is deployed.`, + }, + "state_metadata": schema.SingleNestedAttribute{ + Computed: true, + Attributes: map[string]schema.Attribute{ + "cache_config_id": schema.StringAttribute{ + Computed: true, + Description: `Reference to cache configuration for this add-on.`, + }, + "cache_host": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to cache hostname.`, + }, + "cache_port": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to cache port.`, + }, + "cache_server_name": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to cache server name.`, + }, + "cache_username": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to cache username.`, + }, + "cloud_authentication": schema.SingleNestedAttribute{ + Computed: true, + Default: objectdefault.StaticValue(types.ObjectNull(map[string]attr.Type{ + "auth_provider": types.StringType, + "aws_assume_role_arn": types.StringType, + "aws_cache_name": types.StringType, + "aws_region": types.StringType, + "azure_tenant_id": types.StringType, + })), + Attributes: map[string]schema.Attribute{ + "auth_provider": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to cache auth provider.`, + }, + "aws_assume_role_arn": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to aws assume role arn.`, + }, + "aws_cache_name": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to aws cache name.`, + }, + "aws_region": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to aws region.`, + }, + "azure_tenant_id": schema.StringAttribute{ + Computed: true, + Description: `Env vault path to azure tenant id.`, + }, + }, + Description: `Metadata describing the cloud authentication details for managed cache add-on.`, + }, + }, + Description: `Metadata describing the state of the managed cache add-on.`, + }, + }, + Description: `Configuration for managed cache add-on.`, + }, + }, + Description: `Configuration for creating different types of add-ons. Requires replacement if changed.`, + }, + "created_at": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + Description: `RFC-3339 timestamp representation of add-on creation date.`, + }, + "entity_version": schema.Int64Attribute{ + Computed: true, + PlanModifiers: []planmodifier.Int64{ + speakeasy_int64planmodifier.SuppressDiff(speakeasy_int64planmodifier.ExplicitSuppress), + }, + Description: `Monotonically-increasing version count of the add-on, to indicate the order of updates to the add-on.`, + }, + "id": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + }, + "name": schema.StringAttribute{ + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + Description: `Unique human-readable name of the add-on. Requires replacement if changed.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthBetween(1, 70), + }, + }, + "owner": schema.SingleNestedAttribute{ + Required: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, + Attributes: map[string]schema.Attribute{ + "control_plane": schema.SingleNestedAttribute{ + Optional: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + }, + Attributes: map[string]schema.Attribute{ + "control_plane_geo": schema.StringAttribute{ + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Description: `Set of control-plane geos supported for deploying cloud-gateways configurations. Not Null; must be one of ["us", "eu", "au", "me", "in", "sg"]; Requires replacement if changed.`, + Validators: []validator.String{ + speakeasy_stringvalidators.NotNull(), + stringvalidator.OneOf( + "us", + "eu", + "au", + "me", + "in", + "sg", + ), + }, + }, + "control_plane_id": schema.StringAttribute{ + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Description: `ID of the control-plane that owns this add-on. Not Null; Requires replacement if changed.`, + Validators: []validator.String{ + speakeasy_stringvalidators.NotNull(), + }, + }, + }, + Description: `Control Plane is the owner for the add-on. Requires replacement if changed.`, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("control_plane_group"), + }...), + }, + }, + "control_plane_group": schema.SingleNestedAttribute{ + Optional: true, + PlanModifiers: []planmodifier.Object{ + objectplanmodifier.RequiresReplaceIfConfigured(), + }, + Attributes: map[string]schema.Attribute{ + "control_plane_group_geo": schema.StringAttribute{ + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Description: `Set of control-plane geos supported for deploying cloud-gateways configurations. Not Null; must be one of ["us", "eu", "au", "me", "in", "sg"]; Requires replacement if changed.`, + Validators: []validator.String{ + speakeasy_stringvalidators.NotNull(), + stringvalidator.OneOf( + "us", + "eu", + "au", + "me", + "in", + "sg", + ), + }, + }, + "control_plane_group_id": schema.StringAttribute{ + Computed: true, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Description: `ID of the control-plane group that owns this add-on. Not Null; Requires replacement if changed.`, + Validators: []validator.String{ + speakeasy_stringvalidators.NotNull(), + }, + }, + }, + Description: `Control Plane Group is the owner for the add-on. Requires replacement if changed.`, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("control_plane"), + }...), + }, + }, + }, + Description: `Owner for the add-on. Requires replacement if changed.`, + }, + "state": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + MarkdownDescription: `The current state of the add-on. Possible values:` + "\n" + + `- ` + "`" + `initializing` + "`" + ` - The add-on is in the process of being initialized/updated.` + "\n" + + `- ` + "`" + `ready` + "`" + ` - The add-on is fully operational.` + "\n" + + `- ` + "`" + `terminating` + "`" + ` - The add-on is in the process of being deleted.`, + }, + "updated_at": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + Description: `RFC-3339 timestamp representation of add-on update date.`, + }, + }, + } +} + +func (r *CloudGatewayAddOnResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + // Prevent panic if the provider has not been configured. + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*sdk.KonnectBeta) + + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected *sdk.KonnectBeta, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + + return + } + + r.client = client +} + +func (r *CloudGatewayAddOnResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *CloudGatewayAddOnResourceModel + var plan types.Object + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(plan.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + request, requestDiags := data.ToSharedCreateAddOnRequest(ctx) + resp.Diagnostics.Append(requestDiags...) + + if resp.Diagnostics.HasError() { + return + } + res, err := r.client.CloudGateways.CreateAddOn(ctx, *request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if res.StatusCode == 409 { + resp.Diagnostics.AddError( + "Resource Already Exists", + "When creating this resource, the API indicated that this resource already exists. You can bring the existing resource under management using Terraform import functionality or retry with a unique configuration.", + ) + return + } + if res.StatusCode != 201 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + if !(res.AddOnResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) + return + } + resp.Diagnostics.Append(data.RefreshFromSharedAddOnResponse(ctx, res.AddOnResponse)...) + + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(refreshPlan(ctx, plan, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *CloudGatewayAddOnResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *CloudGatewayAddOnResourceModel + var item types.Object + + resp.Diagnostics.Append(req.State.Get(ctx, &item)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + request, requestDiags := data.ToOperationsGetAddOnRequest(ctx) + resp.Diagnostics.Append(requestDiags...) + + if resp.Diagnostics.HasError() { + return + } + res, err := r.client.CloudGateways.GetAddOn(ctx, *request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if res.StatusCode == 404 { + resp.State.RemoveResource(ctx) + return + } + if res.StatusCode != 200 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + if !(res.AddOnResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) + return + } + resp.Diagnostics.Append(data.RefreshFromSharedAddOnResponse(ctx, res.AddOnResponse)...) + + if resp.Diagnostics.HasError() { + return + } + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *CloudGatewayAddOnResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *CloudGatewayAddOnResourceModel + var plan types.Object + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + merge(ctx, req, resp, &data) + if resp.Diagnostics.HasError() { + return + } + + // Not Implemented; all attributes marked as RequiresReplace + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *CloudGatewayAddOnResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *CloudGatewayAddOnResourceModel + var item types.Object + + resp.Diagnostics.Append(req.State.Get(ctx, &item)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + request, requestDiags := data.ToOperationsDeleteAddOnRequest(ctx) + resp.Diagnostics.Append(requestDiags...) + + if resp.Diagnostics.HasError() { + return + } + res, err := r.client.CloudGateways.DeleteAddOn(ctx, *request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + switch res.StatusCode { + case 204, 404: + break + default: + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + +} + +func (r *CloudGatewayAddOnResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("id"), req.ID)...) +} diff --git a/internal/provider/cloudgatewayaddon_resource_sdk.go b/internal/provider/cloudgatewayaddon_resource_sdk.go new file mode 100644 index 00000000..a28dac8d --- /dev/null +++ b/internal/provider/cloudgatewayaddon_resource_sdk.go @@ -0,0 +1,173 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package provider + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/kong/terraform-provider-konnect-beta/internal/provider/typeconvert" + tfTypes "github.com/kong/terraform-provider-konnect-beta/internal/provider/types" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/operations" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/shared" +) + +func (r *CloudGatewayAddOnResourceModel) RefreshFromSharedAddOnResponse(ctx context.Context, resp *shared.AddOnResponse) diag.Diagnostics { + var diags diag.Diagnostics + + if resp != nil { + if resp.Config.ManagedCacheAddOnConfigResponse != nil { + r.Config.ManagedCacheAddOnConfigResponse = &tfTypes.ManagedCacheAddOnConfigResponse{} + if resp.Config.ManagedCacheAddOnConfigResponse.CapacityConfig.Tiered != nil { + r.Config.ManagedCacheAddOnConfigResponse.CapacityConfig.Tiered = &tfTypes.Tiered{} + r.Config.ManagedCacheAddOnConfigResponse.CapacityConfig.Tiered.Tier = types.StringValue(string(resp.Config.ManagedCacheAddOnConfigResponse.CapacityConfig.Tiered.Tier)) + } + r.Config.ManagedCacheAddOnConfigResponse.DataPlaneGroups = []tfTypes.ManagedCacheAddOnDataPlaneGroup{} + + for _, dataPlaneGroupsItem := range resp.Config.ManagedCacheAddOnConfigResponse.DataPlaneGroups { + var dataPlaneGroups tfTypes.ManagedCacheAddOnDataPlaneGroup + + dataPlaneGroups.CloudGatewayNetworkID = types.StringValue(dataPlaneGroupsItem.CloudGatewayNetworkID) + dataPlaneGroups.ID = types.StringValue(dataPlaneGroupsItem.ID) + dataPlaneGroups.Provider = types.StringValue(string(dataPlaneGroupsItem.Provider)) + dataPlaneGroups.Region = types.StringValue(dataPlaneGroupsItem.Region) + dataPlaneGroups.State = types.StringValue(string(dataPlaneGroupsItem.State)) + dataPlaneGroups.StateMetadata.ErrorReason = types.StringPointerValue(dataPlaneGroupsItem.StateMetadata.ErrorReason) + + r.Config.ManagedCacheAddOnConfigResponse.DataPlaneGroups = append(r.Config.ManagedCacheAddOnConfigResponse.DataPlaneGroups, dataPlaneGroups) + } + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheConfigID = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheConfigID) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheHost = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheHost) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CachePort = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CachePort) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheServerName = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheServerName) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheUsername = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CacheUsername) + if resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication == nil { + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication = nil + } else { + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication = &tfTypes.CloudAuthentication{} + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AuthProvider = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AuthProvider) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsAssumeRoleArn = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsAssumeRoleArn) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsCacheName = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsCacheName) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsRegion = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AwsRegion) + r.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AzureTenantID = types.StringPointerValue(resp.Config.ManagedCacheAddOnConfigResponse.StateMetadata.CloudAuthentication.AzureTenantID) + } + } + r.CreatedAt = types.StringValue(typeconvert.TimeToString(resp.CreatedAt)) + r.EntityVersion = types.Int64Value(resp.EntityVersion) + r.ID = types.StringValue(resp.ID) + r.Name = types.StringValue(resp.Name) + if resp.Owner.ControlPlane != nil { + r.Owner.ControlPlane = &tfTypes.ControlPlane{} + r.Owner.ControlPlane.ControlPlaneGeo = types.StringValue(string(resp.Owner.ControlPlane.ControlPlaneGeo)) + r.Owner.ControlPlane.ControlPlaneID = types.StringValue(resp.Owner.ControlPlane.ControlPlaneID) + } + if resp.Owner.ControlPlaneGroup != nil { + r.Owner.ControlPlaneGroup = &tfTypes.ControlPlaneGroup{} + r.Owner.ControlPlaneGroup.ControlPlaneGroupGeo = types.StringValue(string(resp.Owner.ControlPlaneGroup.ControlPlaneGroupGeo)) + r.Owner.ControlPlaneGroup.ControlPlaneGroupID = types.StringValue(resp.Owner.ControlPlaneGroup.ControlPlaneGroupID) + } + r.State = types.StringValue(string(resp.State)) + r.UpdatedAt = types.StringValue(typeconvert.TimeToString(resp.UpdatedAt)) + } + + return diags +} + +func (r *CloudGatewayAddOnResourceModel) ToOperationsDeleteAddOnRequest(ctx context.Context) (*operations.DeleteAddOnRequest, diag.Diagnostics) { + var diags diag.Diagnostics + + var addOnID string + addOnID = r.ID.ValueString() + + out := operations.DeleteAddOnRequest{ + AddOnID: addOnID, + } + + return &out, diags +} + +func (r *CloudGatewayAddOnResourceModel) ToOperationsGetAddOnRequest(ctx context.Context) (*operations.GetAddOnRequest, diag.Diagnostics) { + var diags diag.Diagnostics + + var addOnID string + addOnID = r.ID.ValueString() + + out := operations.GetAddOnRequest{ + AddOnID: addOnID, + } + + return &out, diags +} + +func (r *CloudGatewayAddOnResourceModel) ToSharedCreateAddOnRequest(ctx context.Context) (*shared.CreateAddOnRequest, diag.Diagnostics) { + var diags diag.Diagnostics + + var name string + name = r.Name.ValueString() + + var owner shared.AddOnOwner + var controlPlane *shared.ControlPlane + if r.Owner.ControlPlane != nil { + var controlPlaneID string + controlPlaneID = r.Owner.ControlPlane.ControlPlaneID.ValueString() + + controlPlaneGeo := shared.ControlPlaneGeo(r.Owner.ControlPlane.ControlPlaneGeo.ValueString()) + controlPlane = &shared.ControlPlane{ + ControlPlaneID: controlPlaneID, + ControlPlaneGeo: controlPlaneGeo, + } + } + if controlPlane != nil { + owner = shared.AddOnOwner{ + ControlPlane: controlPlane, + } + } + var controlPlaneGroup *shared.ControlPlaneGroup + if r.Owner.ControlPlaneGroup != nil { + var controlPlaneGroupID string + controlPlaneGroupID = r.Owner.ControlPlaneGroup.ControlPlaneGroupID.ValueString() + + controlPlaneGroupGeo := shared.ControlPlaneGeo(r.Owner.ControlPlaneGroup.ControlPlaneGroupGeo.ValueString()) + controlPlaneGroup = &shared.ControlPlaneGroup{ + ControlPlaneGroupID: controlPlaneGroupID, + ControlPlaneGroupGeo: controlPlaneGroupGeo, + } + } + if controlPlaneGroup != nil { + owner = shared.AddOnOwner{ + ControlPlaneGroup: controlPlaneGroup, + } + } + var config shared.CreateAddOnConfig + var managedCache *shared.ManagedCache + if r.Config.ManagedCache != nil { + var capacityConfig shared.ManagedCacheCapacityConfig + var tiered *shared.Tiered + if r.Config.ManagedCache.CapacityConfig.Tiered != nil { + tier := shared.Tier(r.Config.ManagedCache.CapacityConfig.Tiered.Tier.ValueString()) + tiered = &shared.Tiered{ + Tier: tier, + } + } + if tiered != nil { + capacityConfig = shared.ManagedCacheCapacityConfig{ + Tiered: tiered, + } + } + managedCache = &shared.ManagedCache{ + CapacityConfig: capacityConfig, + } + } + if managedCache != nil { + config = shared.CreateAddOnConfig{ + ManagedCache: managedCache, + } + } + out := shared.CreateAddOnRequest{ + Name: name, + Owner: owner, + Config: config, + } + + return &out, diags +} diff --git a/internal/provider/eventgatewaybackendcluster_resource.go b/internal/provider/eventgatewaybackendcluster_resource.go index 907d0666..2fd538aa 100644 --- a/internal/provider/eventgatewaybackendcluster_resource.go +++ b/internal/provider/eventgatewaybackendcluster_resource.go @@ -183,7 +183,7 @@ func (r *EventGatewayBackendClusterResource) Schema(ctx context.Context, req res Computed: true, Optional: true, Default: stringdefault.StaticString(``), - Description: `A human-readable description of the virtual cluster. Default: ""`, + Description: `A human-readable description of the backend cluster. Default: ""`, Validators: []validator.String{ stringvalidator.UTF8LengthAtMost(512), }, diff --git a/internal/provider/eventgatewayclusterpolicyacls_resource.go b/internal/provider/eventgatewayclusterpolicyacls_resource.go index a3ff7b73..294bd250 100644 --- a/internal/provider/eventgatewayclusterpolicyacls_resource.go +++ b/internal/provider/eventgatewayclusterpolicyacls_resource.go @@ -113,18 +113,37 @@ func (r *EventGatewayClusterPolicyAclsResource) Schema(ctx context.Context, req }, Description: `Types of Kafka operations to match against. Note that not every operation can apply to every resource type.`, }, - "resource_names": schema.ListNestedAttribute{ + "resource_names": schema.SingleNestedAttribute{ Required: true, - NestedObject: schema.NestedAttributeObject{ - Attributes: map[string]schema.Attribute{ - "match": schema.StringAttribute{ - Required: true, - MarkdownDescription: `Currently supported are exact matches and globs.` + "\n" + - `All ` + "`" + `*` + "`" + ` characters are interpreted as globs, i.e. they match zero or more of any character.`, + Attributes: map[string]schema.Attribute{ + "array_of_event_gateway_acl_resource_name": schema.ListNestedAttribute{ + Optional: true, + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "match": schema.StringAttribute{ + Required: true, + MarkdownDescription: `Currently supported are exact matches and globs.` + "\n" + + `All ` + "`" + `*` + "`" + ` characters are interpreted as globs, i.e. they match zero or more of any character.`, + }, + }, + }, + Validators: []validator.List{ + listvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("str"), + }...), + listvalidator.SizeAtMost(50), + }, + }, + "str": schema.StringAttribute{ + Optional: true, + Validators: []validator.String{ + stringvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("array_of_event_gateway_acl_resource_name"), + }...), }, }, }, - Description: `If any of these entries match, the resource name matches for this rule.`, + Description: `If any of these entries match, the resource name matches for this rule. A maximum of 50 entries are allowed.`, }, "resource_type": schema.StringAttribute{ Required: true, @@ -187,6 +206,7 @@ func (r *EventGatewayClusterPolicyAclsResource) Schema(ctx context.Context, req `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayclusterpolicyacls_resource_sdk.go b/internal/provider/eventgatewayclusterpolicyacls_resource_sdk.go index 566702a4..747536a6 100644 --- a/internal/provider/eventgatewayclusterpolicyacls_resource_sdk.go +++ b/internal/provider/eventgatewayclusterpolicyacls_resource_sdk.go @@ -176,14 +176,34 @@ func (r *EventGatewayClusterPolicyAclsResourceModel) ToSharedEventGatewayACLsPol Name: name1, }) } - resourceNames := make([]shared.EventGatewayACLResourceName, 0, len(r.Config.Rules[rulesIndex].ResourceNames)) - for resourceNamesIndex := range r.Config.Rules[rulesIndex].ResourceNames { - var match string - match = r.Config.Rules[rulesIndex].ResourceNames[resourceNamesIndex].Match.ValueString() - - resourceNames = append(resourceNames, shared.EventGatewayACLResourceName{ - Match: match, - }) + var resourceNames shared.ResourceNames + var arrayOfEventGatewayACLResourceName []shared.EventGatewayACLResourceName + if r.Config.Rules[rulesIndex].ResourceNames.ArrayOfEventGatewayACLResourceName != nil { + arrayOfEventGatewayACLResourceName = make([]shared.EventGatewayACLResourceName, 0, len(r.Config.Rules[rulesIndex].ResourceNames.ArrayOfEventGatewayACLResourceName)) + for arrayOfEventGatewayACLResourceNameIndex := range r.Config.Rules[rulesIndex].ResourceNames.ArrayOfEventGatewayACLResourceName { + var match string + match = r.Config.Rules[rulesIndex].ResourceNames.ArrayOfEventGatewayACLResourceName[arrayOfEventGatewayACLResourceNameIndex].Match.ValueString() + + arrayOfEventGatewayACLResourceName = append(arrayOfEventGatewayACLResourceName, shared.EventGatewayACLResourceName{ + Match: match, + }) + } + } + if arrayOfEventGatewayACLResourceName != nil { + resourceNames = shared.ResourceNames{ + ArrayOfEventGatewayACLResourceName: arrayOfEventGatewayACLResourceName, + } + } + str := new(string) + if !r.Config.Rules[rulesIndex].ResourceNames.Str.IsUnknown() && !r.Config.Rules[rulesIndex].ResourceNames.Str.IsNull() { + *str = r.Config.Rules[rulesIndex].ResourceNames.Str.ValueString() + } else { + str = nil + } + if str != nil { + resourceNames = shared.ResourceNames{ + Str: str, + } } rules = append(rules, shared.EventGatewayACLRule{ ResourceType: resourceType, diff --git a/internal/provider/eventgatewayconsumepolicydecrypt_resource.go b/internal/provider/eventgatewayconsumepolicydecrypt_resource.go index b11e7501..58e63408 100644 --- a/internal/provider/eventgatewayconsumepolicydecrypt_resource.go +++ b/internal/provider/eventgatewayconsumepolicydecrypt_resource.go @@ -169,6 +169,7 @@ func (r *EventGatewayConsumePolicyDecryptResource) Schema(ctx context.Context, r `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayconsumepolicymodifyheaders_resource.go b/internal/provider/eventgatewayconsumepolicymodifyheaders_resource.go index de43b022..866bf9f6 100644 --- a/internal/provider/eventgatewayconsumepolicymodifyheaders_resource.go +++ b/internal/provider/eventgatewayconsumepolicymodifyheaders_resource.go @@ -166,6 +166,7 @@ func (r *EventGatewayConsumePolicyModifyHeadersResource) Schema(ctx context.Cont `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayconsumepolicyschemavalidation_resource.go b/internal/provider/eventgatewayconsumepolicyschemavalidation_resource.go index 2a27ea58..5fd82941 100644 --- a/internal/provider/eventgatewayconsumepolicyschemavalidation_resource.go +++ b/internal/provider/eventgatewayconsumepolicyschemavalidation_resource.go @@ -7,7 +7,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -90,43 +89,14 @@ func (r *EventGatewayConsumePolicySchemaValidationResource) Schema(ctx context.C "schema_registry": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ - "schema_registry_reference_by_id": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Required: true, - Description: `The unique identifier of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthAtLeast(1), - }, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_name"), - }...), - }, - }, - "schema_registry_reference_by_name": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - Required: true, - Description: `The unique name of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthBetween(1, 255), - }, - }, - }, - Description: `Reference a schema registry by its unique name.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_id"), - }...), + "id": schema.StringAttribute{ + Required: true, + Description: `The unique identifier of the schema registry.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthAtLeast(1), }, }, }, - Description: `A reference to a schema Registry.`, }, "type": schema.StringAttribute{ Required: true, @@ -197,6 +167,7 @@ func (r *EventGatewayConsumePolicySchemaValidationResource) Schema(ctx context.C `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayconsumepolicyschemavalidation_resource_sdk.go b/internal/provider/eventgatewayconsumepolicyschemavalidation_resource_sdk.go index 10300fbd..3e7532d5 100644 --- a/internal/provider/eventgatewayconsumepolicyschemavalidation_resource_sdk.go +++ b/internal/provider/eventgatewayconsumepolicyschemavalidation_resource_sdk.go @@ -171,33 +171,11 @@ func (r *EventGatewayConsumePolicySchemaValidationResourceModel) ToSharedEventGa typeVar := shared.SchemaValidationType(r.Config.Type.ValueString()) var schemaRegistry *shared.SchemaRegistryReference if r.Config.SchemaRegistry != nil { - var schemaRegistryReferenceByID *shared.SchemaRegistryReferenceByID - if r.Config.SchemaRegistry.SchemaRegistryReferenceByID != nil { - var id string - id = r.Config.SchemaRegistry.SchemaRegistryReferenceByID.ID.ValueString() + var id string + id = r.Config.SchemaRegistry.ID.ValueString() - schemaRegistryReferenceByID = &shared.SchemaRegistryReferenceByID{ - ID: id, - } - } - if schemaRegistryReferenceByID != nil { - schemaRegistry = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByID: schemaRegistryReferenceByID, - } - } - var schemaRegistryReferenceByName *shared.SchemaRegistryReferenceByName - if r.Config.SchemaRegistry.SchemaRegistryReferenceByName != nil { - var name1 string - name1 = r.Config.SchemaRegistry.SchemaRegistryReferenceByName.Name.ValueString() - - schemaRegistryReferenceByName = &shared.SchemaRegistryReferenceByName{ - Name: name1, - } - } - if schemaRegistryReferenceByName != nil { - schemaRegistry = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByName: schemaRegistryReferenceByName, - } + schemaRegistry = &shared.SchemaRegistryReference{ + ID: id, } } keyValidationAction := new(shared.ConsumeKeyValidationAction) diff --git a/internal/provider/eventgatewayconsumepolicyskiprecord_resource.go b/internal/provider/eventgatewayconsumepolicyskiprecord_resource.go index 50106aa9..eca0c0dd 100644 --- a/internal/provider/eventgatewayconsumepolicyskiprecord_resource.go +++ b/internal/provider/eventgatewayconsumepolicyskiprecord_resource.go @@ -117,6 +117,7 @@ func (r *EventGatewayConsumePolicySkipRecordResource) Schema(ctx context.Context `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewaylistener_resource.go b/internal/provider/eventgatewaylistener_resource.go index d6624934..0f81a505 100644 --- a/internal/provider/eventgatewaylistener_resource.go +++ b/internal/provider/eventgatewaylistener_resource.go @@ -82,7 +82,7 @@ func (r *EventGatewayListenerResource) Schema(ctx context.Context, req resource. Computed: true, Optional: true, Default: stringdefault.StaticString(``), - Description: `A human-readable description of the virtual cluster. Default: ""`, + Description: `A human-readable description of the listener. Default: ""`, Validators: []validator.String{ stringvalidator.UTF8LengthAtMost(512), }, diff --git a/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource.go b/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource.go index ecacb10c..564a7905 100644 --- a/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource.go +++ b/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource.go @@ -44,17 +44,17 @@ type EventGatewayListenerPolicyForwardToVirtualClusterResource struct { // EventGatewayListenerPolicyForwardToVirtualClusterResourceModel describes the resource data model. type EventGatewayListenerPolicyForwardToVirtualClusterResourceModel struct { - Config tfTypes.ForwardToVirtualClusterPolicyConfig `tfsdk:"config"` - CreatedAt types.String `tfsdk:"created_at"` - Description types.String `tfsdk:"description"` - Enabled types.Bool `tfsdk:"enabled"` - EventGatewayListenerID types.String `tfsdk:"event_gateway_listener_id"` - GatewayID types.String `tfsdk:"gateway_id"` - ID types.String `tfsdk:"id"` - Labels map[string]types.String `tfsdk:"labels"` - Name types.String `tfsdk:"name"` - ParentPolicyID types.String `tfsdk:"parent_policy_id"` - UpdatedAt types.String `tfsdk:"updated_at"` + Config tfTypes.ForwardToVirtualClusterPolicyConfig `tfsdk:"config"` + CreatedAt types.String `tfsdk:"created_at"` + Description types.String `tfsdk:"description"` + Enabled types.Bool `tfsdk:"enabled"` + GatewayID types.String `tfsdk:"gateway_id"` + ID types.String `tfsdk:"id"` + Labels map[string]types.String `tfsdk:"labels"` + ListenerID types.String `tfsdk:"listener_id"` + Name types.String `tfsdk:"name"` + ParentPolicyID types.String `tfsdk:"parent_policy_id"` + UpdatedAt types.String `tfsdk:"updated_at"` } func (r *EventGatewayListenerPolicyForwardToVirtualClusterResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -100,44 +100,15 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResource) Schema(ctx c "destination": schema.SingleNestedAttribute{ Required: true, Attributes: map[string]schema.Attribute{ - "virtual_cluster_reference_by_id": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Required: true, - Description: `The unique identifier of the virtual cluster.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthAtLeast(1), - }, - }, - }, - Description: `Reference a virtual cluster by its unique identifier.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("virtual_cluster_reference_by_name"), - }...), - }, - }, - "virtual_cluster_reference_by_name": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - Required: true, - Description: `The name of the virtual cluster.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthBetween(1, 255), - }, - }, - }, - Description: `Reference a virtual cluster by its unique name.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("virtual_cluster_reference_by_id"), - }...), + "id": schema.StringAttribute{ + Required: true, + Description: `The unique identifier of the virtual cluster.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthAtLeast(1), }, }, }, - Description: `A reference to a virtual cluster.`, + Description: `Reference a virtual cluster by its unique identifier.`, }, "min_broker_id": schema.Int64Attribute{ Computed: true, @@ -256,10 +227,6 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResource) Schema(ctx c Default: booldefault.StaticBool(true), Description: `Whether the policy is enabled. Default: true`, }, - "event_gateway_listener_id": schema.StringAttribute{ - Required: true, - Description: `The ID of the Event Gateway Listener.`, - }, "gateway_id": schema.StringAttribute{ Required: true, Description: `The UUID of your Gateway.`, @@ -276,7 +243,12 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResource) Schema(ctx c `` + "\n" + `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, + "listener_id": schema.StringAttribute{ + Required: true, + Description: `The ID of the Event Gateway Listener.`, + }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ @@ -579,26 +551,26 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResource) ImportState( dec := json.NewDecoder(bytes.NewReader([]byte(req.ID))) dec.DisallowUnknownFields() var data struct { - EventGatewayListenerID string `json:"event_gateway_listener_id"` - GatewayID string `json:"gateway_id"` - ID string `json:"id"` + GatewayID string `json:"gateway_id"` + ListenerID string `json:"listener_id"` + ID string `json:"id"` } if err := dec.Decode(&data); err != nil { - resp.Diagnostics.AddError("Invalid ID", `The import ID is not valid. It is expected to be a JSON object string with the format: '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}': `+err.Error()) + resp.Diagnostics.AddError("Invalid ID", `The import ID is not valid. It is expected to be a JSON object string with the format: '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}': `+err.Error()) return } - if len(data.EventGatewayListenerID) == 0 { - resp.Diagnostics.AddError("Missing required field", `The field event_gateway_listener_id is required but was not found in the json encoded ID. It's expected to be a value alike '""`) - return - } - resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("event_gateway_listener_id"), data.EventGatewayListenerID)...) if len(data.GatewayID) == 0 { resp.Diagnostics.AddError("Missing required field", `The field gateway_id is required but was not found in the json encoded ID. It's expected to be a value alike '"9524ec7d-36d9-465d-a8c5-83a3c9390458"`) return } resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("gateway_id"), data.GatewayID)...) + if len(data.ListenerID) == 0 { + resp.Diagnostics.AddError("Missing required field", `The field listener_id is required but was not found in the json encoded ID. It's expected to be a value alike '""`) + return + } + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("listener_id"), data.ListenerID)...) if len(data.ID) == 0 { resp.Diagnostics.AddError("Missing required field", `The field id is required but was not found in the json encoded ID. It's expected to be a value alike '"9524ec7d-36d9-465d-a8c5-83a3c9390458"`) return diff --git a/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource_sdk.go b/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource_sdk.go index 1b8c1633..1325f879 100644 --- a/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource_sdk.go +++ b/internal/provider/eventgatewaylistenerpolicyforwardtovirtualcluster_resource_sdk.go @@ -39,8 +39,8 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() forwardToVirtualClusterPolicy, forwardToVirtualClusterPolicyDiags := r.ToSharedForwardToVirtualClusterPolicy(ctx) diags.Append(forwardToVirtualClusterPolicyDiags...) @@ -51,7 +51,7 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera out := operations.CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest{ GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, + ListenerID: listenerID, ForwardToVirtualClusterPolicy: forwardToVirtualClusterPolicy, } @@ -64,16 +64,16 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() out := operations.DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest{ - GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, - PolicyID: policyID, + GatewayID: gatewayID, + ListenerID: listenerID, + PolicyID: policyID, } return &out, diags @@ -85,16 +85,16 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() out := operations.GetEventGatewayListenerPolicyForwardToVirtualClusterRequest{ - GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, - PolicyID: policyID, + GatewayID: gatewayID, + ListenerID: listenerID, + PolicyID: policyID, } return &out, diags @@ -106,8 +106,8 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() @@ -121,7 +121,7 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToOpera out := operations.UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest{ GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, + ListenerID: listenerID, PolicyID: policyID, ForwardToVirtualClusterPolicy: forwardToVirtualClusterPolicy, } @@ -200,34 +200,11 @@ func (r *EventGatewayListenerPolicyForwardToVirtualClusterResourceModel) ToShare } var forwardToClusterByPortMappingConfig *shared.ForwardToClusterByPortMappingConfig if r.Config.PortMapping != nil { - var destination shared.VirtualClusterReference - var virtualClusterReferenceByID *shared.VirtualClusterReferenceByID - if r.Config.PortMapping.Destination.VirtualClusterReferenceByID != nil { - var id string - id = r.Config.PortMapping.Destination.VirtualClusterReferenceByID.ID.ValueString() - - virtualClusterReferenceByID = &shared.VirtualClusterReferenceByID{ - ID: id, - } - } - if virtualClusterReferenceByID != nil { - destination = shared.VirtualClusterReference{ - VirtualClusterReferenceByID: virtualClusterReferenceByID, - } - } - var virtualClusterReferenceByName *shared.VirtualClusterReferenceByName - if r.Config.PortMapping.Destination.VirtualClusterReferenceByName != nil { - var name1 string - name1 = r.Config.PortMapping.Destination.VirtualClusterReferenceByName.Name.ValueString() + var id string + id = r.Config.PortMapping.Destination.ID.ValueString() - virtualClusterReferenceByName = &shared.VirtualClusterReferenceByName{ - Name: name1, - } - } - if virtualClusterReferenceByName != nil { - destination = shared.VirtualClusterReference{ - VirtualClusterReferenceByName: virtualClusterReferenceByName, - } + destination := shared.VirtualClusterReference{ + ID: id, } var advertisedHost string advertisedHost = r.Config.PortMapping.AdvertisedHost.ValueString() diff --git a/internal/provider/eventgatewaylistenerpolicytlsserver_resource.go b/internal/provider/eventgatewaylistenerpolicytlsserver_resource.go index 55251be7..e63cafb8 100644 --- a/internal/provider/eventgatewaylistenerpolicytlsserver_resource.go +++ b/internal/provider/eventgatewaylistenerpolicytlsserver_resource.go @@ -39,17 +39,17 @@ type EventGatewayListenerPolicyTLSServerResource struct { // EventGatewayListenerPolicyTLSServerResourceModel describes the resource data model. type EventGatewayListenerPolicyTLSServerResourceModel struct { - Config tfTypes.EventGatewayTLSListenerPolicyConfig `tfsdk:"config"` - CreatedAt types.String `tfsdk:"created_at"` - Description types.String `tfsdk:"description"` - Enabled types.Bool `tfsdk:"enabled"` - EventGatewayListenerID types.String `tfsdk:"event_gateway_listener_id"` - GatewayID types.String `tfsdk:"gateway_id"` - ID types.String `tfsdk:"id"` - Labels map[string]types.String `tfsdk:"labels"` - Name types.String `tfsdk:"name"` - ParentPolicyID types.String `tfsdk:"parent_policy_id"` - UpdatedAt types.String `tfsdk:"updated_at"` + Config tfTypes.EventGatewayTLSListenerPolicyConfig `tfsdk:"config"` + CreatedAt types.String `tfsdk:"created_at"` + Description types.String `tfsdk:"description"` + Enabled types.Bool `tfsdk:"enabled"` + GatewayID types.String `tfsdk:"gateway_id"` + ID types.String `tfsdk:"id"` + Labels map[string]types.String `tfsdk:"labels"` + ListenerID types.String `tfsdk:"listener_id"` + Name types.String `tfsdk:"name"` + ParentPolicyID types.String `tfsdk:"parent_policy_id"` + UpdatedAt types.String `tfsdk:"updated_at"` } func (r *EventGatewayListenerPolicyTLSServerResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { @@ -152,10 +152,6 @@ func (r *EventGatewayListenerPolicyTLSServerResource) Schema(ctx context.Context Default: booldefault.StaticBool(true), Description: `Whether the policy is enabled. Default: true`, }, - "event_gateway_listener_id": schema.StringAttribute{ - Required: true, - Description: `The ID of the Event Gateway Listener.`, - }, "gateway_id": schema.StringAttribute{ Required: true, Description: `The UUID of your Gateway.`, @@ -172,7 +168,12 @@ func (r *EventGatewayListenerPolicyTLSServerResource) Schema(ctx context.Context `` + "\n" + `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, + "listener_id": schema.StringAttribute{ + Required: true, + Description: `The ID of the Event Gateway Listener.`, + }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ @@ -512,26 +513,26 @@ func (r *EventGatewayListenerPolicyTLSServerResource) ImportState(ctx context.Co dec := json.NewDecoder(bytes.NewReader([]byte(req.ID))) dec.DisallowUnknownFields() var data struct { - EventGatewayListenerID string `json:"event_gateway_listener_id"` - GatewayID string `json:"gateway_id"` - ID string `json:"id"` + GatewayID string `json:"gateway_id"` + ListenerID string `json:"listener_id"` + ID string `json:"id"` } if err := dec.Decode(&data); err != nil { - resp.Diagnostics.AddError("Invalid ID", `The import ID is not valid. It is expected to be a JSON object string with the format: '{"event_gateway_listener_id": "...", "gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458"}': `+err.Error()) + resp.Diagnostics.AddError("Invalid ID", `The import ID is not valid. It is expected to be a JSON object string with the format: '{"gateway_id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "id": "9524ec7d-36d9-465d-a8c5-83a3c9390458", "listener_id": "..."}': `+err.Error()) return } - if len(data.EventGatewayListenerID) == 0 { - resp.Diagnostics.AddError("Missing required field", `The field event_gateway_listener_id is required but was not found in the json encoded ID. It's expected to be a value alike '""`) - return - } - resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("event_gateway_listener_id"), data.EventGatewayListenerID)...) if len(data.GatewayID) == 0 { resp.Diagnostics.AddError("Missing required field", `The field gateway_id is required but was not found in the json encoded ID. It's expected to be a value alike '"9524ec7d-36d9-465d-a8c5-83a3c9390458"`) return } resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("gateway_id"), data.GatewayID)...) + if len(data.ListenerID) == 0 { + resp.Diagnostics.AddError("Missing required field", `The field listener_id is required but was not found in the json encoded ID. It's expected to be a value alike '""`) + return + } + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("listener_id"), data.ListenerID)...) if len(data.ID) == 0 { resp.Diagnostics.AddError("Missing required field", `The field id is required but was not found in the json encoded ID. It's expected to be a value alike '"9524ec7d-36d9-465d-a8c5-83a3c9390458"`) return diff --git a/internal/provider/eventgatewaylistenerpolicytlsserver_resource_sdk.go b/internal/provider/eventgatewaylistenerpolicytlsserver_resource_sdk.go index 8db690d0..867a523a 100644 --- a/internal/provider/eventgatewaylistenerpolicytlsserver_resource_sdk.go +++ b/internal/provider/eventgatewaylistenerpolicytlsserver_resource_sdk.go @@ -43,8 +43,8 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsCreateEve var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() eventGatewayTLSListenerPolicy, eventGatewayTLSListenerPolicyDiags := r.ToSharedEventGatewayTLSListenerPolicy(ctx) diags.Append(eventGatewayTLSListenerPolicyDiags...) @@ -55,7 +55,7 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsCreateEve out := operations.CreateEventGatewayListenerPolicyTLSServerRequest{ GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, + ListenerID: listenerID, EventGatewayTLSListenerPolicy: eventGatewayTLSListenerPolicy, } @@ -68,16 +68,16 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsDeleteEve var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() out := operations.DeleteEventGatewayListenerPolicyTLSServerRequest{ - GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, - PolicyID: policyID, + GatewayID: gatewayID, + ListenerID: listenerID, + PolicyID: policyID, } return &out, diags @@ -89,16 +89,16 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsGetEventG var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() out := operations.GetEventGatewayListenerPolicyTLSServerRequest{ - GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, - PolicyID: policyID, + GatewayID: gatewayID, + ListenerID: listenerID, + PolicyID: policyID, } return &out, diags @@ -110,8 +110,8 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsUpdateEve var gatewayID string gatewayID = r.GatewayID.ValueString() - var eventGatewayListenerID string - eventGatewayListenerID = r.EventGatewayListenerID.ValueString() + var listenerID string + listenerID = r.ListenerID.ValueString() var policyID string policyID = r.ID.ValueString() @@ -124,9 +124,9 @@ func (r *EventGatewayListenerPolicyTLSServerResourceModel) ToOperationsUpdateEve } out := operations.UpdateEventGatewayListenerPolicyTLSServerRequest{ - GatewayID: gatewayID, - EventGatewayListenerID: eventGatewayListenerID, - PolicyID: policyID, + GatewayID: gatewayID, + ListenerID: listenerID, + PolicyID: policyID, EventGatewayTLSListenerSensitiveDataAwarePolicy: eventGatewayTLSListenerSensitiveDataAwarePolicy, } diff --git a/internal/provider/eventgatewayproducepolicyencrypt_resource.go b/internal/provider/eventgatewayproducepolicyencrypt_resource.go index 296442fe..5a8d004b 100644 --- a/internal/provider/eventgatewayproducepolicyencrypt_resource.go +++ b/internal/provider/eventgatewayproducepolicyencrypt_resource.go @@ -103,44 +103,15 @@ func (r *EventGatewayProducePolicyEncryptResource) Schema(ctx context.Context, r "key": schema.SingleNestedAttribute{ Required: true, Attributes: map[string]schema.Attribute{ - "reference_by_id": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Required: true, - Description: `The ID of the static key defined in the key source.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthAtLeast(1), - }, - }, - }, - Description: `A static encryption key reference by ID.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("reference_by_name"), - }...), - }, - }, - "reference_by_name": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - Required: true, - Description: `The name of the static key defined in the key source.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthBetween(1, 255), - }, - }, - }, - Description: `A static encryption key reference by name.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("reference_by_id"), - }...), + "id": schema.StringAttribute{ + Required: true, + Description: `The ID of the static key defined in the key source.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthAtLeast(1), }, }, }, - Description: `A static encryption key reference, either by ID or by value.`, + Description: `A static encryption key reference by ID.`, }, }, Description: `A static encryption key.`, @@ -216,6 +187,7 @@ func (r *EventGatewayProducePolicyEncryptResource) Schema(ctx context.Context, r `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayproducepolicyencrypt_resource_sdk.go b/internal/provider/eventgatewayproducepolicyencrypt_resource_sdk.go index 23b052d5..c1fecef5 100644 --- a/internal/provider/eventgatewayproducepolicyencrypt_resource_sdk.go +++ b/internal/provider/eventgatewayproducepolicyencrypt_resource_sdk.go @@ -189,34 +189,11 @@ func (r *EventGatewayProducePolicyEncryptResourceModel) ToSharedEventGatewayEncr } var encryptionKeyStatic *shared.EncryptionKeyStatic if r.Config.EncryptionKey.Static != nil { - var key shared.EncryptionKeyStaticReference - var referenceByID *shared.ReferenceByID - if r.Config.EncryptionKey.Static.Key.ReferenceByID != nil { - var id string - id = r.Config.EncryptionKey.Static.Key.ReferenceByID.ID.ValueString() - - referenceByID = &shared.ReferenceByID{ - ID: id, - } - } - if referenceByID != nil { - key = shared.EncryptionKeyStaticReference{ - ReferenceByID: referenceByID, - } - } - var referenceByName *shared.ReferenceByName - if r.Config.EncryptionKey.Static.Key.ReferenceByName != nil { - var name1 string - name1 = r.Config.EncryptionKey.Static.Key.ReferenceByName.Name.ValueString() + var id string + id = r.Config.EncryptionKey.Static.Key.ID.ValueString() - referenceByName = &shared.ReferenceByName{ - Name: name1, - } - } - if referenceByName != nil { - key = shared.EncryptionKeyStaticReference{ - ReferenceByName: referenceByName, - } + key := shared.EncryptionKeyStaticReference{ + ID: id, } encryptionKeyStatic = &shared.EncryptionKeyStatic{ Key: key, diff --git a/internal/provider/eventgatewayproducepolicymodifyheaders_resource.go b/internal/provider/eventgatewayproducepolicymodifyheaders_resource.go index dc58179a..568100aa 100644 --- a/internal/provider/eventgatewayproducepolicymodifyheaders_resource.go +++ b/internal/provider/eventgatewayproducepolicymodifyheaders_resource.go @@ -166,6 +166,7 @@ func (r *EventGatewayProducePolicyModifyHeadersResource) Schema(ctx context.Cont `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayproducepolicyschemavalidation_resource.go b/internal/provider/eventgatewayproducepolicyschemavalidation_resource.go index 360e3539..a0779c25 100644 --- a/internal/provider/eventgatewayproducepolicyschemavalidation_resource.go +++ b/internal/provider/eventgatewayproducepolicyschemavalidation_resource.go @@ -93,43 +93,14 @@ func (r *EventGatewayProducePolicySchemaValidationResource) Schema(ctx context.C "schema_registry": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ - "schema_registry_reference_by_id": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Required: true, - Description: `The unique identifier of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthAtLeast(1), - }, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_name"), - }...), - }, - }, - "schema_registry_reference_by_name": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - Required: true, - Description: `The unique name of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthBetween(1, 255), - }, - }, - }, - Description: `Reference a schema registry by its unique name.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_id"), - }...), + "id": schema.StringAttribute{ + Required: true, + Description: `The unique identifier of the schema registry.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthAtLeast(1), }, }, }, - Description: `A reference to a schema Registry.`, }, "value_validation_action": schema.StringAttribute{ Optional: true, @@ -173,43 +144,14 @@ func (r *EventGatewayProducePolicySchemaValidationResource) Schema(ctx context.C "schema_registry": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ - "schema_registry_reference_by_id": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Required: true, - Description: `The unique identifier of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthAtLeast(1), - }, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_name"), - }...), - }, - }, - "schema_registry_reference_by_name": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "name": schema.StringAttribute{ - Required: true, - Description: `The unique name of the schema registry.`, - Validators: []validator.String{ - stringvalidator.UTF8LengthBetween(1, 255), - }, - }, - }, - Description: `Reference a schema registry by its unique name.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("schema_registry_reference_by_id"), - }...), + "id": schema.StringAttribute{ + Required: true, + Description: `The unique identifier of the schema registry.`, + Validators: []validator.String{ + stringvalidator.UTF8LengthAtLeast(1), }, }, }, - Description: `A reference to a schema Registry.`, }, "value_validation_action": schema.StringAttribute{ Optional: true, @@ -275,6 +217,7 @@ func (r *EventGatewayProducePolicySchemaValidationResource) Schema(ctx context.C `Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".`, }, "name": schema.StringAttribute{ + Computed: true, Optional: true, Description: `A unique user-defined name of the policy.`, Validators: []validator.String{ diff --git a/internal/provider/eventgatewayproducepolicyschemavalidation_resource_sdk.go b/internal/provider/eventgatewayproducepolicyschemavalidation_resource_sdk.go index e9c75ee8..3781fedf 100644 --- a/internal/provider/eventgatewayproducepolicyschemavalidation_resource_sdk.go +++ b/internal/provider/eventgatewayproducepolicyschemavalidation_resource_sdk.go @@ -166,33 +166,11 @@ func (r *EventGatewayProducePolicySchemaValidationResourceModel) ToSharedEventGa if r.Config.ConfluentSchemaRegistry != nil { var schemaRegistry *shared.SchemaRegistryReference if r.Config.ConfluentSchemaRegistry.SchemaRegistry != nil { - var schemaRegistryReferenceByID *shared.SchemaRegistryReferenceByID - if r.Config.ConfluentSchemaRegistry.SchemaRegistry.SchemaRegistryReferenceByID != nil { - var id string - id = r.Config.ConfluentSchemaRegistry.SchemaRegistry.SchemaRegistryReferenceByID.ID.ValueString() - - schemaRegistryReferenceByID = &shared.SchemaRegistryReferenceByID{ - ID: id, - } - } - if schemaRegistryReferenceByID != nil { - schemaRegistry = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByID: schemaRegistryReferenceByID, - } - } - var schemaRegistryReferenceByName *shared.SchemaRegistryReferenceByName - if r.Config.ConfluentSchemaRegistry.SchemaRegistry.SchemaRegistryReferenceByName != nil { - var name1 string - name1 = r.Config.ConfluentSchemaRegistry.SchemaRegistry.SchemaRegistryReferenceByName.Name.ValueString() - - schemaRegistryReferenceByName = &shared.SchemaRegistryReferenceByName{ - Name: name1, - } - } - if schemaRegistryReferenceByName != nil { - schemaRegistry = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByName: schemaRegistryReferenceByName, - } + var id string + id = r.Config.ConfluentSchemaRegistry.SchemaRegistry.ID.ValueString() + + schemaRegistry = &shared.SchemaRegistryReference{ + ID: id, } } keyValidationAction := new(shared.ProduceKeyValidationAction) @@ -222,33 +200,11 @@ func (r *EventGatewayProducePolicySchemaValidationResourceModel) ToSharedEventGa if r.Config.JSON != nil { var schemaRegistry1 *shared.SchemaRegistryReference if r.Config.JSON.SchemaRegistry != nil { - var schemaRegistryReferenceById1 *shared.SchemaRegistryReferenceByID - if r.Config.JSON.SchemaRegistry.SchemaRegistryReferenceByID != nil { - var id1 string - id1 = r.Config.JSON.SchemaRegistry.SchemaRegistryReferenceByID.ID.ValueString() - - schemaRegistryReferenceById1 = &shared.SchemaRegistryReferenceByID{ - ID: id1, - } - } - if schemaRegistryReferenceById1 != nil { - schemaRegistry1 = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByID: schemaRegistryReferenceById1, - } - } - var schemaRegistryReferenceByName1 *shared.SchemaRegistryReferenceByName - if r.Config.JSON.SchemaRegistry.SchemaRegistryReferenceByName != nil { - var name2 string - name2 = r.Config.JSON.SchemaRegistry.SchemaRegistryReferenceByName.Name.ValueString() - - schemaRegistryReferenceByName1 = &shared.SchemaRegistryReferenceByName{ - Name: name2, - } - } - if schemaRegistryReferenceByName1 != nil { - schemaRegistry1 = &shared.SchemaRegistryReference{ - SchemaRegistryReferenceByName: schemaRegistryReferenceByName1, - } + var id1 string + id1 = r.Config.JSON.SchemaRegistry.ID.ValueString() + + schemaRegistry1 = &shared.SchemaRegistryReference{ + ID: id1, } } keyValidationAction1 := new(shared.ProduceKeyValidationAction) diff --git a/internal/provider/meshservice_resource_sdk.go b/internal/provider/meshservice_resource_sdk.go index 487a7190..1f6937be 100644 --- a/internal/provider/meshservice_resource_sdk.go +++ b/internal/provider/meshservice_resource_sdk.go @@ -366,9 +366,9 @@ func (r *MeshServiceResourceModel) ToSharedMeshServiceItemInput(ctx context.Cont DataplaneTags: dataplaneTags, } } - state := new(shared.State) + state := new(shared.MeshServiceItemState) if !r.Spec.State.IsUnknown() && !r.Spec.State.IsNull() { - *state = shared.State(r.Spec.State.ValueString()) + *state = shared.MeshServiceItemState(r.Spec.State.ValueString()) } else { state = nil } diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 6fbcf28c..107ee966 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -148,6 +148,7 @@ func (p *KonnectBetaProvider) Resources(ctx context.Context) []func() resource.R NewAuthServerClaimsResource, NewAuthServerClientsResource, NewAuthServerScopesResource, + NewCloudGatewayAddOnResource, NewDashboardResource, NewEventGatewayResource, NewEventGatewayBackendClusterResource, diff --git a/internal/provider/types/add_on_owner.go b/internal/provider/types/add_on_owner.go new file mode 100644 index 00000000..277fa4da --- /dev/null +++ b/internal/provider/types/add_on_owner.go @@ -0,0 +1,8 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +type AddOnOwner struct { + ControlPlane *ControlPlane `queryParam:"inline" tfsdk:"control_plane" tfPlanOnly:"true"` + ControlPlaneGroup *ControlPlaneGroup `queryParam:"inline" tfsdk:"control_plane_group" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/cloud_authentication.go b/internal/provider/types/cloud_authentication.go new file mode 100644 index 00000000..e51ccdee --- /dev/null +++ b/internal/provider/types/cloud_authentication.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type CloudAuthentication struct { + AuthProvider types.String `tfsdk:"auth_provider"` + AwsAssumeRoleArn types.String `tfsdk:"aws_assume_role_arn"` + AwsCacheName types.String `tfsdk:"aws_cache_name"` + AwsRegion types.String `tfsdk:"aws_region"` + AzureTenantID types.String `tfsdk:"azure_tenant_id"` +} diff --git a/internal/provider/types/control_plane.go b/internal/provider/types/control_plane.go new file mode 100644 index 00000000..2044cb89 --- /dev/null +++ b/internal/provider/types/control_plane.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ControlPlane struct { + ControlPlaneGeo types.String `tfsdk:"control_plane_geo"` + ControlPlaneID types.String `tfsdk:"control_plane_id"` +} diff --git a/internal/provider/types/control_plane_group.go b/internal/provider/types/control_plane_group.go new file mode 100644 index 00000000..9a9bdf51 --- /dev/null +++ b/internal/provider/types/control_plane_group.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ControlPlaneGroup struct { + ControlPlaneGroupGeo types.String `tfsdk:"control_plane_group_geo"` + ControlPlaneGroupID types.String `tfsdk:"control_plane_group_id"` +} diff --git a/internal/provider/types/create_add_on_config.go b/internal/provider/types/create_add_on_config.go new file mode 100644 index 00000000..03e4666b --- /dev/null +++ b/internal/provider/types/create_add_on_config.go @@ -0,0 +1,8 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +type CreateAddOnConfig struct { + ManagedCache *ManagedCache `queryParam:"inline" tfsdk:"managed_cache" tfPlanOnly:"true"` + ManagedCacheAddOnConfigResponse *ManagedCacheAddOnConfigResponse `queryParam:"inline" tfsdk:"managed_cache_add_on_config_response" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/encryption_key_static.go b/internal/provider/types/encryption_key_static.go index c96d885b..2d34da7f 100644 --- a/internal/provider/types/encryption_key_static.go +++ b/internal/provider/types/encryption_key_static.go @@ -3,5 +3,5 @@ package types type EncryptionKeyStatic struct { - Key EncryptionKeyStaticReference `tfsdk:"key"` + Key SchemaRegistryReference `tfsdk:"key"` } diff --git a/internal/provider/types/encryption_key_static_reference.go b/internal/provider/types/encryption_key_static_reference.go deleted file mode 100644 index 8c036f24..00000000 --- a/internal/provider/types/encryption_key_static_reference.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -type EncryptionKeyStaticReference struct { - ReferenceByID *SchemaRegistryReferenceByID `queryParam:"inline" tfsdk:"reference_by_id" tfPlanOnly:"true"` - ReferenceByName *EventGatewayACLOperation `queryParam:"inline" tfsdk:"reference_by_name" tfPlanOnly:"true"` -} diff --git a/internal/provider/types/event_gateway_acl_rule.go b/internal/provider/types/event_gateway_acl_rule.go index 8ca5fa22..866d9702 100644 --- a/internal/provider/types/event_gateway_acl_rule.go +++ b/internal/provider/types/event_gateway_acl_rule.go @@ -7,8 +7,8 @@ import ( ) type EventGatewayACLRule struct { - Action types.String `tfsdk:"action"` - Operations []EventGatewayACLOperation `tfsdk:"operations"` - ResourceNames []EventGatewayACLResourceName `tfsdk:"resource_names"` - ResourceType types.String `tfsdk:"resource_type"` + Action types.String `tfsdk:"action"` + Operations []EventGatewayACLOperation `tfsdk:"operations"` + ResourceNames ResourceNames `tfsdk:"resource_names"` + ResourceType types.String `tfsdk:"resource_type"` } diff --git a/internal/provider/types/forward_to_cluster_by_port_mapping_config.go b/internal/provider/types/forward_to_cluster_by_port_mapping_config.go index 4a7487a9..97d49751 100644 --- a/internal/provider/types/forward_to_cluster_by_port_mapping_config.go +++ b/internal/provider/types/forward_to_cluster_by_port_mapping_config.go @@ -9,6 +9,6 @@ import ( type ForwardToClusterByPortMappingConfig struct { AdvertisedHost types.String `tfsdk:"advertised_host"` BootstrapPort types.String `tfsdk:"bootstrap_port"` - Destination VirtualClusterReference `tfsdk:"destination"` + Destination SchemaRegistryReference `tfsdk:"destination"` MinBrokerID types.Int64 `tfsdk:"min_broker_id"` } diff --git a/internal/provider/types/managed_cache.go b/internal/provider/types/managed_cache.go new file mode 100644 index 00000000..17e1959d --- /dev/null +++ b/internal/provider/types/managed_cache.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +type ManagedCache struct { + CapacityConfig ManagedCacheCapacityConfig `tfsdk:"capacity_config"` +} diff --git a/internal/provider/types/managed_cache_add_on_config_response.go b/internal/provider/types/managed_cache_add_on_config_response.go new file mode 100644 index 00000000..2d151526 --- /dev/null +++ b/internal/provider/types/managed_cache_add_on_config_response.go @@ -0,0 +1,9 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +type ManagedCacheAddOnConfigResponse struct { + CapacityConfig ManagedCacheCapacityConfig `tfsdk:"capacity_config"` + DataPlaneGroups []ManagedCacheAddOnDataPlaneGroup `tfsdk:"data_plane_groups"` + StateMetadata ManagedCacheAddOnConfigResponseStateMetadata `tfsdk:"state_metadata"` +} diff --git a/internal/provider/types/managed_cache_add_on_config_response_state_metadata.go b/internal/provider/types/managed_cache_add_on_config_response_state_metadata.go new file mode 100644 index 00000000..5716532d --- /dev/null +++ b/internal/provider/types/managed_cache_add_on_config_response_state_metadata.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ManagedCacheAddOnConfigResponseStateMetadata struct { + CacheConfigID types.String `tfsdk:"cache_config_id"` + CacheHost types.String `tfsdk:"cache_host"` + CachePort types.String `tfsdk:"cache_port"` + CacheServerName types.String `tfsdk:"cache_server_name"` + CacheUsername types.String `tfsdk:"cache_username"` + CloudAuthentication *CloudAuthentication `tfsdk:"cloud_authentication"` +} diff --git a/internal/provider/types/managed_cache_add_on_data_plane_group.go b/internal/provider/types/managed_cache_add_on_data_plane_group.go new file mode 100644 index 00000000..e48ea97d --- /dev/null +++ b/internal/provider/types/managed_cache_add_on_data_plane_group.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ManagedCacheAddOnDataPlaneGroup struct { + CloudGatewayNetworkID types.String `tfsdk:"cloud_gateway_network_id"` + ID types.String `tfsdk:"id"` + Provider types.String `tfsdk:"provider"` + Region types.String `tfsdk:"region"` + State types.String `tfsdk:"state"` + StateMetadata StateMetadata `tfsdk:"state_metadata"` +} diff --git a/internal/provider/types/managed_cache_capacity_config.go b/internal/provider/types/managed_cache_capacity_config.go new file mode 100644 index 00000000..cf393ee2 --- /dev/null +++ b/internal/provider/types/managed_cache_capacity_config.go @@ -0,0 +1,7 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +type ManagedCacheCapacityConfig struct { + Tiered *Tiered `queryParam:"inline" tfsdk:"tiered" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/resource_names.go b/internal/provider/types/resource_names.go new file mode 100644 index 00000000..8e0b8954 --- /dev/null +++ b/internal/provider/types/resource_names.go @@ -0,0 +1,12 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type ResourceNames struct { + ArrayOfEventGatewayACLResourceName []EventGatewayACLResourceName `queryParam:"inline" tfsdk:"array_of_event_gateway_acl_resource_name" tfPlanOnly:"true"` + Str types.String `queryParam:"inline" tfsdk:"str" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/schema_registry_reference.go b/internal/provider/types/schema_registry_reference.go index 115150be..9065d87f 100644 --- a/internal/provider/types/schema_registry_reference.go +++ b/internal/provider/types/schema_registry_reference.go @@ -2,7 +2,10 @@ package types +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + type SchemaRegistryReference struct { - SchemaRegistryReferenceByID *SchemaRegistryReferenceByID `queryParam:"inline" tfsdk:"schema_registry_reference_by_id" tfPlanOnly:"true"` - SchemaRegistryReferenceByName *EventGatewayACLOperation `queryParam:"inline" tfsdk:"schema_registry_reference_by_name" tfPlanOnly:"true"` + ID types.String `tfsdk:"id"` } diff --git a/internal/provider/types/state_metadata.go b/internal/provider/types/state_metadata.go new file mode 100644 index 00000000..a9b2d629 --- /dev/null +++ b/internal/provider/types/state_metadata.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package types + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +type StateMetadata struct { + ErrorReason types.String `tfsdk:"error_reason"` +} diff --git a/internal/provider/types/schema_registry_reference_by_id.go b/internal/provider/types/tiered.go similarity index 68% rename from internal/provider/types/schema_registry_reference_by_id.go rename to internal/provider/types/tiered.go index d9bd514f..6db6615a 100644 --- a/internal/provider/types/schema_registry_reference_by_id.go +++ b/internal/provider/types/tiered.go @@ -6,6 +6,6 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -type SchemaRegistryReferenceByID struct { - ID types.String `tfsdk:"id"` +type Tiered struct { + Tier types.String `tfsdk:"tier"` } diff --git a/internal/provider/types/virtual_cluster_reference.go b/internal/provider/types/virtual_cluster_reference.go deleted file mode 100644 index 035319d4..00000000 --- a/internal/provider/types/virtual_cluster_reference.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package types - -type VirtualClusterReference struct { - VirtualClusterReferenceByID *SchemaRegistryReferenceByID `queryParam:"inline" tfsdk:"virtual_cluster_reference_by_id" tfPlanOnly:"true"` - VirtualClusterReferenceByName *EventGatewayACLOperation `queryParam:"inline" tfsdk:"virtual_cluster_reference_by_name" tfPlanOnly:"true"` -} diff --git a/internal/sdk/cloudgateways.go b/internal/sdk/cloudgateways.go new file mode 100644 index 00000000..c2ce165c --- /dev/null +++ b/internal/sdk/cloudgateways.go @@ -0,0 +1,896 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package sdk + +import ( + "bytes" + "context" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/config" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/hooks" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/errors" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/operations" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/shared" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/retry" + "net/http" + "net/url" +) + +type CloudGateways struct { + rootSDK *KonnectBeta + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newCloudGateways(rootSDK *KonnectBeta, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *CloudGateways { + return &CloudGateways{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// CreateAddOn - Create Add-On +// Creates a new add-on. Specific add-on types (e.g., managed cache) +// are defined by the sub-kind configuration. +func (s *CloudGateways) CreateAddOn(ctx context.Context, request shared.CreateAddOnRequest, opts ...operations.Option) (*operations.CreateAddOnResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + operations.SupportedOptionAcceptHeaderOverride, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(operations.CreateAddOnServerList[0], map[string]string{}) + if o.ServerURL != nil { + baseURL = *o.ServerURL + } + + opURL, err := url.JoinPath(baseURL, "/v2/cloud-gateways/add-ons") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "create-add-on", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + if o.AcceptHeaderOverride != nil { + req.Header.Set("Accept", string(*o.AcceptHeaderOverride)) + } else { + req.Header.Set("Accept", "application/json;q=1, application/problem+json;q=0") + } + + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if reqContentType != "" { + req.Header.Set("Content-Type", reqContentType) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 100, + MaxInterval: 500, + Exponent: 1.5, + MaxElapsedTime: 500, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "404", + "408", + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.CreateAddOnResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 201: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AddOnResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AddOnResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.BadRequestError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.BadRequestError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UnauthorizedError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UnauthorizedError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ForbiddenError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ForbiddenError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 404: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.NotFoundError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.NotFoundError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 409: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ConflictError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ConflictError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetAddOn - Get Add-On +// Retrieves an add-on by ID. +func (s *CloudGateways) GetAddOn(ctx context.Context, request operations.GetAddOnRequest, opts ...operations.Option) (*operations.GetAddOnResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + operations.SupportedOptionAcceptHeaderOverride, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(operations.GetAddOnServerList[0], map[string]string{}) + if o.ServerURL != nil { + baseURL = *o.ServerURL + } + + opURL, err := utils.GenerateURL(ctx, baseURL, "/v2/cloud-gateways/add-ons/{addOnId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "get-add-on", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + if o.AcceptHeaderOverride != nil { + req.Header.Set("Accept", string(*o.AcceptHeaderOverride)) + } else { + req.Header.Set("Accept", "application/json;q=1, application/problem+json;q=0") + } + + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 100, + MaxInterval: 500, + Exponent: 1.5, + MaxElapsedTime: 500, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "404", + "408", + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.GetAddOnResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.AddOnResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.AddOnResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UnauthorizedError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UnauthorizedError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ForbiddenError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ForbiddenError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 404: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.NotFoundError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.NotFoundError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteAddOn - Delete Add-On +// Deletes an add-on by ID. The request will be rejected if the managed cache partial is still in use by some plugins. +func (s *CloudGateways) DeleteAddOn(ctx context.Context, request operations.DeleteAddOnRequest, opts ...operations.Option) (*operations.DeleteAddOnResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(operations.DeleteAddOnServerList[0], map[string]string{}) + if o.ServerURL != nil { + baseURL = *o.ServerURL + } + + opURL, err := utils.GenerateURL(ctx, baseURL, "/v2/cloud-gateways/add-ons/{addOnId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "delete-add-on", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/problem+json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } else { + retryConfig = &retry.Config{ + Strategy: "backoff", Backoff: &retry.BackoffStrategy{ + InitialInterval: 100, + MaxInterval: 500, + Exponent: 1.5, + MaxElapsedTime: 500, + }, + RetryConnectionErrors: true, + } + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "404", + "408", + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.DeleteAddOnResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + switch { + case httpRes.StatusCode == 204: + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.BadRequestError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.BadRequestError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.UnauthorizedError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.UnauthorizedError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.ForbiddenError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.ForbiddenError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 404: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/problem+json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out shared.NotFoundError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.NotFoundError = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/internal/sdk/konnectbeta.go b/internal/sdk/konnectbeta.go index 629064ac..b7e68408 100644 --- a/internal/sdk/konnectbeta.go +++ b/internal/sdk/konnectbeta.go @@ -165,6 +165,7 @@ type KonnectBeta struct { // Cluster policies are transformation and validation policies that can be applied to Kafka messages. // EventGatewayVirtualClusterPolicies *EventGatewayVirtualClusterPolicies + CloudGateways *CloudGateways sdkConfiguration config.SDKConfiguration hooks *hooks.Hooks @@ -327,6 +328,7 @@ func New(opts ...SDKOption) *KonnectBeta { sdk.EventGatewayVirtualClusterConsumePolicies = newEventGatewayVirtualClusterConsumePolicies(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.EventGatewayVirtualClusterProducePolicies = newEventGatewayVirtualClusterProducePolicies(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.EventGatewayVirtualClusterPolicies = newEventGatewayVirtualClusterPolicies(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.CloudGateways = newCloudGateways(sdk, sdk.sdkConfiguration, sdk.hooks) return sdk } diff --git a/internal/sdk/models/operations/createaddon.go b/internal/sdk/models/operations/createaddon.go new file mode 100644 index 00000000..a454cce1 --- /dev/null +++ b/internal/sdk/models/operations/createaddon.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/shared" + "net/http" +) + +var CreateAddOnServerList = []string{ + "https://global.api.konghq.com/", +} + +type CreateAddOnResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Response format for creating an add-on. + AddOnResponse *shared.AddOnResponse + // Bad Request + BadRequestError *shared.BadRequestError + // Unauthorized + UnauthorizedError *shared.UnauthorizedError + // Forbidden + ForbiddenError *shared.ForbiddenError + // Not Found + NotFoundError *shared.NotFoundError + // Conflict + ConflictError *shared.ConflictError +} + +func (c *CreateAddOnResponse) GetContentType() string { + if c == nil { + return "" + } + return c.ContentType +} + +func (c *CreateAddOnResponse) GetStatusCode() int { + if c == nil { + return 0 + } + return c.StatusCode +} + +func (c *CreateAddOnResponse) GetRawResponse() *http.Response { + if c == nil { + return nil + } + return c.RawResponse +} + +func (c *CreateAddOnResponse) GetAddOnResponse() *shared.AddOnResponse { + if c == nil { + return nil + } + return c.AddOnResponse +} + +func (c *CreateAddOnResponse) GetBadRequestError() *shared.BadRequestError { + if c == nil { + return nil + } + return c.BadRequestError +} + +func (c *CreateAddOnResponse) GetUnauthorizedError() *shared.UnauthorizedError { + if c == nil { + return nil + } + return c.UnauthorizedError +} + +func (c *CreateAddOnResponse) GetForbiddenError() *shared.ForbiddenError { + if c == nil { + return nil + } + return c.ForbiddenError +} + +func (c *CreateAddOnResponse) GetNotFoundError() *shared.NotFoundError { + if c == nil { + return nil + } + return c.NotFoundError +} + +func (c *CreateAddOnResponse) GetConflictError() *shared.ConflictError { + if c == nil { + return nil + } + return c.ConflictError +} diff --git a/internal/sdk/models/operations/createeventgatewaylistenerpolicyforwardtovirtualcluster.go b/internal/sdk/models/operations/createeventgatewaylistenerpolicyforwardtovirtualcluster.go index bdab73d7..546ae80f 100644 --- a/internal/sdk/models/operations/createeventgatewaylistenerpolicyforwardtovirtualcluster.go +++ b/internal/sdk/models/operations/createeventgatewaylistenerpolicyforwardtovirtualcluster.go @@ -11,7 +11,7 @@ type CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // Determines the id of the existing policy the new policy should be inserted before. Either 'before' or 'after' can be provided, when both are omitted the new policy is added to the end of the chain. When both are provided, the request fails with a 400 Bad Request. // Before *string `queryParam:"style=form,explode=true,name=before"` @@ -28,11 +28,11 @@ func (c *CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetGate return c.GatewayID } -func (c *CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetEventGatewayListenerID() string { +func (c *CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetListenerID() string { if c == nil { return "" } - return c.EventGatewayListenerID + return c.ListenerID } func (c *CreateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetBefore() *string { diff --git a/internal/sdk/models/operations/createeventgatewaylistenerpolicytlsserver.go b/internal/sdk/models/operations/createeventgatewaylistenerpolicytlsserver.go index 3f265b8e..87d49edc 100644 --- a/internal/sdk/models/operations/createeventgatewaylistenerpolicytlsserver.go +++ b/internal/sdk/models/operations/createeventgatewaylistenerpolicytlsserver.go @@ -11,7 +11,7 @@ type CreateEventGatewayListenerPolicyTLSServerRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // Determines the id of the existing policy the new policy should be inserted before. Either 'before' or 'after' can be provided, when both are omitted the new policy is added to the end of the chain. When both are provided, the request fails with a 400 Bad Request. // Before *string `queryParam:"style=form,explode=true,name=before"` @@ -28,11 +28,11 @@ func (c *CreateEventGatewayListenerPolicyTLSServerRequest) GetGatewayID() string return c.GatewayID } -func (c *CreateEventGatewayListenerPolicyTLSServerRequest) GetEventGatewayListenerID() string { +func (c *CreateEventGatewayListenerPolicyTLSServerRequest) GetListenerID() string { if c == nil { return "" } - return c.EventGatewayListenerID + return c.ListenerID } func (c *CreateEventGatewayListenerPolicyTLSServerRequest) GetBefore() *string { diff --git a/internal/sdk/models/operations/deleteaddon.go b/internal/sdk/models/operations/deleteaddon.go new file mode 100644 index 00000000..5d27212e --- /dev/null +++ b/internal/sdk/models/operations/deleteaddon.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/shared" + "net/http" +) + +var DeleteAddOnServerList = []string{ + "https://global.api.konghq.com/", +} + +type DeleteAddOnRequest struct { + // ID of the add-on to operate on. + AddOnID string `pathParam:"style=simple,explode=false,name=addOnId"` +} + +func (d *DeleteAddOnRequest) GetAddOnID() string { + if d == nil { + return "" + } + return d.AddOnID +} + +type DeleteAddOnResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Bad Request + BadRequestError *shared.BadRequestError + // Unauthorized + UnauthorizedError *shared.UnauthorizedError + // Forbidden + ForbiddenError *shared.ForbiddenError + // Not Found + NotFoundError *shared.NotFoundError +} + +func (d *DeleteAddOnResponse) GetContentType() string { + if d == nil { + return "" + } + return d.ContentType +} + +func (d *DeleteAddOnResponse) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} + +func (d *DeleteAddOnResponse) GetRawResponse() *http.Response { + if d == nil { + return nil + } + return d.RawResponse +} + +func (d *DeleteAddOnResponse) GetBadRequestError() *shared.BadRequestError { + if d == nil { + return nil + } + return d.BadRequestError +} + +func (d *DeleteAddOnResponse) GetUnauthorizedError() *shared.UnauthorizedError { + if d == nil { + return nil + } + return d.UnauthorizedError +} + +func (d *DeleteAddOnResponse) GetForbiddenError() *shared.ForbiddenError { + if d == nil { + return nil + } + return d.ForbiddenError +} + +func (d *DeleteAddOnResponse) GetNotFoundError() *shared.NotFoundError { + if d == nil { + return nil + } + return d.NotFoundError +} diff --git a/internal/sdk/models/operations/deleteeventgatewaylistenerpolicyforwardtovirtualcluster.go b/internal/sdk/models/operations/deleteeventgatewaylistenerpolicyforwardtovirtualcluster.go index b68449a5..ccff64cf 100644 --- a/internal/sdk/models/operations/deleteeventgatewaylistenerpolicyforwardtovirtualcluster.go +++ b/internal/sdk/models/operations/deleteeventgatewaylistenerpolicyforwardtovirtualcluster.go @@ -11,7 +11,7 @@ type DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` } @@ -23,11 +23,11 @@ func (d *DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetGate return d.GatewayID } -func (d *DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetEventGatewayListenerID() string { +func (d *DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetListenerID() string { if d == nil { return "" } - return d.EventGatewayListenerID + return d.ListenerID } func (d *DeleteEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetPolicyID() string { diff --git a/internal/sdk/models/operations/deleteeventgatewaylistenerpolicytlsserver.go b/internal/sdk/models/operations/deleteeventgatewaylistenerpolicytlsserver.go index df0f8e07..95f6211f 100644 --- a/internal/sdk/models/operations/deleteeventgatewaylistenerpolicytlsserver.go +++ b/internal/sdk/models/operations/deleteeventgatewaylistenerpolicytlsserver.go @@ -11,7 +11,7 @@ type DeleteEventGatewayListenerPolicyTLSServerRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` } @@ -23,11 +23,11 @@ func (d *DeleteEventGatewayListenerPolicyTLSServerRequest) GetGatewayID() string return d.GatewayID } -func (d *DeleteEventGatewayListenerPolicyTLSServerRequest) GetEventGatewayListenerID() string { +func (d *DeleteEventGatewayListenerPolicyTLSServerRequest) GetListenerID() string { if d == nil { return "" } - return d.EventGatewayListenerID + return d.ListenerID } func (d *DeleteEventGatewayListenerPolicyTLSServerRequest) GetPolicyID() string { diff --git a/internal/sdk/models/operations/getaddon.go b/internal/sdk/models/operations/getaddon.go new file mode 100644 index 00000000..f23b3ef5 --- /dev/null +++ b/internal/sdk/models/operations/getaddon.go @@ -0,0 +1,90 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/models/shared" + "net/http" +) + +var GetAddOnServerList = []string{ + "https://global.api.konghq.com/", +} + +type GetAddOnRequest struct { + // ID of the add-on to operate on. + AddOnID string `pathParam:"style=simple,explode=false,name=addOnId"` +} + +func (g *GetAddOnRequest) GetAddOnID() string { + if g == nil { + return "" + } + return g.AddOnID +} + +type GetAddOnResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response + // Response format for retrieving an add-on by ID. + AddOnResponse *shared.AddOnResponse + // Unauthorized + UnauthorizedError *shared.UnauthorizedError + // Forbidden + ForbiddenError *shared.ForbiddenError + // Not Found + NotFoundError *shared.NotFoundError +} + +func (g *GetAddOnResponse) GetContentType() string { + if g == nil { + return "" + } + return g.ContentType +} + +func (g *GetAddOnResponse) GetStatusCode() int { + if g == nil { + return 0 + } + return g.StatusCode +} + +func (g *GetAddOnResponse) GetRawResponse() *http.Response { + if g == nil { + return nil + } + return g.RawResponse +} + +func (g *GetAddOnResponse) GetAddOnResponse() *shared.AddOnResponse { + if g == nil { + return nil + } + return g.AddOnResponse +} + +func (g *GetAddOnResponse) GetUnauthorizedError() *shared.UnauthorizedError { + if g == nil { + return nil + } + return g.UnauthorizedError +} + +func (g *GetAddOnResponse) GetForbiddenError() *shared.ForbiddenError { + if g == nil { + return nil + } + return g.ForbiddenError +} + +func (g *GetAddOnResponse) GetNotFoundError() *shared.NotFoundError { + if g == nil { + return nil + } + return g.NotFoundError +} diff --git a/internal/sdk/models/operations/geteventgatewaylistenerpolicyforwardtovirtualcluster.go b/internal/sdk/models/operations/geteventgatewaylistenerpolicyforwardtovirtualcluster.go index e3713e3c..2910ba52 100644 --- a/internal/sdk/models/operations/geteventgatewaylistenerpolicyforwardtovirtualcluster.go +++ b/internal/sdk/models/operations/geteventgatewaylistenerpolicyforwardtovirtualcluster.go @@ -11,7 +11,7 @@ type GetEventGatewayListenerPolicyForwardToVirtualClusterRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` } @@ -23,11 +23,11 @@ func (g *GetEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetGateway return g.GatewayID } -func (g *GetEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetEventGatewayListenerID() string { +func (g *GetEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetListenerID() string { if g == nil { return "" } - return g.EventGatewayListenerID + return g.ListenerID } func (g *GetEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetPolicyID() string { diff --git a/internal/sdk/models/operations/geteventgatewaylistenerpolicytlsserver.go b/internal/sdk/models/operations/geteventgatewaylistenerpolicytlsserver.go index 1a596f2e..c95cd6d0 100644 --- a/internal/sdk/models/operations/geteventgatewaylistenerpolicytlsserver.go +++ b/internal/sdk/models/operations/geteventgatewaylistenerpolicytlsserver.go @@ -11,7 +11,7 @@ type GetEventGatewayListenerPolicyTLSServerRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` } @@ -23,11 +23,11 @@ func (g *GetEventGatewayListenerPolicyTLSServerRequest) GetGatewayID() string { return g.GatewayID } -func (g *GetEventGatewayListenerPolicyTLSServerRequest) GetEventGatewayListenerID() string { +func (g *GetEventGatewayListenerPolicyTLSServerRequest) GetListenerID() string { if g == nil { return "" } - return g.EventGatewayListenerID + return g.ListenerID } func (g *GetEventGatewayListenerPolicyTLSServerRequest) GetPolicyID() string { diff --git a/internal/sdk/models/operations/updateeventgatewaylistenerpolicyforwardtovirtualcluster.go b/internal/sdk/models/operations/updateeventgatewaylistenerpolicyforwardtovirtualcluster.go index dcc0eebc..3b34a930 100644 --- a/internal/sdk/models/operations/updateeventgatewaylistenerpolicyforwardtovirtualcluster.go +++ b/internal/sdk/models/operations/updateeventgatewaylistenerpolicyforwardtovirtualcluster.go @@ -11,7 +11,7 @@ type UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` ForwardToVirtualClusterPolicy *shared.ForwardToVirtualClusterPolicy `request:"mediaType=application/json"` @@ -24,11 +24,11 @@ func (u *UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetGate return u.GatewayID } -func (u *UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetEventGatewayListenerID() string { +func (u *UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetListenerID() string { if u == nil { return "" } - return u.EventGatewayListenerID + return u.ListenerID } func (u *UpdateEventGatewayListenerPolicyForwardToVirtualClusterRequest) GetPolicyID() string { diff --git a/internal/sdk/models/operations/updateeventgatewaylistenerpolicytlsserver.go b/internal/sdk/models/operations/updateeventgatewaylistenerpolicytlsserver.go index 2374cb81..3b550509 100644 --- a/internal/sdk/models/operations/updateeventgatewaylistenerpolicytlsserver.go +++ b/internal/sdk/models/operations/updateeventgatewaylistenerpolicytlsserver.go @@ -11,7 +11,7 @@ type UpdateEventGatewayListenerPolicyTLSServerRequest struct { // The UUID of your Gateway. GatewayID string `pathParam:"style=simple,explode=false,name=gatewayId"` // The ID of the Event Gateway Listener. - EventGatewayListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` + ListenerID string `pathParam:"style=simple,explode=false,name=eventGatewayListenerId"` // The UUID of the policy. PolicyID string `pathParam:"style=simple,explode=false,name=policyId"` EventGatewayTLSListenerSensitiveDataAwarePolicy *shared.EventGatewayTLSListenerSensitiveDataAwarePolicy `request:"mediaType=application/json"` @@ -24,11 +24,11 @@ func (u *UpdateEventGatewayListenerPolicyTLSServerRequest) GetGatewayID() string return u.GatewayID } -func (u *UpdateEventGatewayListenerPolicyTLSServerRequest) GetEventGatewayListenerID() string { +func (u *UpdateEventGatewayListenerPolicyTLSServerRequest) GetListenerID() string { if u == nil { return "" } - return u.EventGatewayListenerID + return u.ListenerID } func (u *UpdateEventGatewayListenerPolicyTLSServerRequest) GetPolicyID() string { diff --git a/internal/sdk/models/shared/addonconfigresponse.go b/internal/sdk/models/shared/addonconfigresponse.go new file mode 100644 index 00000000..06d5304e --- /dev/null +++ b/internal/sdk/models/shared/addonconfigresponse.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +type AddOnConfigResponseType string + +const ( + AddOnConfigResponseTypeManagedCacheAddOnConfigResponse AddOnConfigResponseType = "ManagedCacheAddOnConfigResponse" +) + +// AddOnConfigResponse - Configuration object for different types of add-ons. +type AddOnConfigResponse struct { + ManagedCacheAddOnConfigResponse *ManagedCacheAddOnConfigResponse `queryParam:"inline,name=AddOnConfigResponse" union:"member"` + + Type AddOnConfigResponseType +} + +func CreateAddOnConfigResponseManagedCacheAddOnConfigResponse(managedCacheAddOnConfigResponse ManagedCacheAddOnConfigResponse) AddOnConfigResponse { + typ := AddOnConfigResponseTypeManagedCacheAddOnConfigResponse + + return AddOnConfigResponse{ + ManagedCacheAddOnConfigResponse: &managedCacheAddOnConfigResponse, + Type: typ, + } +} + +func (u *AddOnConfigResponse) UnmarshalJSON(data []byte) error { + + var candidates []utils.UnionCandidate + + // Collect all valid candidates + var managedCacheAddOnConfigResponse ManagedCacheAddOnConfigResponse = ManagedCacheAddOnConfigResponse{} + if err := utils.UnmarshalJSON(data, &managedCacheAddOnConfigResponse, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: AddOnConfigResponseTypeManagedCacheAddOnConfigResponse, + Value: &managedCacheAddOnConfigResponse, + }) + } + + if len(candidates) == 0 { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnConfigResponse", string(data)) + } + + // Pick the best candidate using multi-stage filtering + best := utils.PickBestUnionCandidate(candidates, data) + if best == nil { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnConfigResponse", string(data)) + } + + // Set the union type and value based on the best candidate + u.Type = best.Type.(AddOnConfigResponseType) + switch best.Type { + case AddOnConfigResponseTypeManagedCacheAddOnConfigResponse: + u.ManagedCacheAddOnConfigResponse = best.Value.(*ManagedCacheAddOnConfigResponse) + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnConfigResponse", string(data)) +} + +func (u AddOnConfigResponse) MarshalJSON() ([]byte, error) { + if u.ManagedCacheAddOnConfigResponse != nil { + return utils.MarshalJSON(u.ManagedCacheAddOnConfigResponse, "", true) + } + + return nil, errors.New("could not marshal union type AddOnConfigResponse: all fields are null") +} diff --git a/internal/sdk/models/shared/addonowner.go b/internal/sdk/models/shared/addonowner.go new file mode 100644 index 00000000..4c0ab4cb --- /dev/null +++ b/internal/sdk/models/shared/addonowner.go @@ -0,0 +1,99 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +type AddOnOwnerType string + +const ( + AddOnOwnerTypeControlPlane AddOnOwnerType = "control_plane" + AddOnOwnerTypeControlPlaneGroup AddOnOwnerType = "control_plane_group" +) + +// AddOnOwner - Owner for the add-on. +type AddOnOwner struct { + ControlPlane *ControlPlane `queryParam:"inline,name=AddOnOwner" union:"member"` + ControlPlaneGroup *ControlPlaneGroup `queryParam:"inline,name=AddOnOwner" union:"member"` + + Type AddOnOwnerType +} + +func CreateAddOnOwnerControlPlane(controlPlane ControlPlane) AddOnOwner { + typ := AddOnOwnerTypeControlPlane + + return AddOnOwner{ + ControlPlane: &controlPlane, + Type: typ, + } +} + +func CreateAddOnOwnerControlPlaneGroup(controlPlaneGroup ControlPlaneGroup) AddOnOwner { + typ := AddOnOwnerTypeControlPlaneGroup + + return AddOnOwner{ + ControlPlaneGroup: &controlPlaneGroup, + Type: typ, + } +} + +func (u *AddOnOwner) UnmarshalJSON(data []byte) error { + + var candidates []utils.UnionCandidate + + // Collect all valid candidates + var controlPlane ControlPlane = ControlPlane{} + if err := utils.UnmarshalJSON(data, &controlPlane, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: AddOnOwnerTypeControlPlane, + Value: &controlPlane, + }) + } + + var controlPlaneGroup ControlPlaneGroup = ControlPlaneGroup{} + if err := utils.UnmarshalJSON(data, &controlPlaneGroup, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: AddOnOwnerTypeControlPlaneGroup, + Value: &controlPlaneGroup, + }) + } + + if len(candidates) == 0 { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnOwner", string(data)) + } + + // Pick the best candidate using multi-stage filtering + best := utils.PickBestUnionCandidate(candidates, data) + if best == nil { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnOwner", string(data)) + } + + // Set the union type and value based on the best candidate + u.Type = best.Type.(AddOnOwnerType) + switch best.Type { + case AddOnOwnerTypeControlPlane: + u.ControlPlane = best.Value.(*ControlPlane) + return nil + case AddOnOwnerTypeControlPlaneGroup: + u.ControlPlaneGroup = best.Value.(*ControlPlaneGroup) + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for AddOnOwner", string(data)) +} + +func (u AddOnOwner) MarshalJSON() ([]byte, error) { + if u.ControlPlane != nil { + return utils.MarshalJSON(u.ControlPlane, "", true) + } + + if u.ControlPlaneGroup != nil { + return utils.MarshalJSON(u.ControlPlaneGroup, "", true) + } + + return nil, errors.New("could not marshal union type AddOnOwner: all fields are null") +} diff --git a/internal/sdk/models/shared/addonresponse.go b/internal/sdk/models/shared/addonresponse.go new file mode 100644 index 00000000..0101efcf --- /dev/null +++ b/internal/sdk/models/shared/addonresponse.go @@ -0,0 +1,98 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" + "time" +) + +// AddOnResponse - Object containing information about an add-on. +type AddOnResponse struct { + ID string `json:"id"` + // Unique human-readable name of the add-on. + Name string `json:"name"` + // Owner for the add-on. + Owner AddOnOwner `json:"owner"` + // Configuration object for different types of add-ons. + Config AddOnConfigResponse `json:"config"` + // Monotonically-increasing version count of the add-on, to indicate the order of updates to the add-on. + EntityVersion int64 `json:"entity_version"` + // The current state of the add-on. Possible values: + // - `initializing` - The add-on is in the process of being initialized/updated. + // - `ready` - The add-on is fully operational. + // - `terminating` - The add-on is in the process of being deleted. + // + State AddOnState `json:"state"` + // RFC-3339 timestamp representation of add-on creation date. + CreatedAt time.Time `json:"created_at"` + // RFC-3339 timestamp representation of add-on update date. + UpdatedAt time.Time `json:"updated_at"` +} + +func (a AddOnResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AddOnResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { + return err + } + return nil +} + +func (a *AddOnResponse) GetID() string { + if a == nil { + return "" + } + return a.ID +} + +func (a *AddOnResponse) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AddOnResponse) GetOwner() AddOnOwner { + if a == nil { + return AddOnOwner{} + } + return a.Owner +} + +func (a *AddOnResponse) GetConfig() AddOnConfigResponse { + if a == nil { + return AddOnConfigResponse{} + } + return a.Config +} + +func (a *AddOnResponse) GetEntityVersion() int64 { + if a == nil { + return 0 + } + return a.EntityVersion +} + +func (a *AddOnResponse) GetState() AddOnState { + if a == nil { + return AddOnState("") + } + return a.State +} + +func (a *AddOnResponse) GetCreatedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CreatedAt +} + +func (a *AddOnResponse) GetUpdatedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.UpdatedAt +} diff --git a/internal/sdk/models/shared/addonstate.go b/internal/sdk/models/shared/addonstate.go new file mode 100644 index 00000000..709a7876 --- /dev/null +++ b/internal/sdk/models/shared/addonstate.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +// AddOnState - The current state of the add-on. Possible values: +// - `initializing` - The add-on is in the process of being initialized/updated. +// - `ready` - The add-on is fully operational. +// - `terminating` - The add-on is in the process of being deleted. +type AddOnState string + +const ( + AddOnStateInitializing AddOnState = "initializing" + AddOnStateReady AddOnState = "ready" + AddOnStateTerminating AddOnState = "terminating" +) + +func (e AddOnState) ToPointer() *AddOnState { + return &e +} +func (e *AddOnState) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "initializing": + fallthrough + case "ready": + fallthrough + case "terminating": + *e = AddOnState(v) + return nil + default: + return fmt.Errorf("invalid value for AddOnState: %v", v) + } +} diff --git a/internal/sdk/models/shared/advancedmetrics.go b/internal/sdk/models/shared/advancedmetrics.go index 40eaacc6..207edca3 100644 --- a/internal/sdk/models/shared/advancedmetrics.go +++ b/internal/sdk/models/shared/advancedmetrics.go @@ -10,6 +10,7 @@ import ( type AdvancedMetrics string const ( + AdvancedMetricsErrorRate AdvancedMetrics = "error_rate" AdvancedMetricsKongLatencyAverage AdvancedMetrics = "kong_latency_average" AdvancedMetricsKongLatencyP50 AdvancedMetrics = "kong_latency_p50" AdvancedMetricsKongLatencyP95 AdvancedMetrics = "kong_latency_p95" @@ -45,6 +46,8 @@ func (e *AdvancedMetrics) UnmarshalJSON(data []byte) error { return err } switch v { + case "error_rate": + fallthrough case "kong_latency_average": fallthrough case "kong_latency_p50": diff --git a/internal/sdk/models/shared/client.go b/internal/sdk/models/shared/client.go index db77917f..12095d0b 100644 --- a/internal/sdk/models/shared/client.go +++ b/internal/sdk/models/shared/client.go @@ -23,6 +23,8 @@ type Client struct { AccessTokenDuration *int64 `default:"300" json:"access_token_duration"` // The duration of the minted token is valid for, in seconds IDTokenDuration *int64 `default:"300" json:"id_token_duration"` + // The duration of the minted refresh token is valid for, in seconds + RefreshTokenDuration *int64 `default:"2592000" json:"refresh_token_duration"` // Specifies whether the client is allowed to request all scopes AllowAllScopes *bool `default:"false" json:"allow_all_scopes"` // Specifies the scopes IDs that the client is allowed to request @@ -102,6 +104,13 @@ func (c *Client) GetIDTokenDuration() *int64 { return c.IDTokenDuration } +func (c *Client) GetRefreshTokenDuration() *int64 { + if c == nil { + return nil + } + return c.RefreshTokenDuration +} + func (c *Client) GetAllowAllScopes() *bool { if c == nil { return nil diff --git a/internal/sdk/models/shared/controlplane.go b/internal/sdk/models/shared/controlplane.go new file mode 100644 index 00000000..e817e8cd --- /dev/null +++ b/internal/sdk/models/shared/controlplane.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// ControlPlane - Control Plane is the owner for the add-on. +type ControlPlane struct { + // Type of owner for the add-on. + kind string `const:"control-plane" json:"kind"` + // ID of the control-plane that owns this add-on. + ControlPlaneID string `json:"control_plane_id"` + // Set of control-plane geos supported for deploying cloud-gateways configurations. + ControlPlaneGeo ControlPlaneGeo `json:"control_plane_geo"` +} + +func (c ControlPlane) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ControlPlane) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *ControlPlane) GetKind() string { + return "control-plane" +} + +func (c *ControlPlane) GetControlPlaneID() string { + if c == nil { + return "" + } + return c.ControlPlaneID +} + +func (c *ControlPlane) GetControlPlaneGeo() ControlPlaneGeo { + if c == nil { + return ControlPlaneGeo("") + } + return c.ControlPlaneGeo +} diff --git a/internal/sdk/models/shared/controlplanegeo.go b/internal/sdk/models/shared/controlplanegeo.go new file mode 100644 index 00000000..4a915bcb --- /dev/null +++ b/internal/sdk/models/shared/controlplanegeo.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +// ControlPlaneGeo - Set of control-plane geos supported for deploying cloud-gateways configurations. +type ControlPlaneGeo string + +const ( + ControlPlaneGeoUs ControlPlaneGeo = "us" + ControlPlaneGeoEu ControlPlaneGeo = "eu" + ControlPlaneGeoAu ControlPlaneGeo = "au" + ControlPlaneGeoMe ControlPlaneGeo = "me" + ControlPlaneGeoIn ControlPlaneGeo = "in" + ControlPlaneGeoSg ControlPlaneGeo = "sg" +) + +func (e ControlPlaneGeo) ToPointer() *ControlPlaneGeo { + return &e +} +func (e *ControlPlaneGeo) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "us": + fallthrough + case "eu": + fallthrough + case "au": + fallthrough + case "me": + fallthrough + case "in": + fallthrough + case "sg": + *e = ControlPlaneGeo(v) + return nil + default: + return fmt.Errorf("invalid value for ControlPlaneGeo: %v", v) + } +} diff --git a/internal/sdk/models/shared/controlplanegroup.go b/internal/sdk/models/shared/controlplanegroup.go new file mode 100644 index 00000000..13305011 --- /dev/null +++ b/internal/sdk/models/shared/controlplanegroup.go @@ -0,0 +1,46 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// ControlPlaneGroup - Control Plane Group is the owner for the add-on. +type ControlPlaneGroup struct { + // Type of owner for the add-on. + kind string `const:"control-plane-group" json:"kind"` + // ID of the control-plane group that owns this add-on. + ControlPlaneGroupID string `json:"control_plane_group_id"` + // Set of control-plane geos supported for deploying cloud-gateways configurations. + ControlPlaneGroupGeo ControlPlaneGeo `json:"control_plane_group_geo"` +} + +func (c ControlPlaneGroup) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *ControlPlaneGroup) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *ControlPlaneGroup) GetKind() string { + return "control-plane-group" +} + +func (c *ControlPlaneGroup) GetControlPlaneGroupID() string { + if c == nil { + return "" + } + return c.ControlPlaneGroupID +} + +func (c *ControlPlaneGroup) GetControlPlaneGroupGeo() ControlPlaneGeo { + if c == nil { + return ControlPlaneGeo("") + } + return c.ControlPlaneGroupGeo +} diff --git a/internal/sdk/models/shared/createaddonconfig.go b/internal/sdk/models/shared/createaddonconfig.go new file mode 100644 index 00000000..5d5c8b7b --- /dev/null +++ b/internal/sdk/models/shared/createaddonconfig.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +type CreateAddOnConfigType string + +const ( + CreateAddOnConfigTypeManagedCache CreateAddOnConfigType = "managed_cache" +) + +// CreateAddOnConfig - Configuration for creating different types of add-ons. +type CreateAddOnConfig struct { + ManagedCache *ManagedCache `queryParam:"inline,name=CreateAddOnConfig" union:"member"` + + Type CreateAddOnConfigType +} + +func CreateCreateAddOnConfigManagedCache(managedCache ManagedCache) CreateAddOnConfig { + typ := CreateAddOnConfigTypeManagedCache + + return CreateAddOnConfig{ + ManagedCache: &managedCache, + Type: typ, + } +} + +func (u *CreateAddOnConfig) UnmarshalJSON(data []byte) error { + + var candidates []utils.UnionCandidate + + // Collect all valid candidates + var managedCache ManagedCache = ManagedCache{} + if err := utils.UnmarshalJSON(data, &managedCache, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: CreateAddOnConfigTypeManagedCache, + Value: &managedCache, + }) + } + + if len(candidates) == 0 { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateAddOnConfig", string(data)) + } + + // Pick the best candidate using multi-stage filtering + best := utils.PickBestUnionCandidate(candidates, data) + if best == nil { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateAddOnConfig", string(data)) + } + + // Set the union type and value based on the best candidate + u.Type = best.Type.(CreateAddOnConfigType) + switch best.Type { + case CreateAddOnConfigTypeManagedCache: + u.ManagedCache = best.Value.(*ManagedCache) + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for CreateAddOnConfig", string(data)) +} + +func (u CreateAddOnConfig) MarshalJSON() ([]byte, error) { + if u.ManagedCache != nil { + return utils.MarshalJSON(u.ManagedCache, "", true) + } + + return nil, errors.New("could not marshal union type CreateAddOnConfig: all fields are null") +} diff --git a/internal/sdk/models/shared/createaddonrequest.go b/internal/sdk/models/shared/createaddonrequest.go new file mode 100644 index 00000000..71176eda --- /dev/null +++ b/internal/sdk/models/shared/createaddonrequest.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +// CreateAddOnRequest - Request schema for creating an add-on. +type CreateAddOnRequest struct { + // Unique human-readable name of the add-on. + Name string `json:"name"` + // Owner for the add-on. + Owner AddOnOwner `json:"owner"` + // Configuration for creating different types of add-ons. + Config CreateAddOnConfig `json:"config"` +} + +func (c *CreateAddOnRequest) GetName() string { + if c == nil { + return "" + } + return c.Name +} + +func (c *CreateAddOnRequest) GetOwner() AddOnOwner { + if c == nil { + return AddOnOwner{} + } + return c.Owner +} + +func (c *CreateAddOnRequest) GetConfig() CreateAddOnConfig { + if c == nil { + return CreateAddOnConfig{} + } + return c.Config +} diff --git a/internal/sdk/models/shared/createbackendclusterrequest.go b/internal/sdk/models/shared/createbackendclusterrequest.go index 5eef4816..189f595d 100644 --- a/internal/sdk/models/shared/createbackendclusterrequest.go +++ b/internal/sdk/models/shared/createbackendclusterrequest.go @@ -10,7 +10,7 @@ import ( type CreateBackendClusterRequest struct { // The unique name of the backend cluster. Name string `json:"name"` - // A human-readable description of the virtual cluster. + // A human-readable description of the backend cluster. Description *string `default:"" json:"description"` Authentication BackendClusterAuthenticationScheme `json:"authentication"` // If true, virtual clusters can have allow anonymous authentication and use this backend cluster. diff --git a/internal/sdk/models/shared/createclient.go b/internal/sdk/models/shared/createclient.go index 286adfa7..38e586bd 100644 --- a/internal/sdk/models/shared/createclient.go +++ b/internal/sdk/models/shared/createclient.go @@ -22,6 +22,8 @@ type CreateClient struct { AccessTokenDuration *int64 `default:"300" json:"access_token_duration"` // The duration of the minted token is valid for, in seconds IDTokenDuration *int64 `default:"300" json:"id_token_duration"` + // The duration of the minted refresh token is valid for, in seconds + RefreshTokenDuration *int64 `default:"2592000" json:"refresh_token_duration"` // Specifies whether the client is allowed to request all scopes AllowAllScopes *bool `default:"false" json:"allow_all_scopes"` // Specifies the scopes IDs that the client is allowed to request @@ -99,6 +101,13 @@ func (c *CreateClient) GetIDTokenDuration() *int64 { return c.IDTokenDuration } +func (c *CreateClient) GetRefreshTokenDuration() *int64 { + if c == nil { + return nil + } + return c.RefreshTokenDuration +} + func (c *CreateClient) GetAllowAllScopes() *bool { if c == nil { return nil diff --git a/internal/sdk/models/shared/createdclient.go b/internal/sdk/models/shared/createdclient.go index efc83617..efa14c47 100644 --- a/internal/sdk/models/shared/createdclient.go +++ b/internal/sdk/models/shared/createdclient.go @@ -22,6 +22,8 @@ type CreatedClient struct { AccessTokenDuration *int64 `default:"300" json:"access_token_duration"` // The duration of the minted token is valid for, in seconds IDTokenDuration *int64 `default:"300" json:"id_token_duration"` + // The duration of the minted refresh token is valid for, in seconds + RefreshTokenDuration *int64 `default:"2592000" json:"refresh_token_duration"` // Specifies whether the client is allowed to request all scopes AllowAllScopes *bool `default:"false" json:"allow_all_scopes"` // Specifies the scopes IDs that the client is allowed to request @@ -103,6 +105,13 @@ func (c *CreatedClient) GetIDTokenDuration() *int64 { return c.IDTokenDuration } +func (c *CreatedClient) GetRefreshTokenDuration() *int64 { + if c == nil { + return nil + } + return c.RefreshTokenDuration +} + func (c *CreatedClient) GetAllowAllScopes() *bool { if c == nil { return nil diff --git a/internal/sdk/models/shared/createeventgatewaylistenerrequest.go b/internal/sdk/models/shared/createeventgatewaylistenerrequest.go index 8294012a..1159733f 100644 --- a/internal/sdk/models/shared/createeventgatewaylistenerrequest.go +++ b/internal/sdk/models/shared/createeventgatewaylistenerrequest.go @@ -10,7 +10,7 @@ import ( type CreateEventGatewayListenerRequest struct { // The unique name of the listener. Name string `json:"name"` - // A human-readable description of the virtual cluster. + // A human-readable description of the listener. Description *string `default:"" json:"description"` // Which address or addresses to listen on. // `0.0.0.0` means all addresses on the host. diff --git a/internal/sdk/models/shared/encryptionkeystatic.go b/internal/sdk/models/shared/encryptionkeystatic.go index 93096fe0..13c247ca 100644 --- a/internal/sdk/models/shared/encryptionkeystatic.go +++ b/internal/sdk/models/shared/encryptionkeystatic.go @@ -9,8 +9,7 @@ import ( // EncryptionKeyStatic - A static encryption key. type EncryptionKeyStatic struct { type_ string `const:"static" json:"type"` - // A static encryption key reference, either by ID or by value. - // + // A static encryption key reference by ID. Key EncryptionKeyStaticReference `json:"key"` } diff --git a/internal/sdk/models/shared/encryptionkeystaticreference.go b/internal/sdk/models/shared/encryptionkeystaticreference.go index 1fbab142..630ec4ae 100644 --- a/internal/sdk/models/shared/encryptionkeystaticreference.go +++ b/internal/sdk/models/shared/encryptionkeystaticreference.go @@ -3,97 +3,29 @@ package shared import ( - "errors" - "fmt" "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" ) -type EncryptionKeyStaticReferenceType string - -const ( - EncryptionKeyStaticReferenceTypeReferenceByID EncryptionKeyStaticReferenceType = "ReferenceByID" - EncryptionKeyStaticReferenceTypeReferenceByName EncryptionKeyStaticReferenceType = "ReferenceByName" -) - -// EncryptionKeyStaticReference - A static encryption key reference, either by ID or by value. +// EncryptionKeyStaticReference - A static encryption key reference by ID. type EncryptionKeyStaticReference struct { - ReferenceByID *ReferenceByID `queryParam:"inline,name=EncryptionKeyStaticReference" union:"member"` - ReferenceByName *ReferenceByName `queryParam:"inline,name=EncryptionKeyStaticReference" union:"member"` - - Type EncryptionKeyStaticReferenceType -} - -func CreateEncryptionKeyStaticReferenceReferenceByID(referenceByID ReferenceByID) EncryptionKeyStaticReference { - typ := EncryptionKeyStaticReferenceTypeReferenceByID - - return EncryptionKeyStaticReference{ - ReferenceByID: &referenceByID, - Type: typ, - } + // The ID of the static key defined in the key source. + ID string `json:"id"` } -func CreateEncryptionKeyStaticReferenceReferenceByName(referenceByName ReferenceByName) EncryptionKeyStaticReference { - typ := EncryptionKeyStaticReferenceTypeReferenceByName - - return EncryptionKeyStaticReference{ - ReferenceByName: &referenceByName, - Type: typ, - } +func (e EncryptionKeyStaticReference) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) } -func (u *EncryptionKeyStaticReference) UnmarshalJSON(data []byte) error { - - var candidates []utils.UnionCandidate - - // Collect all valid candidates - var referenceByID ReferenceByID = ReferenceByID{} - if err := utils.UnmarshalJSON(data, &referenceByID, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: EncryptionKeyStaticReferenceTypeReferenceByID, - Value: &referenceByID, - }) +func (e *EncryptionKeyStaticReference) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err } - - var referenceByName ReferenceByName = ReferenceByName{} - if err := utils.UnmarshalJSON(data, &referenceByName, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: EncryptionKeyStaticReferenceTypeReferenceByName, - Value: &referenceByName, - }) - } - - if len(candidates) == 0 { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for EncryptionKeyStaticReference", string(data)) - } - - // Pick the best candidate using multi-stage filtering - best := utils.PickBestUnionCandidate(candidates, data) - if best == nil { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for EncryptionKeyStaticReference", string(data)) - } - - // Set the union type and value based on the best candidate - u.Type = best.Type.(EncryptionKeyStaticReferenceType) - switch best.Type { - case EncryptionKeyStaticReferenceTypeReferenceByID: - u.ReferenceByID = best.Value.(*ReferenceByID) - return nil - case EncryptionKeyStaticReferenceTypeReferenceByName: - u.ReferenceByName = best.Value.(*ReferenceByName) - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for EncryptionKeyStaticReference", string(data)) + return nil } -func (u EncryptionKeyStaticReference) MarshalJSON() ([]byte, error) { - if u.ReferenceByID != nil { - return utils.MarshalJSON(u.ReferenceByID, "", true) +func (e *EncryptionKeyStaticReference) GetID() string { + if e == nil { + return "" } - - if u.ReferenceByName != nil { - return utils.MarshalJSON(u.ReferenceByName, "", true) - } - - return nil, errors.New("could not marshal union type EncryptionKeyStaticReference: all fields are null") + return e.ID } diff --git a/internal/sdk/models/shared/eventgatewayaclresourcename.go b/internal/sdk/models/shared/eventgatewayaclresourcename.go index e72c80ad..cc47cc5a 100644 --- a/internal/sdk/models/shared/eventgatewayaclresourcename.go +++ b/internal/sdk/models/shared/eventgatewayaclresourcename.go @@ -2,6 +2,10 @@ package shared +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + // EventGatewayACLResourceName - An Event Gateway resource name to match against in an ACL rule. type EventGatewayACLResourceName struct { // Currently supported are exact matches and globs. @@ -10,6 +14,17 @@ type EventGatewayACLResourceName struct { Match string `json:"match"` } +func (e EventGatewayACLResourceName) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *EventGatewayACLResourceName) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err + } + return nil +} + func (e *EventGatewayACLResourceName) GetMatch() string { if e == nil { return "" diff --git a/internal/sdk/models/shared/eventgatewayaclrule.go b/internal/sdk/models/shared/eventgatewayaclrule.go index ded913ca..bfc8614f 100644 --- a/internal/sdk/models/shared/eventgatewayaclrule.go +++ b/internal/sdk/models/shared/eventgatewayaclrule.go @@ -4,7 +4,9 @@ package shared import ( "encoding/json" + "errors" "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" ) // ResourceType - This rule applies to access only for type of resource @@ -67,6 +69,96 @@ func (e *Action) UnmarshalJSON(data []byte) error { } } +type ResourceNamesType string + +const ( + ResourceNamesTypeArrayOfEventGatewayACLResourceName ResourceNamesType = "arrayOfEventGatewayACLResourceName" + ResourceNamesTypeStr ResourceNamesType = "str" +) + +// ResourceNames - If any of these entries match, the resource name matches for this rule. A maximum of 50 entries are allowed. +type ResourceNames struct { + ArrayOfEventGatewayACLResourceName []EventGatewayACLResourceName `queryParam:"inline,name=resource_names" union:"member"` + Str *string `queryParam:"inline,name=resource_names" union:"member"` + + Type ResourceNamesType +} + +func CreateResourceNamesArrayOfEventGatewayACLResourceName(arrayOfEventGatewayACLResourceName []EventGatewayACLResourceName) ResourceNames { + typ := ResourceNamesTypeArrayOfEventGatewayACLResourceName + + return ResourceNames{ + ArrayOfEventGatewayACLResourceName: arrayOfEventGatewayACLResourceName, + Type: typ, + } +} + +func CreateResourceNamesStr(str string) ResourceNames { + typ := ResourceNamesTypeStr + + return ResourceNames{ + Str: &str, + Type: typ, + } +} + +func (u *ResourceNames) UnmarshalJSON(data []byte) error { + + var candidates []utils.UnionCandidate + + // Collect all valid candidates + var arrayOfEventGatewayACLResourceName []EventGatewayACLResourceName = []EventGatewayACLResourceName{} + if err := utils.UnmarshalJSON(data, &arrayOfEventGatewayACLResourceName, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: ResourceNamesTypeArrayOfEventGatewayACLResourceName, + Value: arrayOfEventGatewayACLResourceName, + }) + } + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: ResourceNamesTypeStr, + Value: &str, + }) + } + + if len(candidates) == 0 { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResourceNames", string(data)) + } + + // Pick the best candidate using multi-stage filtering + best := utils.PickBestUnionCandidate(candidates, data) + if best == nil { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResourceNames", string(data)) + } + + // Set the union type and value based on the best candidate + u.Type = best.Type.(ResourceNamesType) + switch best.Type { + case ResourceNamesTypeArrayOfEventGatewayACLResourceName: + u.ArrayOfEventGatewayACLResourceName = best.Value.([]EventGatewayACLResourceName) + return nil + case ResourceNamesTypeStr: + u.Str = best.Value.(*string) + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ResourceNames", string(data)) +} + +func (u ResourceNames) MarshalJSON() ([]byte, error) { + if u.ArrayOfEventGatewayACLResourceName != nil { + return utils.MarshalJSON(u.ArrayOfEventGatewayACLResourceName, "", true) + } + + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + return nil, errors.New("could not marshal union type ResourceNames: all fields are null") +} + // EventGatewayACLRule - A Kafka ACL rule to apply to virtual cluster traffic type EventGatewayACLRule struct { // This rule applies to access only for type of resource @@ -75,8 +167,8 @@ type EventGatewayACLRule struct { Action Action `json:"action"` // Types of Kafka operations to match against. Note that not every operation can apply to every resource type. Operations []EventGatewayACLOperation `json:"operations"` - // If any of these entries match, the resource name matches for this rule. - ResourceNames []EventGatewayACLResourceName `json:"resource_names"` + // If any of these entries match, the resource name matches for this rule. A maximum of 50 entries are allowed. + ResourceNames ResourceNames `json:"resource_names"` } func (e *EventGatewayACLRule) GetResourceType() ResourceType { @@ -100,9 +192,9 @@ func (e *EventGatewayACLRule) GetOperations() []EventGatewayACLOperation { return e.Operations } -func (e *EventGatewayACLRule) GetResourceNames() []EventGatewayACLResourceName { +func (e *EventGatewayACLRule) GetResourceNames() ResourceNames { if e == nil { - return []EventGatewayACLResourceName{} + return ResourceNames{} } return e.ResourceNames } diff --git a/internal/sdk/models/shared/eventgatewayaclspolicy.go b/internal/sdk/models/shared/eventgatewayaclspolicy.go index a3e5511a..fb97c09d 100644 --- a/internal/sdk/models/shared/eventgatewayaclspolicy.go +++ b/internal/sdk/models/shared/eventgatewayaclspolicy.go @@ -11,7 +11,7 @@ type EventGatewayACLsPolicy struct { // The type name of the policy. type_ string `const:"acls" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayconsumeschemavalidationpolicy.go b/internal/sdk/models/shared/eventgatewayconsumeschemavalidationpolicy.go index a2ea9562..af383767 100644 --- a/internal/sdk/models/shared/eventgatewayconsumeschemavalidationpolicy.go +++ b/internal/sdk/models/shared/eventgatewayconsumeschemavalidationpolicy.go @@ -12,8 +12,7 @@ type EventGatewayConsumeSchemaValidationPolicyConfig struct { // * confluent_schema_registry - validates against confluent schema registry. // * json - simple JSON parsing without the schema. // - Type SchemaValidationType `json:"type"` - // A reference to a schema Registry. + Type SchemaValidationType `json:"type"` SchemaRegistry *SchemaRegistryReference `json:"schema_registry,omitempty"` // Defines a behavior when record key is not valid. // * mark - marks a record with kong/server header and client ID value @@ -62,7 +61,7 @@ type EventGatewayConsumeSchemaValidationPolicy struct { // The type name of the policy. type_ string `const:"schema_validation" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaydecryptpolicy.go b/internal/sdk/models/shared/eventgatewaydecryptpolicy.go index 586ae0e6..7a8cfdad 100644 --- a/internal/sdk/models/shared/eventgatewaydecryptpolicy.go +++ b/internal/sdk/models/shared/eventgatewaydecryptpolicy.go @@ -11,7 +11,7 @@ type EventGatewayDecryptPolicy struct { // The type name of the policy. type_ string `const:"decrypt" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayencryptpolicy.go b/internal/sdk/models/shared/eventgatewayencryptpolicy.go index 494cf298..2d87c14b 100644 --- a/internal/sdk/models/shared/eventgatewayencryptpolicy.go +++ b/internal/sdk/models/shared/eventgatewayencryptpolicy.go @@ -11,7 +11,7 @@ type EventGatewayEncryptPolicy struct { // The type name of the policy. type_ string `const:"encrypt" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaylistenerpolicy.go b/internal/sdk/models/shared/eventgatewaylistenerpolicy.go index 8e11ce3f..20b61398 100644 --- a/internal/sdk/models/shared/eventgatewaylistenerpolicy.go +++ b/internal/sdk/models/shared/eventgatewaylistenerpolicy.go @@ -16,7 +16,7 @@ type EventGatewayListenerPolicy struct { // The type name of the policy. Type string `json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaymodifyheaderspolicy.go b/internal/sdk/models/shared/eventgatewaymodifyheaderspolicy.go index aa938c6f..dac6d7c5 100644 --- a/internal/sdk/models/shared/eventgatewaymodifyheaderspolicy.go +++ b/internal/sdk/models/shared/eventgatewaymodifyheaderspolicy.go @@ -24,7 +24,7 @@ type EventGatewayModifyHeadersPolicy struct { // The type name of the policy. type_ string `const:"modify_headers" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaymodifyheaderspolicycreate.go b/internal/sdk/models/shared/eventgatewaymodifyheaderspolicycreate.go index 8abff3c0..ce43e4f0 100644 --- a/internal/sdk/models/shared/eventgatewaymodifyheaderspolicycreate.go +++ b/internal/sdk/models/shared/eventgatewaymodifyheaderspolicycreate.go @@ -24,7 +24,7 @@ type EventGatewayModifyHeadersPolicyCreate struct { // The type name of the policy. type_ string `const:"modify_headers" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaypolicy.go b/internal/sdk/models/shared/eventgatewaypolicy.go index 172b6722..13066018 100644 --- a/internal/sdk/models/shared/eventgatewaypolicy.go +++ b/internal/sdk/models/shared/eventgatewaypolicy.go @@ -16,7 +16,7 @@ type EventGatewayPolicy struct { // The type name of the policy. Type string `json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayproducepolicyschemavalidationtfonly.go b/internal/sdk/models/shared/eventgatewayproducepolicyschemavalidationtfonly.go index 0b7a39f4..b73b3fd9 100644 --- a/internal/sdk/models/shared/eventgatewayproducepolicyschemavalidationtfonly.go +++ b/internal/sdk/models/shared/eventgatewayproducepolicyschemavalidationtfonly.go @@ -16,7 +16,7 @@ type EventGatewayProducePolicySchemaValidationTFOnly struct { // The type name of the policy. Type string `json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicy.go b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicy.go index 19df139d..937572a0 100644 --- a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicy.go +++ b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicy.go @@ -11,7 +11,7 @@ type EventGatewayProduceSchemaValidationPolicy struct { // The type name of the policy. type_ string `const:"schema_validation" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyjsonconfig.go b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyjsonconfig.go index 57918cbf..93a8459d 100644 --- a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyjsonconfig.go +++ b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyjsonconfig.go @@ -8,7 +8,6 @@ import ( // EventGatewayProduceSchemaValidationPolicyJSONConfig - The configuration of the produce schema validation policy when using JSON parsing without schema. type EventGatewayProduceSchemaValidationPolicyJSONConfig struct { - // A reference to a schema Registry. SchemaRegistry *SchemaRegistryReference `json:"schema_registry,omitempty"` // Defines a behavior when record key is not valid. // * reject - rejects a batch for topic partition. Only available for produce. diff --git a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyschemaregistryconfig.go b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyschemaregistryconfig.go index 964c2ea3..f4c32808 100644 --- a/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyschemaregistryconfig.go +++ b/internal/sdk/models/shared/eventgatewayproduceschemavalidationpolicyschemaregistryconfig.go @@ -8,7 +8,6 @@ import ( // EventGatewayProduceSchemaValidationPolicySchemaRegistryConfig - The configuration of the produce schema validation policy when using a schema registry. type EventGatewayProduceSchemaValidationPolicySchemaRegistryConfig struct { - // A reference to a schema Registry. SchemaRegistry *SchemaRegistryReference `json:"schema_registry,omitempty"` // Defines a behavior when record key is not valid. // * reject - rejects a batch for topic partition. Only available for produce. diff --git a/internal/sdk/models/shared/eventgatewayskiprecordpolicy.go b/internal/sdk/models/shared/eventgatewayskiprecordpolicy.go index 3486e0e8..1cbbea8f 100644 --- a/internal/sdk/models/shared/eventgatewayskiprecordpolicy.go +++ b/internal/sdk/models/shared/eventgatewayskiprecordpolicy.go @@ -11,7 +11,7 @@ type EventGatewaySkipRecordPolicy struct { // The type name of the policy. type_ string `const:"skip_record" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewayskiprecordpolicycreate.go b/internal/sdk/models/shared/eventgatewayskiprecordpolicycreate.go index 084d28f8..40869530 100644 --- a/internal/sdk/models/shared/eventgatewayskiprecordpolicycreate.go +++ b/internal/sdk/models/shared/eventgatewayskiprecordpolicycreate.go @@ -11,7 +11,7 @@ type EventGatewaySkipRecordPolicyCreate struct { // The type name of the policy. type_ string `const:"skip_record" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaytlslistenerpolicy.go b/internal/sdk/models/shared/eventgatewaytlslistenerpolicy.go index f0dfea3a..8fce3546 100644 --- a/internal/sdk/models/shared/eventgatewaytlslistenerpolicy.go +++ b/internal/sdk/models/shared/eventgatewaytlslistenerpolicy.go @@ -14,7 +14,7 @@ type EventGatewayTLSListenerPolicy struct { // The type name of the policy. type_ string `const:"tls_server" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/eventgatewaytlslistenersensitivedataawarepolicy.go b/internal/sdk/models/shared/eventgatewaytlslistenersensitivedataawarepolicy.go index 55fa2cf8..44a0a606 100644 --- a/internal/sdk/models/shared/eventgatewaytlslistenersensitivedataawarepolicy.go +++ b/internal/sdk/models/shared/eventgatewaytlslistenersensitivedataawarepolicy.go @@ -14,7 +14,7 @@ type EventGatewayTLSListenerSensitiveDataAwarePolicy struct { // The type name of the policy. type_ string `const:"tls_server" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/forwardtoclusterbyportmappingconfig.go b/internal/sdk/models/shared/forwardtoclusterbyportmappingconfig.go index e90d912c..84e8913c 100644 --- a/internal/sdk/models/shared/forwardtoclusterbyportmappingconfig.go +++ b/internal/sdk/models/shared/forwardtoclusterbyportmappingconfig.go @@ -59,7 +59,7 @@ func (e *BootstrapPort) UnmarshalJSON(data []byte) error { // It is strongly discouraged to use port mapping in production. type ForwardToClusterByPortMappingConfig struct { type_ string `const:"port_mapping" json:"type"` - // A reference to a virtual cluster. + // Reference a virtual cluster by its unique identifier. Destination VirtualClusterReference `json:"destination"` // Virtual brokers are advertised to clients using this host. Any kind of host supported by kafka can be used. If not defined, it's listen_address. If listen_address is `0.0.0.0` it's the destination IP of the TCP connection. AdvertisedHost string `json:"advertised_host"` diff --git a/internal/sdk/models/shared/forwardtovirtualclusterpolicy.go b/internal/sdk/models/shared/forwardtovirtualclusterpolicy.go index b77c087f..8c028eed 100644 --- a/internal/sdk/models/shared/forwardtovirtualclusterpolicy.go +++ b/internal/sdk/models/shared/forwardtovirtualclusterpolicy.go @@ -101,7 +101,7 @@ type ForwardToVirtualClusterPolicy struct { // The type name of the policy. type_ string `const:"forward_to_virtual_cluster" json:"type"` // A unique user-defined name of the policy. - Name *string `default:"null" json:"name"` + Name *string `json:"name,omitempty"` // A human-readable description of the policy. Description *string `default:"" json:"description"` // Whether the policy is enabled. diff --git a/internal/sdk/models/shared/granttype.go b/internal/sdk/models/shared/granttype.go index 37b6d7c7..ce14381d 100644 --- a/internal/sdk/models/shared/granttype.go +++ b/internal/sdk/models/shared/granttype.go @@ -14,6 +14,7 @@ const ( GrantTypeAuthorizationCode GrantType = "authorization_code" GrantTypeImplicit GrantType = "implicit" GrantTypeClientCredentials GrantType = "client_credentials" + GrantTypeRefreshToken GrantType = "refresh_token" ) func (e GrantType) ToPointer() *GrantType { @@ -30,6 +31,8 @@ func (e *GrantType) UnmarshalJSON(data []byte) error { case "implicit": fallthrough case "client_credentials": + fallthrough + case "refresh_token": *e = GrantType(v) return nil default: diff --git a/internal/sdk/models/shared/llmmetrics.go b/internal/sdk/models/shared/llmmetrics.go index f8ac0ba6..a29f1340 100644 --- a/internal/sdk/models/shared/llmmetrics.go +++ b/internal/sdk/models/shared/llmmetrics.go @@ -15,6 +15,7 @@ const ( LLMMetricsCompletionTokens LLMMetrics = "completion_tokens" LLMMetricsAiRequestCount LLMMetrics = "ai_request_count" LLMMetricsCost LLMMetrics = "cost" + LLMMetricsErrorRate LLMMetrics = "error_rate" LLMMetricsLlmCacheEmbeddingsLatencyAverage LLMMetrics = "llm_cache_embeddings_latency_average" LLMMetricsLlmCacheFetchLatencyAverage LLMMetrics = "llm_cache_fetch_latency_average" LLMMetricsLlmLatencyAverage LLMMetrics = "llm_latency_average" @@ -41,6 +42,8 @@ func (e *LLMMetrics) UnmarshalJSON(data []byte) error { fallthrough case "cost": fallthrough + case "error_rate": + fallthrough case "llm_cache_embeddings_latency_average": fallthrough case "llm_cache_fetch_latency_average": diff --git a/internal/sdk/models/shared/managedcache.go b/internal/sdk/models/shared/managedcache.go new file mode 100644 index 00000000..917076f1 --- /dev/null +++ b/internal/sdk/models/shared/managedcache.go @@ -0,0 +1,37 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// ManagedCache - Configuration for creating a managed cache add-on. +type ManagedCache struct { + // Type of add-on configuration. + kind string `const:"managed-cache.v0" json:"kind"` + // Configuration for managed cache capacity and performance characteristics. + CapacityConfig ManagedCacheCapacityConfig `json:"capacity_config"` +} + +func (m ManagedCache) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *ManagedCache) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil { + return err + } + return nil +} + +func (m *ManagedCache) GetKind() string { + return "managed-cache.v0" +} + +func (m *ManagedCache) GetCapacityConfig() ManagedCacheCapacityConfig { + if m == nil { + return ManagedCacheCapacityConfig{} + } + return m.CapacityConfig +} diff --git a/internal/sdk/models/shared/managedcacheaddonconfigresponse.go b/internal/sdk/models/shared/managedcacheaddonconfigresponse.go new file mode 100644 index 00000000..50316d1d --- /dev/null +++ b/internal/sdk/models/shared/managedcacheaddonconfigresponse.go @@ -0,0 +1,186 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// CloudAuthentication - Metadata describing the cloud authentication details for managed cache add-on. +type CloudAuthentication struct { + // Env vault path to cache auth provider. + AuthProvider *string `default:"null" json:"auth_provider"` + // Env vault path to aws cache name. + AwsCacheName *string `default:"null" json:"aws_cache_name"` + // Env vault path to aws region. + AwsRegion *string `default:"null" json:"aws_region"` + // Env vault path to aws assume role arn. + AwsAssumeRoleArn *string `default:"null" json:"aws_assume_role_arn"` + // Env vault path to azure tenant id. + AzureTenantID *string `default:"null" json:"azure_tenant_id"` +} + +func (c CloudAuthentication) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(c, "", false) +} + +func (c *CloudAuthentication) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { + return err + } + return nil +} + +func (c *CloudAuthentication) GetAuthProvider() *string { + if c == nil { + return nil + } + return c.AuthProvider +} + +func (c *CloudAuthentication) GetAwsCacheName() *string { + if c == nil { + return nil + } + return c.AwsCacheName +} + +func (c *CloudAuthentication) GetAwsRegion() *string { + if c == nil { + return nil + } + return c.AwsRegion +} + +func (c *CloudAuthentication) GetAwsAssumeRoleArn() *string { + if c == nil { + return nil + } + return c.AwsAssumeRoleArn +} + +func (c *CloudAuthentication) GetAzureTenantID() *string { + if c == nil { + return nil + } + return c.AzureTenantID +} + +// ManagedCacheAddOnConfigResponseStateMetadata - Metadata describing the state of the managed cache add-on. +type ManagedCacheAddOnConfigResponseStateMetadata struct { + // Reference to cache configuration for this add-on. + CacheConfigID *string `default:"null" json:"cache_config_id"` + // Env vault path to cache server name. + CacheServerName *string `default:"null" json:"cache_server_name"` + // Env vault path to cache hostname. + CacheHost *string `default:"null" json:"cache_host"` + // Env vault path to cache port. + CachePort *string `default:"null" json:"cache_port"` + // Env vault path to cache username. + CacheUsername *string `default:"null" json:"cache_username"` + // Metadata describing the cloud authentication details for managed cache add-on. + // + CloudAuthentication *CloudAuthentication `json:"cloud_authentication"` +} + +func (m ManagedCacheAddOnConfigResponseStateMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil { + return err + } + return nil +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCacheConfigID() *string { + if m == nil { + return nil + } + return m.CacheConfigID +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCacheServerName() *string { + if m == nil { + return nil + } + return m.CacheServerName +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCacheHost() *string { + if m == nil { + return nil + } + return m.CacheHost +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCachePort() *string { + if m == nil { + return nil + } + return m.CachePort +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCacheUsername() *string { + if m == nil { + return nil + } + return m.CacheUsername +} + +func (m *ManagedCacheAddOnConfigResponseStateMetadata) GetCloudAuthentication() *CloudAuthentication { + if m == nil { + return nil + } + return m.CloudAuthentication +} + +// ManagedCacheAddOnConfigResponse - Configuration for managed cache add-on. +type ManagedCacheAddOnConfigResponse struct { + // Type of add-on configuration. + kind string `const:"managed-cache.v0" json:"kind"` + // Configuration for managed cache capacity and performance characteristics. + CapacityConfig ManagedCacheCapacityConfig `json:"capacity_config"` + // List of data-plane groups where the managed cache is deployed. + DataPlaneGroups []ManagedCacheAddOnDataPlaneGroup `json:"data_plane_groups"` + // Metadata describing the state of the managed cache add-on. + // + StateMetadata ManagedCacheAddOnConfigResponseStateMetadata `json:"state_metadata"` +} + +func (m ManagedCacheAddOnConfigResponse) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *ManagedCacheAddOnConfigResponse) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil { + return err + } + return nil +} + +func (m *ManagedCacheAddOnConfigResponse) GetKind() string { + return "managed-cache.v0" +} + +func (m *ManagedCacheAddOnConfigResponse) GetCapacityConfig() ManagedCacheCapacityConfig { + if m == nil { + return ManagedCacheCapacityConfig{} + } + return m.CapacityConfig +} + +func (m *ManagedCacheAddOnConfigResponse) GetDataPlaneGroups() []ManagedCacheAddOnDataPlaneGroup { + if m == nil { + return []ManagedCacheAddOnDataPlaneGroup{} + } + return m.DataPlaneGroups +} + +func (m *ManagedCacheAddOnConfigResponse) GetStateMetadata() ManagedCacheAddOnConfigResponseStateMetadata { + if m == nil { + return ManagedCacheAddOnConfigResponseStateMetadata{} + } + return m.StateMetadata +} diff --git a/internal/sdk/models/shared/managedcacheaddondataplanegroup.go b/internal/sdk/models/shared/managedcacheaddondataplanegroup.go new file mode 100644 index 00000000..24a1bf99 --- /dev/null +++ b/internal/sdk/models/shared/managedcacheaddondataplanegroup.go @@ -0,0 +1,146 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// State - The current state of the managed cache add-on in the data-plane group. Possible values: +// - `initializing` - The add-on is in the process of being initialized/updated and is setting up necessary resources for this data-plane group. +// - `ready` - The add-on is fully operational for this data-plane group. +// - `error` - The add-on is in an error state, and is not operational for this data-plane group. +// - `terminating` - The add-on is in the process of being deleted for this data-plane group. +type State string + +const ( + StateInitializing State = "initializing" + StateReady State = "ready" + StateError State = "error" + StateTerminating State = "terminating" +) + +func (e State) ToPointer() *State { + return &e +} +func (e *State) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "initializing": + fallthrough + case "ready": + fallthrough + case "error": + fallthrough + case "terminating": + *e = State(v) + return nil + default: + return fmt.Errorf("invalid value for State: %v", v) + } +} + +// StateMetadata - Metadata describing the state of the managed cache add-on in the data-plane group. +type StateMetadata struct { + // Reason why the managed cache add-on may be in an error state, reported from backing infrastructure. + // + ErrorReason *string `default:"null" json:"error_reason"` +} + +func (s StateMetadata) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *StateMetadata) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err + } + return nil +} + +func (s *StateMetadata) GetErrorReason() *string { + if s == nil { + return nil + } + return s.ErrorReason +} + +// ManagedCacheAddOnDataPlaneGroup - Object that describes a data-plane group where managed cache add-on is deployed. +type ManagedCacheAddOnDataPlaneGroup struct { + // ID of the data-plane group. + ID string `json:"id"` + // Network ID this data-plane group is attached to. + CloudGatewayNetworkID string `json:"cloud_gateway_network_id"` + // Name of cloud provider. + Provider ProviderName `json:"provider"` + // Region of cloud provider the data-plane group is deployed to. + Region string `json:"region"` + // The current state of the managed cache add-on in the data-plane group. Possible values: + // - `initializing` - The add-on is in the process of being initialized/updated and is setting up necessary resources for this data-plane group. + // - `ready` - The add-on is fully operational for this data-plane group. + // - `error` - The add-on is in an error state, and is not operational for this data-plane group. + // - `terminating` - The add-on is in the process of being deleted for this data-plane group. + // + State State `json:"state"` + // Metadata describing the state of the managed cache add-on in the data-plane group. + // + StateMetadata StateMetadata `json:"state_metadata"` +} + +func (m ManagedCacheAddOnDataPlaneGroup) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *ManagedCacheAddOnDataPlaneGroup) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil { + return err + } + return nil +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetID() string { + if m == nil { + return "" + } + return m.ID +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetCloudGatewayNetworkID() string { + if m == nil { + return "" + } + return m.CloudGatewayNetworkID +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetProvider() ProviderName { + if m == nil { + return ProviderName("") + } + return m.Provider +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetRegion() string { + if m == nil { + return "" + } + return m.Region +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetState() State { + if m == nil { + return State("") + } + return m.State +} + +func (m *ManagedCacheAddOnDataPlaneGroup) GetStateMetadata() StateMetadata { + if m == nil { + return StateMetadata{} + } + return m.StateMetadata +} diff --git a/internal/sdk/models/shared/managedcachecapacityconfig.go b/internal/sdk/models/shared/managedcachecapacityconfig.go new file mode 100644 index 00000000..89949a0b --- /dev/null +++ b/internal/sdk/models/shared/managedcachecapacityconfig.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "errors" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +type ManagedCacheCapacityConfigType string + +const ( + ManagedCacheCapacityConfigTypeTiered ManagedCacheCapacityConfigType = "Tiered" +) + +// ManagedCacheCapacityConfig - Configuration for managed cache capacity and performance characteristics. +type ManagedCacheCapacityConfig struct { + Tiered *Tiered `queryParam:"inline,name=ManagedCacheCapacityConfig" union:"member"` + + Type ManagedCacheCapacityConfigType +} + +func CreateManagedCacheCapacityConfigTiered(tiered Tiered) ManagedCacheCapacityConfig { + typ := ManagedCacheCapacityConfigTypeTiered + + return ManagedCacheCapacityConfig{ + Tiered: &tiered, + Type: typ, + } +} + +func (u *ManagedCacheCapacityConfig) UnmarshalJSON(data []byte) error { + + var candidates []utils.UnionCandidate + + // Collect all valid candidates + var tiered Tiered = Tiered{} + if err := utils.UnmarshalJSON(data, &tiered, "", true, nil); err == nil { + candidates = append(candidates, utils.UnionCandidate{ + Type: ManagedCacheCapacityConfigTypeTiered, + Value: &tiered, + }) + } + + if len(candidates) == 0 { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ManagedCacheCapacityConfig", string(data)) + } + + // Pick the best candidate using multi-stage filtering + best := utils.PickBestUnionCandidate(candidates, data) + if best == nil { + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ManagedCacheCapacityConfig", string(data)) + } + + // Set the union type and value based on the best candidate + u.Type = best.Type.(ManagedCacheCapacityConfigType) + switch best.Type { + case ManagedCacheCapacityConfigTypeTiered: + u.Tiered = best.Value.(*Tiered) + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for ManagedCacheCapacityConfig", string(data)) +} + +func (u ManagedCacheCapacityConfig) MarshalJSON() ([]byte, error) { + if u.Tiered != nil { + return utils.MarshalJSON(u.Tiered, "", true) + } + + return nil, errors.New("could not marshal union type ManagedCacheCapacityConfig: all fields are null") +} diff --git a/internal/sdk/models/shared/meshserviceitem.go b/internal/sdk/models/shared/meshserviceitem.go index e6d5dd88..0bb00116 100644 --- a/internal/sdk/models/shared/meshserviceitem.go +++ b/internal/sdk/models/shared/meshserviceitem.go @@ -264,19 +264,19 @@ func (m *MeshServiceItemSelector) GetDataplaneTags() map[string]string { return m.DataplaneTags } -// State of MeshService. Available if there is at least one healthy endpoint. Otherwise, Unavailable. +// MeshServiceItemState - State of MeshService. Available if there is at least one healthy endpoint. Otherwise, Unavailable. // It's used for cross zone communication to check if we should send traffic to it, when MeshService is aggregated into MeshMultiZoneService. -type State string +type MeshServiceItemState string const ( - StateAvailable State = "Available" - StateUnavailable State = "Unavailable" + MeshServiceItemStateAvailable MeshServiceItemState = "Available" + MeshServiceItemStateUnavailable MeshServiceItemState = "Unavailable" ) -func (e State) ToPointer() *State { +func (e MeshServiceItemState) ToPointer() *MeshServiceItemState { return &e } -func (e *State) UnmarshalJSON(data []byte) error { +func (e *MeshServiceItemState) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err @@ -285,10 +285,10 @@ func (e *State) UnmarshalJSON(data []byte) error { case "Available": fallthrough case "Unavailable": - *e = State(v) + *e = MeshServiceItemState(v) return nil default: - return fmt.Errorf("invalid value for State: %v", v) + return fmt.Errorf("invalid value for MeshServiceItemState: %v", v) } } @@ -299,7 +299,7 @@ type MeshServiceItemSpec struct { Selector *MeshServiceItemSelector `json:"selector,omitempty"` // State of MeshService. Available if there is at least one healthy endpoint. Otherwise, Unavailable. // It's used for cross zone communication to check if we should send traffic to it, when MeshService is aggregated into MeshMultiZoneService. - State *State `default:"Unavailable" json:"state"` + State *MeshServiceItemState `default:"Unavailable" json:"state"` } func (m MeshServiceItemSpec) MarshalJSON() ([]byte, error) { @@ -334,7 +334,7 @@ func (m *MeshServiceItemSpec) GetSelector() *MeshServiceItemSelector { return m.Selector } -func (m *MeshServiceItemSpec) GetState() *State { +func (m *MeshServiceItemSpec) GetState() *MeshServiceItemState { if m == nil { return nil } diff --git a/internal/sdk/models/shared/providername.go b/internal/sdk/models/shared/providername.go new file mode 100644 index 00000000..086626e7 --- /dev/null +++ b/internal/sdk/models/shared/providername.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" +) + +// ProviderName - Name of cloud provider. +type ProviderName string + +const ( + ProviderNameAws ProviderName = "aws" + ProviderNameAzure ProviderName = "azure" + ProviderNameGcp ProviderName = "gcp" +) + +func (e ProviderName) ToPointer() *ProviderName { + return &e +} +func (e *ProviderName) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "aws": + fallthrough + case "azure": + fallthrough + case "gcp": + *e = ProviderName(v) + return nil + default: + return fmt.Errorf("invalid value for ProviderName: %v", v) + } +} diff --git a/internal/sdk/models/shared/referencebyid.go b/internal/sdk/models/shared/referencebyid.go deleted file mode 100644 index 44cca58a..00000000 --- a/internal/sdk/models/shared/referencebyid.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -// ReferenceByID - A static encryption key reference by ID. -type ReferenceByID struct { - // The ID of the static key defined in the key source. - ID string `json:"id"` -} - -func (r ReferenceByID) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *ReferenceByID) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { - return err - } - return nil -} - -func (r *ReferenceByID) GetID() string { - if r == nil { - return "" - } - return r.ID -} diff --git a/internal/sdk/models/shared/referencebyname.go b/internal/sdk/models/shared/referencebyname.go deleted file mode 100644 index a25cd477..00000000 --- a/internal/sdk/models/shared/referencebyname.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -// ReferenceByName - A static encryption key reference by name. -type ReferenceByName struct { - // The name of the static key defined in the key source. - Name string `json:"name"` -} - -func (r ReferenceByName) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(r, "", false) -} - -func (r *ReferenceByName) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &r, "", false, nil); err != nil { - return err - } - return nil -} - -func (r *ReferenceByName) GetName() string { - if r == nil { - return "" - } - return r.Name -} diff --git a/internal/sdk/models/shared/replaceclient.go b/internal/sdk/models/shared/replaceclient.go index 15b87300..8291d0a5 100644 --- a/internal/sdk/models/shared/replaceclient.go +++ b/internal/sdk/models/shared/replaceclient.go @@ -24,6 +24,8 @@ type ReplaceClient struct { AccessTokenDuration *int64 `default:"300" json:"access_token_duration"` // The duration of the minted token is valid for, in seconds IDTokenDuration *int64 `default:"300" json:"id_token_duration"` + // The duration of the minted refresh token is valid for, in seconds + RefreshTokenDuration *int64 `default:"2592000" json:"refresh_token_duration"` // Specifies whether the client is allowed to request all scopes AllowAllScopes *bool `default:"false" json:"allow_all_scopes"` // Specifies the scopes IDs that the client is allowed to request @@ -104,6 +106,13 @@ func (r *ReplaceClient) GetIDTokenDuration() *int64 { return r.IDTokenDuration } +func (r *ReplaceClient) GetRefreshTokenDuration() *int64 { + if r == nil { + return nil + } + return r.RefreshTokenDuration +} + func (r *ReplaceClient) GetAllowAllScopes() *bool { if r == nil { return nil diff --git a/internal/sdk/models/shared/schemaregistryreference.go b/internal/sdk/models/shared/schemaregistryreference.go index eb62d160..103dca6a 100644 --- a/internal/sdk/models/shared/schemaregistryreference.go +++ b/internal/sdk/models/shared/schemaregistryreference.go @@ -3,97 +3,28 @@ package shared import ( - "errors" - "fmt" "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" ) -type SchemaRegistryReferenceType string - -const ( - SchemaRegistryReferenceTypeSchemaRegistryReferenceByID SchemaRegistryReferenceType = "SchemaRegistryReferenceById" - SchemaRegistryReferenceTypeSchemaRegistryReferenceByName SchemaRegistryReferenceType = "SchemaRegistryReferenceByName" -) - -// SchemaRegistryReference - A reference to a schema Registry. type SchemaRegistryReference struct { - SchemaRegistryReferenceByID *SchemaRegistryReferenceByID `queryParam:"inline,name=SchemaRegistryReference" union:"member"` - SchemaRegistryReferenceByName *SchemaRegistryReferenceByName `queryParam:"inline,name=SchemaRegistryReference" union:"member"` - - Type SchemaRegistryReferenceType -} - -func CreateSchemaRegistryReferenceSchemaRegistryReferenceByID(schemaRegistryReferenceByID SchemaRegistryReferenceByID) SchemaRegistryReference { - typ := SchemaRegistryReferenceTypeSchemaRegistryReferenceByID - - return SchemaRegistryReference{ - SchemaRegistryReferenceByID: &schemaRegistryReferenceByID, - Type: typ, - } + // The unique identifier of the schema registry. + ID string `json:"id"` } -func CreateSchemaRegistryReferenceSchemaRegistryReferenceByName(schemaRegistryReferenceByName SchemaRegistryReferenceByName) SchemaRegistryReference { - typ := SchemaRegistryReferenceTypeSchemaRegistryReferenceByName - - return SchemaRegistryReference{ - SchemaRegistryReferenceByName: &schemaRegistryReferenceByName, - Type: typ, - } +func (s SchemaRegistryReference) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) } -func (u *SchemaRegistryReference) UnmarshalJSON(data []byte) error { - - var candidates []utils.UnionCandidate - - // Collect all valid candidates - var schemaRegistryReferenceByID SchemaRegistryReferenceByID = SchemaRegistryReferenceByID{} - if err := utils.UnmarshalJSON(data, &schemaRegistryReferenceByID, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: SchemaRegistryReferenceTypeSchemaRegistryReferenceByID, - Value: &schemaRegistryReferenceByID, - }) +func (s *SchemaRegistryReference) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { + return err } - - var schemaRegistryReferenceByName SchemaRegistryReferenceByName = SchemaRegistryReferenceByName{} - if err := utils.UnmarshalJSON(data, &schemaRegistryReferenceByName, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: SchemaRegistryReferenceTypeSchemaRegistryReferenceByName, - Value: &schemaRegistryReferenceByName, - }) - } - - if len(candidates) == 0 { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for SchemaRegistryReference", string(data)) - } - - // Pick the best candidate using multi-stage filtering - best := utils.PickBestUnionCandidate(candidates, data) - if best == nil { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for SchemaRegistryReference", string(data)) - } - - // Set the union type and value based on the best candidate - u.Type = best.Type.(SchemaRegistryReferenceType) - switch best.Type { - case SchemaRegistryReferenceTypeSchemaRegistryReferenceByID: - u.SchemaRegistryReferenceByID = best.Value.(*SchemaRegistryReferenceByID) - return nil - case SchemaRegistryReferenceTypeSchemaRegistryReferenceByName: - u.SchemaRegistryReferenceByName = best.Value.(*SchemaRegistryReferenceByName) - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for SchemaRegistryReference", string(data)) + return nil } -func (u SchemaRegistryReference) MarshalJSON() ([]byte, error) { - if u.SchemaRegistryReferenceByID != nil { - return utils.MarshalJSON(u.SchemaRegistryReferenceByID, "", true) +func (s *SchemaRegistryReference) GetID() string { + if s == nil { + return "" } - - if u.SchemaRegistryReferenceByName != nil { - return utils.MarshalJSON(u.SchemaRegistryReferenceByName, "", true) - } - - return nil, errors.New("could not marshal union type SchemaRegistryReference: all fields are null") + return s.ID } diff --git a/internal/sdk/models/shared/schemaregistryreferencebyid.go b/internal/sdk/models/shared/schemaregistryreferencebyid.go deleted file mode 100644 index 91a58068..00000000 --- a/internal/sdk/models/shared/schemaregistryreferencebyid.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -type SchemaRegistryReferenceByID struct { - // The unique identifier of the schema registry. - ID string `json:"id"` -} - -func (s SchemaRegistryReferenceByID) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SchemaRegistryReferenceByID) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { - return err - } - return nil -} - -func (s *SchemaRegistryReferenceByID) GetID() string { - if s == nil { - return "" - } - return s.ID -} diff --git a/internal/sdk/models/shared/schemaregistryreferencebyname.go b/internal/sdk/models/shared/schemaregistryreferencebyname.go deleted file mode 100644 index fd12a85e..00000000 --- a/internal/sdk/models/shared/schemaregistryreferencebyname.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -// SchemaRegistryReferenceByName - Reference a schema registry by its unique name. -type SchemaRegistryReferenceByName struct { - // The unique name of the schema registry. - Name string `json:"name"` -} - -func (s SchemaRegistryReferenceByName) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SchemaRegistryReferenceByName) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, nil); err != nil { - return err - } - return nil -} - -func (s *SchemaRegistryReferenceByName) GetName() string { - if s == nil { - return "" - } - return s.Name -} diff --git a/internal/sdk/models/shared/tiered.go b/internal/sdk/models/shared/tiered.go new file mode 100644 index 00000000..67ae9eec --- /dev/null +++ b/internal/sdk/models/shared/tiered.go @@ -0,0 +1,96 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" +) + +// Tier - Capacity tier that determines both cache size and performance characteristics: +// - micro: ~0.5 GiB capacity +// - small: ~1 GiB capacity +// - medium: ~3 GiB capacity +// - large: ~6 GiB capacity +// - xlarge: ~12 GiB capacity +// - 2xlarge: ~25 GiB capacity +// - 4xlarge: ~52 GiB capacity +type Tier string + +const ( + TierMicro Tier = "micro" + TierSmall Tier = "small" + TierMedium Tier = "medium" + TierLarge Tier = "large" + TierXlarge Tier = "xlarge" + TierTwoxlarge Tier = "2xlarge" + TierFourxlarge Tier = "4xlarge" +) + +func (e Tier) ToPointer() *Tier { + return &e +} +func (e *Tier) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "micro": + fallthrough + case "small": + fallthrough + case "medium": + fallthrough + case "large": + fallthrough + case "xlarge": + fallthrough + case "2xlarge": + fallthrough + case "4xlarge": + *e = Tier(v) + return nil + default: + return fmt.Errorf("invalid value for Tier: %v", v) + } +} + +// Tiered - Capacity tiers with pre-configured size and performance characteristics. +type Tiered struct { + // Type of capacity configuration. + kind string `const:"tiered" json:"kind"` + // Capacity tier that determines both cache size and performance characteristics: + // - micro: ~0.5 GiB capacity + // - small: ~1 GiB capacity + // - medium: ~3 GiB capacity + // - large: ~6 GiB capacity + // - xlarge: ~12 GiB capacity + // - 2xlarge: ~25 GiB capacity + // - 4xlarge: ~52 GiB capacity + // + Tier Tier `json:"tier"` +} + +func (t Tiered) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(t, "", false) +} + +func (t *Tiered) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil { + return err + } + return nil +} + +func (t *Tiered) GetKind() string { + return "tiered" +} + +func (t *Tiered) GetTier() Tier { + if t == nil { + return Tier("") + } + return t.Tier +} diff --git a/internal/sdk/models/shared/updatebackendclusterrequest.go b/internal/sdk/models/shared/updatebackendclusterrequest.go index 26a9974b..ea0dbe7e 100644 --- a/internal/sdk/models/shared/updatebackendclusterrequest.go +++ b/internal/sdk/models/shared/updatebackendclusterrequest.go @@ -10,7 +10,7 @@ import ( type UpdateBackendClusterRequest struct { // The unique name of the backend cluster. Name string `json:"name"` - // A human-readable description of the virtual cluster. + // A human-readable description of the backend cluster. Description *string `default:"" json:"description"` Authentication BackendClusterAuthenticationSensitiveDataAwareScheme `json:"authentication"` // If true, virtual clusters can have allow anonymous authentication and use this backend cluster. diff --git a/internal/sdk/models/shared/updateeventgatewaylistenerrequest.go b/internal/sdk/models/shared/updateeventgatewaylistenerrequest.go index 66dc1155..32a1607e 100644 --- a/internal/sdk/models/shared/updateeventgatewaylistenerrequest.go +++ b/internal/sdk/models/shared/updateeventgatewaylistenerrequest.go @@ -10,7 +10,7 @@ import ( type UpdateEventGatewayListenerRequest struct { // The unique name of the listener. Name string `json:"name"` - // A human-readable description of the virtual cluster. + // A human-readable description of the listener. Description *string `default:"" json:"description"` // Which address or addresses to listen on. // `0.0.0.0` means all addresses on the host. diff --git a/internal/sdk/models/shared/virtualclusterreference.go b/internal/sdk/models/shared/virtualclusterreference.go index 98728848..b3e93f9e 100644 --- a/internal/sdk/models/shared/virtualclusterreference.go +++ b/internal/sdk/models/shared/virtualclusterreference.go @@ -3,97 +3,29 @@ package shared import ( - "errors" - "fmt" "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" ) -type VirtualClusterReferenceType string - -const ( - VirtualClusterReferenceTypeVirtualClusterReferenceByID VirtualClusterReferenceType = "VirtualClusterReferenceById" - VirtualClusterReferenceTypeVirtualClusterReferenceByName VirtualClusterReferenceType = "VirtualClusterReferenceByName" -) - -// VirtualClusterReference - A reference to a virtual cluster. +// VirtualClusterReference - Reference a virtual cluster by its unique identifier. type VirtualClusterReference struct { - VirtualClusterReferenceByID *VirtualClusterReferenceByID `queryParam:"inline,name=VirtualClusterReference" union:"member"` - VirtualClusterReferenceByName *VirtualClusterReferenceByName `queryParam:"inline,name=VirtualClusterReference" union:"member"` - - Type VirtualClusterReferenceType -} - -func CreateVirtualClusterReferenceVirtualClusterReferenceByID(virtualClusterReferenceByID VirtualClusterReferenceByID) VirtualClusterReference { - typ := VirtualClusterReferenceTypeVirtualClusterReferenceByID - - return VirtualClusterReference{ - VirtualClusterReferenceByID: &virtualClusterReferenceByID, - Type: typ, - } + // The unique identifier of the virtual cluster. + ID string `json:"id"` } -func CreateVirtualClusterReferenceVirtualClusterReferenceByName(virtualClusterReferenceByName VirtualClusterReferenceByName) VirtualClusterReference { - typ := VirtualClusterReferenceTypeVirtualClusterReferenceByName - - return VirtualClusterReference{ - VirtualClusterReferenceByName: &virtualClusterReferenceByName, - Type: typ, - } +func (v VirtualClusterReference) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(v, "", false) } -func (u *VirtualClusterReference) UnmarshalJSON(data []byte) error { - - var candidates []utils.UnionCandidate - - // Collect all valid candidates - var virtualClusterReferenceByID VirtualClusterReferenceByID = VirtualClusterReferenceByID{} - if err := utils.UnmarshalJSON(data, &virtualClusterReferenceByID, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: VirtualClusterReferenceTypeVirtualClusterReferenceByID, - Value: &virtualClusterReferenceByID, - }) +func (v *VirtualClusterReference) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &v, "", false, nil); err != nil { + return err } - - var virtualClusterReferenceByName VirtualClusterReferenceByName = VirtualClusterReferenceByName{} - if err := utils.UnmarshalJSON(data, &virtualClusterReferenceByName, "", true, nil); err == nil { - candidates = append(candidates, utils.UnionCandidate{ - Type: VirtualClusterReferenceTypeVirtualClusterReferenceByName, - Value: &virtualClusterReferenceByName, - }) - } - - if len(candidates) == 0 { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for VirtualClusterReference", string(data)) - } - - // Pick the best candidate using multi-stage filtering - best := utils.PickBestUnionCandidate(candidates, data) - if best == nil { - return fmt.Errorf("could not unmarshal `%s` into any supported union types for VirtualClusterReference", string(data)) - } - - // Set the union type and value based on the best candidate - u.Type = best.Type.(VirtualClusterReferenceType) - switch best.Type { - case VirtualClusterReferenceTypeVirtualClusterReferenceByID: - u.VirtualClusterReferenceByID = best.Value.(*VirtualClusterReferenceByID) - return nil - case VirtualClusterReferenceTypeVirtualClusterReferenceByName: - u.VirtualClusterReferenceByName = best.Value.(*VirtualClusterReferenceByName) - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for VirtualClusterReference", string(data)) + return nil } -func (u VirtualClusterReference) MarshalJSON() ([]byte, error) { - if u.VirtualClusterReferenceByID != nil { - return utils.MarshalJSON(u.VirtualClusterReferenceByID, "", true) +func (v *VirtualClusterReference) GetID() string { + if v == nil { + return "" } - - if u.VirtualClusterReferenceByName != nil { - return utils.MarshalJSON(u.VirtualClusterReferenceByName, "", true) - } - - return nil, errors.New("could not marshal union type VirtualClusterReference: all fields are null") + return v.ID } diff --git a/internal/sdk/models/shared/virtualclusterreferencebyid.go b/internal/sdk/models/shared/virtualclusterreferencebyid.go deleted file mode 100644 index 7e6031b3..00000000 --- a/internal/sdk/models/shared/virtualclusterreferencebyid.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -// VirtualClusterReferenceByID - Reference a virtual cluster by its unique identifier. -type VirtualClusterReferenceByID struct { - // The unique identifier of the virtual cluster. - ID string `json:"id"` -} - -func (v VirtualClusterReferenceByID) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(v, "", false) -} - -func (v *VirtualClusterReferenceByID) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &v, "", false, nil); err != nil { - return err - } - return nil -} - -func (v *VirtualClusterReferenceByID) GetID() string { - if v == nil { - return "" - } - return v.ID -} diff --git a/internal/sdk/models/shared/virtualclusterreferencebyname.go b/internal/sdk/models/shared/virtualclusterreferencebyname.go deleted file mode 100644 index db128797..00000000 --- a/internal/sdk/models/shared/virtualclusterreferencebyname.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package shared - -import ( - "github.com/kong/terraform-provider-konnect-beta/internal/sdk/internal/utils" -) - -// VirtualClusterReferenceByName - Reference a virtual cluster by its unique name. -type VirtualClusterReferenceByName struct { - // The name of the virtual cluster. - Name string `json:"name"` -} - -func (v VirtualClusterReferenceByName) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(v, "", false) -} - -func (v *VirtualClusterReferenceByName) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &v, "", false, nil); err != nil { - return err - } - return nil -} - -func (v *VirtualClusterReferenceByName) GetName() string { - if v == nil { - return "" - } - return v.Name -} diff --git a/openapi.yaml b/openapi.yaml index 29db5b4d..167dd764 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8249,8 +8249,107 @@ paths: parameters: - $ref: '#/components/parameters/gatewayId' - $ref: '#/components/parameters/virtualClusterId' + /v2/cloud-gateways/add-ons: + post: + x-unstable: true + x-internal: true + x-speakeasy-entity-operation: + terraform-resource: CloudGatewayAddOn#create + operationId: create-add-on + summary: Create Add-On + description: | + Creates a new add-on. Specific add-on types (e.g., managed cache) + are defined by the sub-kind configuration. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAddOnRequest' + responses: + '201': + $ref: '#/components/responses/CreateAddOnResponse' + '400': + $ref: '#/components/responses/CloudGatewaysBadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/CloudGatewaysForbidden' + '404': + $ref: '#/components/responses/NotFound' + '409': + $ref: '#/components/responses/CloudGatewaysConflict' + servers: + - url: 'https://global.api.konghq.com/' + tags: + - Add-Ons + x-servers-added: true + x-speakeasy-group: CloudGateways + '/v2/cloud-gateways/add-ons/{addOnId}': + get: + x-unstable: true + x-internal: true + x-speakeasy-entity-operation: + terraform-resource: CloudGatewayAddOn#read + operationId: get-add-on + summary: Get Add-On + description: Retrieves an add-on by ID. + parameters: + - $ref: '#/components/parameters/AddOnId' + responses: + '200': + $ref: '#/components/responses/RetrieveAddOnResponse' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + servers: + - url: 'https://global.api.konghq.com/' + tags: + - Add-Ons + x-servers-added: true + x-speakeasy-group: CloudGateways + delete: + x-unstable: true + x-internal: true + x-speakeasy-entity-operation: + terraform-resource: CloudGatewayAddOn#delete + terraform-datasource: null + operationId: delete-add-on + summary: Delete Add-On + description: | + Deletes an add-on by ID. The request will be rejected if the managed cache partial is still in use by some plugins. + parameters: + - $ref: '#/components/parameters/AddOnId' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/CloudGatewaysBadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/NotFound' + servers: + - url: 'https://global.api.konghq.com/' + tags: + - Add-Ons + x-servers-added: true + x-speakeasy-group: CloudGateways components: parameters: + AddOnId: + name: addOnId + description: ID of the add-on to operate on. + required: true + in: path + schema: + $ref: '#/components/schemas/AddOnId' + x-speakeasy-match: id ApiId: schema: type: string @@ -8326,6 +8425,7 @@ components: in: path required: true description: The ID of the Event Gateway Listener. + x-speakeasy-name-override: listenerId EventGatewayPolicyAfter: schema: type: string @@ -23436,8 +23536,10 @@ components: - authorization_code - implicit - client_credentials + - refresh_token x-enum-dev: - authorization_code + - refresh_token x-speakeasy-unknown-values: allow GrantTypes: description: List of OAuth 2.0 grant types @@ -23466,6 +23568,12 @@ components: default: 300 maximum: 2592000 minimum: 60 + RefreshTokenDuration: + description: 'The duration of the minted refresh token is valid for, in seconds' + type: integer + default: 2592000 + maximum: 157680000 + minimum: 60 ClientAllowAllScopes: description: Specifies whether the client is allowed to request all scopes type: boolean @@ -23732,6 +23840,8 @@ components: $ref: '#/components/schemas/TokenDuration' id_token_duration: $ref: '#/components/schemas/TokenDuration' + refresh_token_duration: + $ref: '#/components/schemas/RefreshTokenDuration' allow_all_scopes: $ref: '#/components/schemas/ClientAllowAllScopes' allow_scopes: @@ -23755,6 +23865,7 @@ components: - allow_scopes - access_token_duration - id_token_duration + - refresh_token_duration - labels - response_types - created_at @@ -23762,6 +23873,9 @@ components: x-property-annotations: login_uri: - x-unstable + refresh_token_duration: + - x-unstable + - x-internal CreatedClient: allOf: - $ref: '#/components/schemas/Client' @@ -24087,7 +24201,10 @@ components: type: array items: type: string + x-enum-internal: + - error_rate enum: + - error_rate - kong_latency_average - kong_latency_p50 - kong_latency_p95 @@ -25015,12 +25132,15 @@ components: type: array items: type: string + x-enum-internal: + - error_rate enum: - total_tokens - prompt_tokens - completion_tokens - ai_request_count - cost + - error_rate - llm_cache_embeddings_latency_average - llm_cache_fetch_latency_average - llm_latency_average @@ -25676,9 +25796,7 @@ components: x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' VirtualClusterReference: description: A reference to a virtual cluster. - anyOf: - - $ref: '#/components/schemas/VirtualClusterReferenceById' - - $ref: '#/components/schemas/VirtualClusterReferenceByName' + $ref: '#/components/schemas/VirtualClusterReferenceById' VirtualClusterReferenceById: description: Reference a virtual cluster by its unique identifier. type: object @@ -25690,14 +25808,6 @@ components: minLength: 1 required: - id - VirtualClusterReferenceByName: - description: Reference a virtual cluster by its unique name. - type: object - properties: - name: - $ref: '#/components/schemas/VirtualClusterName' - required: - - name VirtualClusterAuthenticationSensitiveDataAwareSchemes: description: | How to handle authentication from clients. @@ -26509,9 +26619,7 @@ components: - password SchemaRegistryReference: description: A reference to a schema Registry. - oneOf: - - $ref: '#/components/schemas/SchemaRegistryReferenceById' - - $ref: '#/components/schemas/SchemaRegistryReferenceByName' + $ref: '#/components/schemas/SchemaRegistryReferenceById' SchemaRegistryReferenceById: type: object properties: @@ -26522,17 +26630,6 @@ components: minLength: 1 required: - id - SchemaRegistryReferenceByName: - description: Reference a schema registry by its unique name. - type: object - properties: - name: - description: The unique name of the schema registry. - type: string - maxLength: 255 - minLength: 1 - required: - - name SchemaValidationType: description: | How to validate the schema and parse the record. @@ -26571,10 +26668,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -26633,10 +26728,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -26693,10 +26786,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -26750,10 +26841,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -26790,10 +26879,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -26915,10 +27002,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27071,10 +27156,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27139,10 +27222,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27211,10 +27292,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27276,10 +27355,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27346,10 +27423,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27396,10 +27471,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27492,10 +27565,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27552,10 +27623,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27642,10 +27711,8 @@ components: name: description: A unique user-defined name of the policy. type: string - default: null maxLength: 255 - nullable: true - x-speakeasy-param-computed: false + nullable: false x-unicode-pattern: '^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+'']*[\p{L}\p{N}]$' description: description: A human-readable description of the policy. @@ -27715,10 +27782,24 @@ components: items: $ref: '#/components/schemas/EventGatewayACLOperation' resource_names: - description: 'If any of these entries match, the resource name matches for this rule.' - type: array - items: - $ref: '#/components/schemas/EventGatewayACLResourceName' + description: 'If any of these entries match, the resource name matches for this rule. A maximum of 50 entries are allowed.' + oneOf: + - type: array + maxItems: 50 + items: + $ref: '#/components/schemas/EventGatewayACLResourceName' + - type: string + x-min-runtime-version: '1.1' + example: 'context.auth.tokens.claims["topics"]' + x-expression: + type: array + fields: + - context.auth.principal.name + - context.auth.type + - context.auth.token.claims + description: | + This expression should evaluate to an array of glob patterns, + equivalent to the `match` values in the array form of `resource_names`. required: - resource_type - action @@ -27869,9 +27950,7 @@ components: EncryptionKeyStaticReference: description: | A static encryption key reference, either by ID or by value. - anyOf: - - $ref: '#/components/schemas/EncryptionKeyStaticReferenceById' - - $ref: '#/components/schemas/EncryptionKeyStaticReferenceByName' + $ref: '#/components/schemas/EncryptionKeyStaticReferenceById' EncryptionKeyStaticReferenceById: description: A static encryption key reference by ID. type: object @@ -27883,19 +27962,6 @@ components: minLength: 1 required: - id - x-speakeasy-name-override: ReferenceByID - EncryptionKeyStaticReferenceByName: - description: A static encryption key reference by name. - type: object - properties: - name: - description: The name of the static key defined in the key source. - type: string - maxLength: 255 - minLength: 1 - required: - - name - x-speakeasy-name-override: ReferenceByName ConsumeKeyValidationAction: description: | Defines a behavior when record key is not valid. @@ -28363,6 +28429,405 @@ components: fields: - vault x-sensitive: true + ControlPlaneGeo: + description: Set of control-plane geos supported for deploying cloud-gateways configurations. + type: string + enum: + - us + - eu + - au + - me + - in + - sg + title: Control-Plane Geo + x-speakeasy-unknown-values: allow + ProviderName: + description: Name of cloud provider. + type: string + example: aws + enum: + - aws + - azure + - gcp + title: Provider Name + x-enum-internal: [] + x-speakeasy-unknown-values: allow + AddOnId: + type: string + format: uuid + example: 550e8400-e29b-41d4-a716-446655440000 + readOnly: true + x-speakeasy-param-suppress-computed-diff: true + AddOnConfigResponse: + description: Configuration object for different types of add-ons. + type: object + oneOf: + - $ref: '#/components/schemas/ManagedCacheAddOnConfigResponse' + title: AddOnConfigResponse + ManagedCacheAddOnConfigResponse: + description: Configuration for managed cache add-on. + type: object + properties: + kind: + description: Type of add-on configuration. + type: string + const: managed-cache.v0 + capacity_config: + $ref: '#/components/schemas/ManagedCacheCapacityConfig' + data_plane_groups: + description: List of data-plane groups where the managed cache is deployed. + type: array + items: + $ref: '#/components/schemas/ManagedCacheAddOnDataPlaneGroup' + state_metadata: + description: | + Metadata describing the state of the managed cache add-on. + type: object + additionalProperties: false + properties: + cache_config_id: + description: Reference to cache configuration for this add-on. + type: string + format: uuid + example: edaf40f9-9fb0-4ffe-bb74-4e763a6bd471 + default: null + nullable: true + x-speakeasy-param-computed: false + cache_server_name: + description: Env vault path to cache server name. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_SERVER_NAME}' + default: null + nullable: true + x-speakeasy-param-computed: false + cache_host: + description: Env vault path to cache hostname. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_HOST}' + default: null + nullable: true + x-speakeasy-param-computed: false + cache_port: + description: Env vault path to cache port. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_PORT}' + default: null + nullable: true + x-speakeasy-param-computed: false + cache_username: + description: Env vault path to cache username. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_USERNAME}' + default: null + nullable: true + x-speakeasy-param-computed: false + cloud_authentication: + description: | + Metadata describing the cloud authentication details for managed cache add-on. + type: object + default: null + additionalProperties: false + nullable: true + properties: + auth_provider: + description: Env vault path to cache auth provider. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_AUTH_PROVIDER}' + default: null + nullable: true + x-speakeasy-param-computed: false + aws_cache_name: + description: Env vault path to aws cache name. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_AWS_CACHE_NAME}' + default: null + nullable: true + x-speakeasy-param-computed: false + aws_region: + description: Env vault path to aws region. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_AWS_REGION}' + default: null + nullable: true + x-speakeasy-param-computed: false + aws_assume_role_arn: + description: Env vault path to aws assume role arn. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_AWS_ASSUME_ROLE_ARN}' + default: null + nullable: true + x-speakeasy-param-computed: false + azure_tenant_id: + description: Env vault path to azure tenant id. + type: string + example: '{vault://env/ADDON_MANAGED_CACHE_AZURE_TENANT_ID}' + default: null + nullable: true + x-speakeasy-param-computed: false + x-speakeasy-param-computed: false + additionalProperties: false + required: + - kind + - capacity_config + - data_plane_groups + - state_metadata + title: ManagedCacheAddOnConfigResponse + ManagedCacheAddOnDataPlaneGroup: + description: Object that describes a data-plane group where managed cache add-on is deployed. + type: object + properties: + id: + description: ID of the data-plane group. + type: string + format: uuid + example: 1150820b-c69f-4a2a-b9be-bbcdbc5cd618 + cloud_gateway_network_id: + description: Network ID this data-plane group is attached to. + type: string + format: uuid + example: 36ae63d3-efd1-4bec-b246-62aa5d3f5695 + provider: + $ref: '#/components/schemas/ProviderName' + region: + description: Region of cloud provider the data-plane group is deployed to. + type: string + example: us-east-1 + state: + description: | + The current state of the managed cache add-on in the data-plane group. Possible values: + - `initializing` - The add-on is in the process of being initialized/updated and is setting up necessary resources for this data-plane group. + - `ready` - The add-on is fully operational for this data-plane group. + - `error` - The add-on is in an error state, and is not operational for this data-plane group. + - `terminating` - The add-on is in the process of being deleted for this data-plane group. + type: string + enum: + - initializing + - ready + - error + - terminating + readOnly: true + x-speakeasy-param-suppress-computed-diff: true + x-speakeasy-unknown-values: allow + state_metadata: + description: | + Metadata describing the state of the managed cache add-on in the data-plane group. + type: object + additionalProperties: false + properties: + error_reason: + description: | + Reason why the managed cache add-on may be in an error state, reported from backing infrastructure. + type: string + example: | + Failed to create managed cache add-on due to invalid configuration. + default: null + nullable: true + x-speakeasy-param-computed: false + additionalProperties: false + required: + - id + - cloud_gateway_network_id + - provider + - region + - state + - state_metadata + title: ManagedCacheAddOnDataPlaneGroup + AddOnState: + description: | + The current state of the add-on. Possible values: + - `initializing` - The add-on is in the process of being initialized/updated. + - `ready` - The add-on is fully operational. + - `terminating` - The add-on is in the process of being deleted. + type: string + enum: + - initializing + - ready + - terminating + readOnly: true + title: Add-On State + x-speakeasy-param-suppress-computed-diff: true + x-speakeasy-unknown-values: allow + AddOnResponse: + description: Object containing information about an add-on. + type: object + properties: + id: + $ref: '#/components/schemas/AddOnId' + name: + $ref: '#/components/schemas/AddOnName' + owner: + $ref: '#/components/schemas/AddOnOwner' + config: + $ref: '#/components/schemas/AddOnConfigResponse' + entity_version: + description: 'Monotonically-increasing version count of the add-on, to indicate the order of updates to the add-on.' + type: integer + example: 1 + readOnly: true + x-speakeasy-param-suppress-computed-diff: true + state: + $ref: '#/components/schemas/AddOnState' + created_at: + description: RFC-3339 timestamp representation of add-on creation date. + type: string + format: date-time + example: '2025-08-26T06:56:41Z' + readOnly: true + x-speakeasy-param-suppress-computed-diff: true + updated_at: + description: RFC-3339 timestamp representation of add-on update date. + type: string + format: date-time + example: '2025-08-26T06:56:41Z' + readOnly: true + x-speakeasy-param-suppress-computed-diff: true + additionalProperties: false + required: + - id + - name + - owner + - config + - entity_version + - state + - created_at + - updated_at + title: AddOnResponse + CreateAddOnRequest: + description: Request schema for creating an add-on. + type: object + properties: + name: + $ref: '#/components/schemas/AddOnName' + owner: + $ref: '#/components/schemas/AddOnOwner' + config: + $ref: '#/components/schemas/CreateAddOnConfig' + additionalProperties: false + required: + - name + - owner + - config + title: CreateAddOnRequest + AddOnName: + description: Unique human-readable name of the add-on. + type: string + example: my-add-on + maxLength: 70 + minLength: 1 + title: AddOnName + AddOnOwner: + description: Owner for the add-on. + type: object + oneOf: + - $ref: '#/components/schemas/ControlPlaneAddOnOwner' + - $ref: '#/components/schemas/ControlPlaneGroupAddOnOwner' + title: AddOnOwner + ControlPlaneAddOnOwner: + description: Control Plane is the owner for the add-on. + type: object + properties: + kind: + description: Type of owner for the add-on. + type: string + const: control-plane + control_plane_id: + description: ID of the control-plane that owns this add-on. + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + control_plane_geo: + $ref: '#/components/schemas/ControlPlaneGeo' + additionalProperties: false + required: + - kind + - control_plane_id + - control_plane_geo + title: ControlPlaneAddOnOwner + x-speakeasy-name-override: control_plane + ControlPlaneGroupAddOnOwner: + description: Control Plane Group is the owner for the add-on. + type: object + properties: + kind: + description: Type of owner for the add-on. + type: string + const: control-plane-group + control_plane_group_id: + description: ID of the control-plane group that owns this add-on. + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174000 + control_plane_group_geo: + $ref: '#/components/schemas/ControlPlaneGeo' + additionalProperties: false + required: + - kind + - control_plane_group_id + - control_plane_group_geo + title: ControlPlaneGroupAddOnOwner + x-speakeasy-name-override: control_plane_group + CreateAddOnConfig: + description: Configuration for creating different types of add-ons. + type: object + oneOf: + - $ref: '#/components/schemas/CreateManagedCacheAddOnConfig' + title: CreateAddOnConfig + CreateManagedCacheAddOnConfig: + description: Configuration for creating a managed cache add-on. + type: object + properties: + kind: + description: Type of add-on configuration. + type: string + const: managed-cache.v0 + capacity_config: + $ref: '#/components/schemas/ManagedCacheCapacityConfig' + additionalProperties: false + required: + - kind + - capacity_config + title: CreateManagedCacheAddOnConfig + x-speakeasy-name-override: managed_cache + ManagedCacheCapacityConfig: + description: Configuration for managed cache capacity and performance characteristics. + type: object + oneOf: + - $ref: '#/components/schemas/TieredCapacityConfig' + title: ManagedCacheCapacityConfig + TieredCapacityConfig: + description: Capacity tiers with pre-configured size and performance characteristics. + type: object + properties: + kind: + description: Type of capacity configuration. + type: string + const: tiered + tier: + description: | + Capacity tier that determines both cache size and performance characteristics: + - micro: ~0.5 GiB capacity + - small: ~1 GiB capacity + - medium: ~3 GiB capacity + - large: ~6 GiB capacity + - xlarge: ~12 GiB capacity + - 2xlarge: ~25 GiB capacity + - 4xlarge: ~52 GiB capacity + type: string + enum: + - micro + - small + - medium + - large + - xlarge + - 2xlarge + - 4xlarge + x-speakeasy-unknown-values: allow + additionalProperties: false + required: + - kind + - tier + title: TieredCapacityConfig + x-speakeasy-name-override: Tiered CreatePortalCustomDomainSSL: type: object properties: @@ -29256,6 +29721,8 @@ components: $ref: '#/components/schemas/TokenDuration' id_token_duration: $ref: '#/components/schemas/TokenDuration' + refresh_token_duration: + $ref: '#/components/schemas/RefreshTokenDuration' allow_all_scopes: $ref: '#/components/schemas/ClientAllowAllScopes' allow_scopes: @@ -29282,6 +29749,9 @@ components: x-property-annotations: login_uri: - x-unstable + refresh_token_duration: + - x-unstable + - x-internal ReplaceClient: description: Client to be replaced required: true @@ -29308,6 +29778,8 @@ components: $ref: '#/components/schemas/TokenDuration' id_token_duration: $ref: '#/components/schemas/TokenDuration' + refresh_token_duration: + $ref: '#/components/schemas/RefreshTokenDuration' allow_all_scopes: $ref: '#/components/schemas/ClientAllowAllScopes' allow_scopes: @@ -29324,6 +29796,9 @@ components: x-property-annotations: login_uri: - x-unstable + refresh_token_duration: + - x-unstable + - x-internal CreateEventGatewayListenerRequest: description: The request schema for creating a listener. content: @@ -29337,7 +29812,7 @@ components: maxLength: 255 minLength: 1 description: - description: A human-readable description of the virtual cluster. + description: A human-readable description of the listener. type: string default: '' maxLength: 512 @@ -29365,7 +29840,7 @@ components: maxLength: 255 minLength: 1 description: - description: A human-readable description of the virtual cluster. + description: A human-readable description of the listener. type: string default: '' maxLength: 512 @@ -29456,7 +29931,7 @@ components: name: $ref: '#/components/schemas/BackendClusterName' description: - description: A human-readable description of the virtual cluster. + description: A human-readable description of the backend cluster. type: string default: '' maxLength: 512 @@ -29492,7 +29967,7 @@ components: name: $ref: '#/components/schemas/BackendClusterName' description: - description: A human-readable description of the virtual cluster. + description: A human-readable description of the backend cluster. type: string default: '' maxLength: 512 @@ -31861,6 +32336,36 @@ components: application/problem+json: schema: $ref: '#/components/schemas/BaseError' + CloudGatewaysBadRequest: + description: Bad Request + content: + application/problem+json: + schema: + $ref: '#/components/schemas/BadRequestError' + CloudGatewaysForbidden: + description: Forbidden + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ForbiddenError' + CloudGatewaysConflict: + description: Conflict + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ConflictError' + CreateAddOnResponse: + description: Response format for creating an add-on. + content: + application/json: + schema: + $ref: '#/components/schemas/AddOnResponse' + RetrieveAddOnResponse: + description: Response format for retrieving an add-on by ID. + content: + application/json: + schema: + $ref: '#/components/schemas/AddOnResponse' securitySchemes: personalAccessToken: type: http @@ -31964,6 +32469,7 @@ tags: description: | Configure a schema registry that can be used to validate payloads when producing/consuming messages - name: Event Gateway Vaults + - name: Add-Ons security: - personalAccessToken: [] - systemAccountAccessToken: [] diff --git a/tests/resources/cloud_gateway_test.go b/tests/resources/cloud_gateway_test.go new file mode 100644 index 00000000..9622908a --- /dev/null +++ b/tests/resources/cloud_gateway_test.go @@ -0,0 +1,92 @@ +package tests + +import ( + "testing" + + "github.com/Kong/shared-speakeasy/hclbuilder" + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-plugin-testing/plancheck" + "github.com/kong/terraform-provider-konnect-beta/internal/provider" + "github.com/stretchr/testify/require" +) + +var ( + providerFactoryBeta = map[string]func() (tfprotov6.ProviderServer, error){ + "konnect-beta": providerserver.NewProtocol6WithError(provider.New("")()), + } +) + +func TestCloudGatewayAddOn(t *testing.T) { + t.Run("Cloud Gateways AddOns", func(t *testing.T) { + builder := hclbuilder.New() + cp, err := hclbuilder.FromString(` + resource "konnect_gateway_control_plane" "test_cp" { + name = "tf-test-cp-us-external" + cloud_gateway = true + } + `) + require.NoError(t, err) + addon, err := hclbuilder.FromString(` + resource "konnect-beta_cloud_gateway_add_on" "my_addon" { + provider = konnect-beta + name = "tf-test-add-on" + + config = { + create_managed_cache_add_on_config = { + kind = "managed-cache.v0" + + capacity_config = { + tiered_capacity_config = { + kind = "tiered" + tier = "small" + } + } + } + } + owner = { + control_plane_add_on_owner = { + kind = "control-plane" + control_plane_geo = "us" + control_plane_id = konnect_gateway_control_plane.test_cp.id + } + } + } + `) + require.NoError(t, err) + + fullConfig := builder. + Upsert(cp). + Upsert(addon). + Build() + + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: providerFactoryBeta, + ExternalProviders: map[string]resource.ExternalProvider{ + "konnect": {Source: "kong/konnect"}, + }, + Steps: []resource.TestStep{ + { + Config: fullConfig, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectResourceAction( + "konnect-beta_cloud_gateway_add_on.my_addon", + plancheck.ResourceActionCreate, + ), + }, + }, + }, + { + Config: fullConfig, + ConfigPlanChecks: resource.ConfigPlanChecks{ + PreApply: []plancheck.PlanCheck{ + plancheck.ExpectEmptyPlan(), + }, + }, + }, + }, + }) + }) +}