From e028a7163deed796d56194837184d7aaf98f4a8c Mon Sep 17 00:00:00 2001 From: Heng Lu Date: Mon, 29 May 2023 10:06:41 +0800 Subject: [PATCH] `springcloud` - update sdk to `2023-05-01-preview` --- go.mod | 2 +- go.sum | 4 +- .../services/springcloud/client/client.go | 2 +- .../spring_cloud_accelerator_resource.go | 2 +- ...spring_cloud_active_deployment_resource.go | 2 +- ...cloud_api_portal_custom_domain_resource.go | 2 +- .../spring_cloud_api_portal_resource.go | 2 +- ...cloud_app_cosmosdb_association_resource.go | 2 +- ...ng_cloud_app_mysql_association_resource.go | 2 +- ...ng_cloud_app_redis_association_resource.go | 2 +- .../springcloud/spring_cloud_app_resource.go | 2 +- ...ng_cloud_application_live_view_resource.go | 2 +- .../spring_cloud_build_deployment_resource.go | 2 +- ...pring_cloud_build_pack_binding_resource.go | 2 +- .../spring_cloud_builder_resource.go | 2 +- .../spring_cloud_certificate_resource.go | 2 +- ...ng_cloud_configuration_service_resource.go | 2 +- ...ing_cloud_container_deployment_resource.go | 2 +- .../spring_cloud_custom_domain_resource.go | 2 +- ...g_cloud_customized_accelerator_resource.go | 2 +- .../spring_cloud_dev_tool_portal_resource.go | 2 +- ...ng_cloud_gateway_custom_domain_resource.go | 2 +- .../spring_cloud_gateway_resource.go | 2 +- ...ing_cloud_gateway_route_config_resource.go | 2 +- .../spring_cloud_java_deployment_resource.go | 2 +- .../spring_cloud_service_resource.go | 2 +- .../spring_cloud_storage_resource.go | 2 +- .../appplatform/apiportalcustomdomains.go | 8 +- .../appplatform/apiportals.go | 10 +- .../2023-05-01-preview/appplatform/apms.go | 517 +++++++++++ .../appplatform/applicationaccelerators.go | 8 +- .../appplatform/applicationliveviews.go | 8 +- .../appplatform/apps.go | 16 +- .../appplatform/bindings.go | 10 +- .../appplatform/buildpackbinding.go | 10 +- .../appplatform/buildservice.go | 30 +- .../appplatform/buildserviceagentpool.go | 6 +- .../appplatform/buildservicebuilder.go | 10 +- .../appplatform/certificates.go | 8 +- .../appplatform/client.go | 2 +- .../appplatform/configservers.go | 8 +- .../appplatform/configurationservices.go | 10 +- .../appplatform/containerregistries.go | 189 +++- .../appplatform/customdomains.go | 10 +- .../appplatform/customizedaccelerators.go | 10 +- .../appplatform/deployments.go | 32 +- .../appplatform/devtoolportals.go | 8 +- .../appplatform/enums.go | 106 ++- .../appplatform/eurekaservers.go | 377 ++++++++ .../appplatform/gatewaycustomdomains.go | 8 +- .../appplatform/gatewayrouteconfigs.go | 8 +- .../appplatform/gateways.go | 16 +- .../appplatform/models.go | 869 +++++++++++++++++- .../appplatform/monitoringsettings.go | 6 +- .../appplatform/operations.go | 2 +- .../appplatform/predefinedaccelerators.go | 8 +- .../appplatform/runtimeversions.go | 2 +- .../appplatform/serviceregistries.go | 8 +- .../appplatform/services.go | 414 ++++++++- .../appplatform/skus.go | 2 +- .../appplatform/storages.go | 8 +- .../appplatform/version.go | 2 +- .../2021-06-01-preview/synapse/models.go | 8 +- .../tombuildsstuff/kermit/version/version.go | 2 +- vendor/modules.txt | 4 +- 65 files changed, 2609 insertions(+), 207 deletions(-) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/apiportalcustomdomains.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/apiportals.go (99%) create mode 100644 vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apms.go rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/applicationaccelerators.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/applicationliveviews.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/apps.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/bindings.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/buildpackbinding.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/buildservice.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/buildserviceagentpool.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/buildservicebuilder.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/certificates.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/client.go (97%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/configservers.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/configurationservices.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/containerregistries.go (63%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/customdomains.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/customizedaccelerators.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/deployments.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/devtoolportals.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/enums.go (91%) create mode 100644 vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/eurekaservers.go rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/gatewaycustomdomains.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/gatewayrouteconfigs.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/gateways.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/models.go (94%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/monitoringsettings.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/operations.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/predefinedaccelerators.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/runtimeversions.go (98%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/serviceregistries.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/services.go (73%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/skus.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/storages.go (99%) rename vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/{2023-03-01-preview => 2023-05-01-preview}/appplatform/version.go (97%) diff --git a/go.mod b/go.mod index 3d53efe57597..52218db4bf94 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/rickb777/date v1.12.5-0.20200422084442-6300e543c4d9 github.com/sergi/go-diff v1.2.0 github.com/tombuildsstuff/giovanni v0.20.0 - github.com/tombuildsstuff/kermit v0.20230518.1143920 + github.com/tombuildsstuff/kermit v0.20230526.1080329 golang.org/x/crypto v0.9.0 golang.org/x/net v0.10.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 392db1e9c647..2c64c7794f29 100644 --- a/go.sum +++ b/go.sum @@ -289,8 +289,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tombuildsstuff/giovanni v0.20.0 h1:IM/I/iNWMXnPYwcSq8uxV7TKDlv7Nejq0bRK9i6O/C0= github.com/tombuildsstuff/giovanni v0.20.0/go.mod h1:66KVLYma2whJhEdxPSPL3GQHkulhK+C5CluKfHGfPF4= -github.com/tombuildsstuff/kermit v0.20230518.1143920 h1:V3ZVMuXREY0qcAVXfZbM6ZmkzwYINZihAyvE7wcnm8U= -github.com/tombuildsstuff/kermit v0.20230518.1143920/go.mod h1:YleYDYRKTGy5ihWHG9u3CwyVTr0l8dOLkYtVEPjnzGI= +github.com/tombuildsstuff/kermit v0.20230526.1080329 h1:UfZQ1r3+0pY7NRv8Z+uWjD1UudpoBrvVV3/Fbeq2FBk= +github.com/tombuildsstuff/kermit v0.20230526.1080329/go.mod h1:YleYDYRKTGy5ihWHG9u3CwyVTr0l8dOLkYtVEPjnzGI= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/internal/services/springcloud/client/client.go b/internal/services/springcloud/client/client.go index f86a2d9dca1c..c2f5d7d83315 100644 --- a/internal/services/springcloud/client/client.go +++ b/internal/services/springcloud/client/client.go @@ -2,7 +2,7 @@ package client import ( "github.com/hashicorp/terraform-provider-azurerm/internal/common" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) type Client struct { diff --git a/internal/services/springcloud/spring_cloud_accelerator_resource.go b/internal/services/springcloud/spring_cloud_accelerator_resource.go index f0ea08247e28..11ac7bd54626 100644 --- a/internal/services/springcloud/spring_cloud_accelerator_resource.go +++ b/internal/services/springcloud/spring_cloud_accelerator_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) type SpringCloudAcceleratorModel struct { diff --git a/internal/services/springcloud/spring_cloud_active_deployment_resource.go b/internal/services/springcloud/spring_cloud_active_deployment_resource.go index 52df51665a8a..4d4a03aac99d 100644 --- a/internal/services/springcloud/spring_cloud_active_deployment_resource.go +++ b/internal/services/springcloud/spring_cloud_active_deployment_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/services/springcloud/validate" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudActiveDeployment() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_api_portal_custom_domain_resource.go b/internal/services/springcloud/spring_cloud_api_portal_custom_domain_resource.go index 0ab62314fca6..49a867f8a3f8 100644 --- a/internal/services/springcloud/spring_cloud_api_portal_custom_domain_resource.go +++ b/internal/services/springcloud/spring_cloud_api_portal_custom_domain_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudAPIPortalCustomDomain() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_api_portal_resource.go b/internal/services/springcloud/spring_cloud_api_portal_resource.go index e99b54c3775f..fc5084801161 100644 --- a/internal/services/springcloud/spring_cloud_api_portal_resource.go +++ b/internal/services/springcloud/spring_cloud_api_portal_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudAPIPortal() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_app_cosmosdb_association_resource.go b/internal/services/springcloud/spring_cloud_app_cosmosdb_association_resource.go index b28e455cc14b..2f89d350a927 100644 --- a/internal/services/springcloud/spring_cloud_app_cosmosdb_association_resource.go +++ b/internal/services/springcloud/spring_cloud_app_cosmosdb_association_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) const ( diff --git a/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go b/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go index d5e04750ab07..cffc6d541227 100644 --- a/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go +++ b/internal/services/springcloud/spring_cloud_app_mysql_association_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) const ( diff --git a/internal/services/springcloud/spring_cloud_app_redis_association_resource.go b/internal/services/springcloud/spring_cloud_app_redis_association_resource.go index 08ea17e8dee9..c07ba6d485f9 100644 --- a/internal/services/springcloud/spring_cloud_app_redis_association_resource.go +++ b/internal/services/springcloud/spring_cloud_app_redis_association_resource.go @@ -16,7 +16,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) const springCloudAppRedisAssociationKeySSL = "useSsl" diff --git a/internal/services/springcloud/spring_cloud_app_resource.go b/internal/services/springcloud/spring_cloud_app_resource.go index 538f3f39c4c7..33f3d362112c 100644 --- a/internal/services/springcloud/spring_cloud_app_resource.go +++ b/internal/services/springcloud/spring_cloud_app_resource.go @@ -19,7 +19,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudApp() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_application_live_view_resource.go b/internal/services/springcloud/spring_cloud_application_live_view_resource.go index c56c9cb5a3f2..0ca35bf06904 100644 --- a/internal/services/springcloud/spring_cloud_application_live_view_resource.go +++ b/internal/services/springcloud/spring_cloud_application_live_view_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) type SpringCloudApplicationLiveViewModel struct { diff --git a/internal/services/springcloud/spring_cloud_build_deployment_resource.go b/internal/services/springcloud/spring_cloud_build_deployment_resource.go index e1a56739a3c1..f743a22f6750 100644 --- a/internal/services/springcloud/spring_cloud_build_deployment_resource.go +++ b/internal/services/springcloud/spring_cloud_build_deployment_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudBuildDeployment() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_build_pack_binding_resource.go b/internal/services/springcloud/spring_cloud_build_pack_binding_resource.go index 8d3435c0f846..e5571dee4ec3 100644 --- a/internal/services/springcloud/spring_cloud_build_pack_binding_resource.go +++ b/internal/services/springcloud/spring_cloud_build_pack_binding_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudBuildPackBinding() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_builder_resource.go b/internal/services/springcloud/spring_cloud_builder_resource.go index 0a6bf9c3f1b0..edba4f165f6b 100644 --- a/internal/services/springcloud/spring_cloud_builder_resource.go +++ b/internal/services/springcloud/spring_cloud_builder_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudBuildServiceBuilder() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_certificate_resource.go b/internal/services/springcloud/spring_cloud_certificate_resource.go index cfbe4f26bdd7..7726ea375ce6 100644 --- a/internal/services/springcloud/spring_cloud_certificate_resource.go +++ b/internal/services/springcloud/spring_cloud_certificate_resource.go @@ -18,7 +18,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudCertificate() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_configuration_service_resource.go b/internal/services/springcloud/spring_cloud_configuration_service_resource.go index 393f03719ea6..fa818eee7866 100644 --- a/internal/services/springcloud/spring_cloud_configuration_service_resource.go +++ b/internal/services/springcloud/spring_cloud_configuration_service_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudConfigurationService() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_container_deployment_resource.go b/internal/services/springcloud/spring_cloud_container_deployment_resource.go index a8e78bbe855d..d24c231d3c94 100644 --- a/internal/services/springcloud/spring_cloud_container_deployment_resource.go +++ b/internal/services/springcloud/spring_cloud_container_deployment_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudContainerDeployment() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_custom_domain_resource.go b/internal/services/springcloud/spring_cloud_custom_domain_resource.go index 2a67cc56af00..800aff51eced 100644 --- a/internal/services/springcloud/spring_cloud_custom_domain_resource.go +++ b/internal/services/springcloud/spring_cloud_custom_domain_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudCustomDomain() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_customized_accelerator_resource.go b/internal/services/springcloud/spring_cloud_customized_accelerator_resource.go index 00cf29841592..6de93e41699f 100644 --- a/internal/services/springcloud/spring_cloud_customized_accelerator_resource.go +++ b/internal/services/springcloud/spring_cloud_customized_accelerator_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) type SpringCloudCustomizedAcceleratorModel struct { diff --git a/internal/services/springcloud/spring_cloud_dev_tool_portal_resource.go b/internal/services/springcloud/spring_cloud_dev_tool_portal_resource.go index bdc8b75a15ca..dfcfdf54e930 100644 --- a/internal/services/springcloud/spring_cloud_dev_tool_portal_resource.go +++ b/internal/services/springcloud/spring_cloud_dev_tool_portal_resource.go @@ -13,7 +13,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk" "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) type SpringCloudDevToolPortalModel struct { diff --git a/internal/services/springcloud/spring_cloud_gateway_custom_domain_resource.go b/internal/services/springcloud/spring_cloud_gateway_custom_domain_resource.go index 338c6f594b35..dcc8b6d2ccc0 100644 --- a/internal/services/springcloud/spring_cloud_gateway_custom_domain_resource.go +++ b/internal/services/springcloud/spring_cloud_gateway_custom_domain_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudGatewayCustomDomain() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_gateway_resource.go b/internal/services/springcloud/spring_cloud_gateway_resource.go index 687d54731fd5..59c17f0d3334 100644 --- a/internal/services/springcloud/spring_cloud_gateway_resource.go +++ b/internal/services/springcloud/spring_cloud_gateway_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudGateway() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_gateway_route_config_resource.go b/internal/services/springcloud/spring_cloud_gateway_route_config_resource.go index 1cfca3d03d08..f5f6555b284e 100644 --- a/internal/services/springcloud/spring_cloud_gateway_route_config_resource.go +++ b/internal/services/springcloud/spring_cloud_gateway_route_config_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudGatewayRouteConfig() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_java_deployment_resource.go b/internal/services/springcloud/spring_cloud_java_deployment_resource.go index 4578d2c4ba07..d8bde6d69e4c 100644 --- a/internal/services/springcloud/spring_cloud_java_deployment_resource.go +++ b/internal/services/springcloud/spring_cloud_java_deployment_resource.go @@ -15,7 +15,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudJavaDeployment() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_service_resource.go b/internal/services/springcloud/spring_cloud_service_resource.go index 081039d3ed2d..7239416a8ff9 100644 --- a/internal/services/springcloud/spring_cloud_service_resource.go +++ b/internal/services/springcloud/spring_cloud_service_resource.go @@ -22,7 +22,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudService() *pluginsdk.Resource { diff --git a/internal/services/springcloud/spring_cloud_storage_resource.go b/internal/services/springcloud/spring_cloud_storage_resource.go index d7296b8545f9..31dc44ba26c4 100644 --- a/internal/services/springcloud/spring_cloud_storage_resource.go +++ b/internal/services/springcloud/spring_cloud_storage_resource.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform" + "github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform" ) func resourceSpringCloudStorage() *pluginsdk.Resource { diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportalcustomdomains.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportalcustomdomains.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportalcustomdomains.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportalcustomdomains.go index bb68c9c82cc3..36447693c3b8 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportalcustomdomains.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportalcustomdomains.go @@ -83,7 +83,7 @@ func (client APIPortalCustomDomainsClient) CreateOrUpdatePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +175,7 @@ func (client APIPortalCustomDomainsClient) DeletePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -271,7 +271,7 @@ func (client APIPortalCustomDomainsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -361,7 +361,7 @@ func (client APIPortalCustomDomainsClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportals.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportals.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportals.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportals.go index 77173c086292..95fcb0933975 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apiportals.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apiportals.go @@ -80,7 +80,7 @@ func (client APIPortalsClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client APIPortalsClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -264,7 +264,7 @@ func (client APIPortalsClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +352,7 @@ func (client APIPortalsClient) ListPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -477,7 +477,7 @@ func (client APIPortalsClient) ValidateDomainPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apms.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apms.go new file mode 100644 index 000000000000..203c7ac3823a --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apms.go @@ -0,0 +1,517 @@ +package appplatform + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// ApmsClient is the REST API for Azure Spring Apps +type ApmsClient struct { + BaseClient +} + +// NewApmsClient creates an instance of the ApmsClient client. +func NewApmsClient(subscriptionID string) ApmsClient { + return NewApmsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApmsClientWithBaseURI creates an instance of the ApmsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewApmsClientWithBaseURI(baseURI string, subscriptionID string) ApmsClient { + return ApmsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update an APM. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apmName - the name of the APM +// apmResource - parameters for the create or update operation +func (client ApmsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apmName string, apmResource ApmResource) (result ApmsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apmName, + Constraints: []validation.Constraint{{Target: "apmName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apmResource, + Constraints: []validation.Constraint{{Target: "apmResource.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "apmResource.Properties.Type", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("appplatform.ApmsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, apmName, apmResource) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApmsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apmName string, apmResource ApmResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "apmName": autorest.Encode("path", apmName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}", pathParameters), + autorest.WithJSON(apmResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ApmsClient) CreateOrUpdateSender(req *http.Request) (future ApmsCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApmsClient) CreateOrUpdateResponder(resp *http.Response) (result ApmResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete operation to delete an APM +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apmName - the name of the APM +func (client ApmsClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (result ApmsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apmName, + Constraints: []validation.Constraint{{Target: "apmName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ApmsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, apmName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ApmsClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "apmName": autorest.Encode("path", apmName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ApmsClient) DeleteSender(req *http.Request) (future ApmsDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApmsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get the APM by name. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apmName - the name of the APM +func (client ApmsClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (result ApmResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apmName, + Constraints: []validation.Constraint{{Target: "apmName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ApmsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName, apmName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApmsClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "apmName": autorest.Encode("path", apmName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ApmsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApmsClient) GetResponder(resp *http.Response) (result ApmResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get collection of APMs. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +func (client ApmsClient) List(ctx context.Context, resourceGroupName string, serviceName string) (result ApmResourceCollectionPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.List") + defer func() { + sc := -1 + if result.arc.Response.Response != nil { + sc = result.arc.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ApmsClient", "List", err.Error()) + } + + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.arc.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "List", resp, "Failure sending request") + return + } + + result.arc, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "List", resp, "Failure responding to request") + return + } + if result.arc.hasNextLink() && result.arc.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ApmsClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ApmsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApmsClient) ListResponder(resp *http.Response) (result ApmResourceCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ApmsClient) listNextResults(ctx context.Context, lastResults ApmResourceCollection) (result ApmResourceCollection, err error) { + req, err := lastResults.apmResourceCollectionPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appplatform.ApmsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "appplatform.ApmsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ApmsClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string) (result ApmResourceCollectionIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, serviceName) + return +} + +// ListSecretKeys list keys of APM sensitive properties. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apmName - the name of the APM +func (client ApmsClient) ListSecretKeys(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (result ApmSecretKeys, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmsClient.ListSecretKeys") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apmName, + Constraints: []validation.Constraint{{Target: "apmName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ApmsClient", "ListSecretKeys", err.Error()) + } + + req, err := client.ListSecretKeysPreparer(ctx, resourceGroupName, serviceName, apmName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "ListSecretKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListSecretKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "ListSecretKeys", resp, "Failure sending request") + return + } + + result, err = client.ListSecretKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsClient", "ListSecretKeys", resp, "Failure responding to request") + return + } + + return +} + +// ListSecretKeysPreparer prepares the ListSecretKeys request. +func (client ApmsClient) ListSecretKeysPreparer(ctx context.Context, resourceGroupName string, serviceName string, apmName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "apmName": autorest.Encode("path", apmName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apms/{apmName}/listSecretKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSecretKeysSender sends the ListSecretKeys request. The method will close the +// http.Response Body if it receives an error. +func (client ApmsClient) ListSecretKeysSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSecretKeysResponder handles the response to the ListSecretKeys request. The method always +// closes the http.Response Body. +func (client ApmsClient) ListSecretKeysResponder(resp *http.Response) (result ApmSecretKeys, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationaccelerators.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationaccelerators.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationaccelerators.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationaccelerators.go index ff49347f2e23..a007c4573344 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationaccelerators.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationaccelerators.go @@ -81,7 +81,7 @@ func (client ApplicationAcceleratorsClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client ApplicationAcceleratorsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +265,7 @@ func (client ApplicationAcceleratorsClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +353,7 @@ func (client ApplicationAcceleratorsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationliveviews.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationliveviews.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationliveviews.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationliveviews.go index 1b48d2b6574a..d0f2fd56b48c 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/applicationliveviews.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/applicationliveviews.go @@ -81,7 +81,7 @@ func (client ApplicationLiveViewsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client ApplicationLiveViewsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +265,7 @@ func (client ApplicationLiveViewsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +353,7 @@ func (client ApplicationLiveViewsClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apps.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apps.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apps.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apps.go index 2f6c30eb6d14..4acc680ee198 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/apps.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/apps.go @@ -99,7 +99,7 @@ func (client AppsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -189,7 +189,7 @@ func (client AppsClient) DeletePreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,7 +284,7 @@ func (client AppsClient) GetPreparer(ctx context.Context, resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -372,7 +372,7 @@ func (client AppsClient) GetResourceUploadURLPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -460,7 +460,7 @@ func (client AppsClient) ListPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -576,7 +576,7 @@ func (client AppsClient) SetActiveDeploymentsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -667,7 +667,7 @@ func (client AppsClient) UpdatePreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -767,7 +767,7 @@ func (client AppsClient) ValidateDomainPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/bindings.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/bindings.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/bindings.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/bindings.go index 394c7a1f5897..86b7f2a5f4cb 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/bindings.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/bindings.go @@ -82,7 +82,7 @@ func (client BindingsClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -174,7 +174,7 @@ func (client BindingsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -270,7 +270,7 @@ func (client BindingsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -360,7 +360,7 @@ func (client BindingsClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -478,7 +478,7 @@ func (client BindingsClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildpackbinding.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildpackbinding.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildpackbinding.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildpackbinding.go index 339b7ae99dd2..728c52a20234 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildpackbinding.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildpackbinding.go @@ -85,7 +85,7 @@ func (client BuildpackBindingClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +179,7 @@ func (client BuildpackBindingClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -277,7 +277,7 @@ func (client BuildpackBindingClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -369,7 +369,7 @@ func (client BuildpackBindingClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -494,7 +494,7 @@ func (client BuildpackBindingClient) ListForClusterPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservice.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservice.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservice.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservice.go index 6e5a30443167..44f2d28e6fb5 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservice.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservice.go @@ -80,7 +80,7 @@ func (client BuildServiceClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +180,7 @@ func (client BuildServiceClient) CreateOrUpdateBuildPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -262,7 +262,7 @@ func (client BuildServiceClient) DeleteBuildPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -358,7 +358,7 @@ func (client BuildServiceClient) GetBuildPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,7 +447,7 @@ func (client BuildServiceClient) GetBuildResultPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +536,7 @@ func (client BuildServiceClient) GetBuildResultLogPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -621,7 +621,7 @@ func (client BuildServiceClient) GetBuildServicePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -706,7 +706,7 @@ func (client BuildServiceClient) GetResourceUploadURLPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -793,7 +793,7 @@ func (client BuildServiceClient) GetSupportedBuildpackPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -880,7 +880,7 @@ func (client BuildServiceClient) GetSupportedStackPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -972,7 +972,7 @@ func (client BuildServiceClient) ListBuildResultsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1097,7 +1097,7 @@ func (client BuildServiceClient) ListBuildServicesPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1224,7 +1224,7 @@ func (client BuildServiceClient) ListBuildsPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1346,7 +1346,7 @@ func (client BuildServiceClient) ListSupportedBuildpacksPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1431,7 +1431,7 @@ func (client BuildServiceClient) ListSupportedStacksPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildserviceagentpool.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildserviceagentpool.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildserviceagentpool.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildserviceagentpool.go index 281eab43a294..65156a1c9228 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildserviceagentpool.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildserviceagentpool.go @@ -89,7 +89,7 @@ func (client BuildServiceAgentPoolClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +179,7 @@ func (client BuildServiceAgentPoolClient) ListPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -297,7 +297,7 @@ func (client BuildServiceAgentPoolClient) UpdatePutPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservicebuilder.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservicebuilder.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservicebuilder.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservicebuilder.go index 1305e954407b..a9a61139e06b 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/buildservicebuilder.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/buildservicebuilder.go @@ -83,7 +83,7 @@ func (client BuildServiceBuilderClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +175,7 @@ func (client BuildServiceBuilderClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -271,7 +271,7 @@ func (client BuildServiceBuilderClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -361,7 +361,7 @@ func (client BuildServiceBuilderClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -485,7 +485,7 @@ func (client BuildServiceBuilderClient) ListDeploymentsPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/certificates.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/certificates.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/certificates.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/certificates.go index 681a19c5311d..59644eda3384 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/certificates.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/certificates.go @@ -80,7 +80,7 @@ func (client CertificatesClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client CertificatesClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -264,7 +264,7 @@ func (client CertificatesClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +352,7 @@ func (client CertificatesClient) ListPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/client.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/client.go similarity index 97% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/client.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/client.go index 3386fdf57172..dac81750584c 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/client.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/client.go @@ -1,4 +1,4 @@ -// Package appplatform implements the Azure ARM Appplatform service API version 2023-03-01-preview. +// Package appplatform implements the Azure ARM Appplatform service API version 2023-05-01-preview. // // REST API for Azure Spring Apps package appplatform diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configservers.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configservers.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configservers.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configservers.go index 99253f8a059f..e4e6805581ed 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configservers.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configservers.go @@ -84,7 +84,7 @@ func (client ConfigServersClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +161,7 @@ func (client ConfigServersClient) UpdatePatchPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client ConfigServersClient) UpdatePutPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -349,7 +349,7 @@ func (client ConfigServersClient) ValidatePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configurationservices.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configurationservices.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configurationservices.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configurationservices.go index f10e9a08c2f3..589c81128fa4 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/configurationservices.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/configurationservices.go @@ -82,7 +82,7 @@ func (client ConfigurationServicesClient) CreateOrUpdatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,7 +172,7 @@ func (client ConfigurationServicesClient) DeletePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +266,7 @@ func (client ConfigurationServicesClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -354,7 +354,7 @@ func (client ConfigurationServicesClient) ListPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -470,7 +470,7 @@ func (client ConfigurationServicesClient) ValidatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/containerregistries.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/containerregistries.go similarity index 63% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/containerregistries.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/containerregistries.go index f97981d61f58..efa76bfafcda 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/containerregistries.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/containerregistries.go @@ -83,7 +83,7 @@ func (client ContainerRegistriesClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,6 +126,95 @@ func (client ContainerRegistriesClient) CreateOrUpdateResponder(resp *http.Respo return } +// Delete delete a container registry resource. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// containerRegistryName - the name of the container registry. +func (client ContainerRegistriesClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string) (result ContainerRegistriesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerRegistriesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: containerRegistryName, + Constraints: []validation.Constraint{{Target: "containerRegistryName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ContainerRegistriesClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, serviceName, containerRegistryName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ContainerRegistriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerRegistryName": autorest.Encode("path", containerRegistryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerRegistriesClient) DeleteSender(req *http.Request) (future ContainerRegistriesDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ContainerRegistriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Get get the container registries resource. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value @@ -182,7 +271,7 @@ func (client ContainerRegistriesClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -270,7 +359,7 @@ func (client ContainerRegistriesClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,3 +426,97 @@ func (client ContainerRegistriesClient) ListComplete(ctx context.Context, resour result.page, err = client.List(ctx, resourceGroupName, serviceName) return } + +// Validate check if the container registry properties are valid. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// containerRegistryName - the name of the container registry. +// containerRegistryProperties - parameters for the validate operation +func (client ContainerRegistriesClient) Validate(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryProperties ContainerRegistryProperties) (result ContainerRegistriesValidateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ContainerRegistriesClient.Validate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: containerRegistryName, + Constraints: []validation.Constraint{{Target: "containerRegistryName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ContainerRegistriesClient", "Validate", err.Error()) + } + + req, err := client.ValidatePreparer(ctx, resourceGroupName, serviceName, containerRegistryName, containerRegistryProperties) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesClient", "Validate", nil, "Failure preparing request") + return + } + + result, err = client.ValidateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesClient", "Validate", result.Response(), "Failure sending request") + return + } + + return +} + +// ValidatePreparer prepares the Validate request. +func (client ContainerRegistriesClient) ValidatePreparer(ctx context.Context, resourceGroupName string, serviceName string, containerRegistryName string, containerRegistryProperties ContainerRegistryProperties) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerRegistryName": autorest.Encode("path", containerRegistryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + containerRegistryProperties.ProvisioningState = "" + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/containerRegistries/{containerRegistryName}/validate", pathParameters), + autorest.WithJSON(containerRegistryProperties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ValidateSender sends the Validate request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerRegistriesClient) ValidateSender(req *http.Request) (future ContainerRegistriesValidateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ValidateResponder handles the response to the Validate request. The method always +// closes the http.Response Body. +func (client ContainerRegistriesClient) ValidateResponder(resp *http.Response) (result ContainerRegistryValidateResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customdomains.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customdomains.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customdomains.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customdomains.go index 4ee28988f42a..1e6674f9d794 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customdomains.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customdomains.go @@ -82,7 +82,7 @@ func (client CustomDomainsClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -174,7 +174,7 @@ func (client CustomDomainsClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -270,7 +270,7 @@ func (client CustomDomainsClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -360,7 +360,7 @@ func (client CustomDomainsClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -478,7 +478,7 @@ func (client CustomDomainsClient) UpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customizedaccelerators.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customizedaccelerators.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customizedaccelerators.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customizedaccelerators.go index 9c5b03d5d202..1c24e39e406d 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/customizedaccelerators.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/customizedaccelerators.go @@ -88,7 +88,7 @@ func (client CustomizedAcceleratorsClient) CreateOrUpdatePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +180,7 @@ func (client CustomizedAcceleratorsClient) DeletePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -276,7 +276,7 @@ func (client CustomizedAcceleratorsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -366,7 +366,7 @@ func (client CustomizedAcceleratorsClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -494,7 +494,7 @@ func (client CustomizedAcceleratorsClient) ValidatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/deployments.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/deployments.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/deployments.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/deployments.go index 250b445d81f0..ede5aca2b93d 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/deployments.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/deployments.go @@ -93,7 +93,7 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,7 +185,7 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,7 +274,7 @@ func (client DeploymentsClient) DisableRemoteDebuggingPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -365,7 +365,7 @@ func (client DeploymentsClient) EnableRemoteDebuggingPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,7 +461,7 @@ func (client DeploymentsClient) GenerateHeapDumpPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,7 +553,7 @@ func (client DeploymentsClient) GenerateThreadDumpPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -651,7 +651,7 @@ func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -738,7 +738,7 @@ func (client DeploymentsClient) GetLogFileURLPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -825,7 +825,7 @@ func (client DeploymentsClient) GetRemoteDebuggingConfigPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -916,7 +916,7 @@ func (client DeploymentsClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1045,7 +1045,7 @@ func (client DeploymentsClient) ListForClusterPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1165,7 +1165,7 @@ func (client DeploymentsClient) RestartPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1254,7 +1254,7 @@ func (client DeploymentsClient) StartPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1344,7 +1344,7 @@ func (client DeploymentsClient) StartJFRPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1435,7 +1435,7 @@ func (client DeploymentsClient) StopPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1525,7 +1525,7 @@ func (client DeploymentsClient) UpdatePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/devtoolportals.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/devtoolportals.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/devtoolportals.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/devtoolportals.go index ee75ca03cd39..fdae0f166cc5 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/devtoolportals.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/devtoolportals.go @@ -80,7 +80,7 @@ func (client DevToolPortalsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client DevToolPortalsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -264,7 +264,7 @@ func (client DevToolPortalsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +352,7 @@ func (client DevToolPortalsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/enums.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/enums.go similarity index 91% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/enums.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/enums.go index 42ea76c1a121..58226d976ecc 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/enums.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/enums.go @@ -40,6 +40,29 @@ func PossibleActionTypeValues() []ActionType { return []ActionType{ActionTypeInternal} } +// ApmProvisioningState enumerates the values for apm provisioning state. +type ApmProvisioningState string + +const ( + // ApmProvisioningStateCanceled ... + ApmProvisioningStateCanceled ApmProvisioningState = "Canceled" + // ApmProvisioningStateCreating ... + ApmProvisioningStateCreating ApmProvisioningState = "Creating" + // ApmProvisioningStateDeleting ... + ApmProvisioningStateDeleting ApmProvisioningState = "Deleting" + // ApmProvisioningStateFailed ... + ApmProvisioningStateFailed ApmProvisioningState = "Failed" + // ApmProvisioningStateSucceeded ... + ApmProvisioningStateSucceeded ApmProvisioningState = "Succeeded" + // ApmProvisioningStateUpdating ... + ApmProvisioningStateUpdating ApmProvisioningState = "Updating" +) + +// PossibleApmProvisioningStateValues returns an array of possible values for the ApmProvisioningState const type. +func PossibleApmProvisioningStateValues() []ApmProvisioningState { + return []ApmProvisioningState{ApmProvisioningStateCanceled, ApmProvisioningStateCreating, ApmProvisioningStateDeleting, ApmProvisioningStateFailed, ApmProvisioningStateSucceeded, ApmProvisioningStateUpdating} +} + // ApmType enumerates the values for apm type. type ApmType string @@ -312,6 +335,21 @@ func PossibleCertificateResourceProvisioningStateValues() []CertificateResourceP return []CertificateResourceProvisioningState{CertificateResourceProvisioningStateCreating, CertificateResourceProvisioningStateDeleting, CertificateResourceProvisioningStateFailed, CertificateResourceProvisioningStateSucceeded, CertificateResourceProvisioningStateUpdating} } +// ConfigServerEnabledState enumerates the values for config server enabled state. +type ConfigServerEnabledState string + +const ( + // ConfigServerEnabledStateDisabled Disable the config server. + ConfigServerEnabledStateDisabled ConfigServerEnabledState = "Disabled" + // ConfigServerEnabledStateEnabled Enable the config server. + ConfigServerEnabledStateEnabled ConfigServerEnabledState = "Enabled" +) + +// PossibleConfigServerEnabledStateValues returns an array of possible values for the ConfigServerEnabledState const type. +func PossibleConfigServerEnabledStateValues() []ConfigServerEnabledState { + return []ConfigServerEnabledState{ConfigServerEnabledStateDisabled, ConfigServerEnabledStateEnabled} +} + // ConfigServerState enumerates the values for config server state. type ConfigServerState string @@ -333,6 +371,21 @@ func PossibleConfigServerStateValues() []ConfigServerState { return []ConfigServerState{ConfigServerStateDeleted, ConfigServerStateFailed, ConfigServerStateNotAvailable, ConfigServerStateSucceeded, ConfigServerStateUpdating} } +// ConfigurationServiceGeneration enumerates the values for configuration service generation. +type ConfigurationServiceGeneration string + +const ( + // ConfigurationServiceGenerationGen1 ... + ConfigurationServiceGenerationGen1 ConfigurationServiceGeneration = "Gen1" + // ConfigurationServiceGenerationGen2 ... + ConfigurationServiceGenerationGen2 ConfigurationServiceGeneration = "Gen2" +) + +// PossibleConfigurationServiceGenerationValues returns an array of possible values for the ConfigurationServiceGeneration const type. +func PossibleConfigurationServiceGenerationValues() []ConfigurationServiceGeneration { + return []ConfigurationServiceGeneration{ConfigurationServiceGenerationGen1, ConfigurationServiceGenerationGen2} +} + // ConfigurationServiceProvisioningState enumerates the values for configuration service provisioning state. type ConfigurationServiceProvisioningState string @@ -362,6 +415,8 @@ const ( ContainerRegistryProvisioningStateCanceled ContainerRegistryProvisioningState = "Canceled" // ContainerRegistryProvisioningStateCreating ... ContainerRegistryProvisioningStateCreating ContainerRegistryProvisioningState = "Creating" + // ContainerRegistryProvisioningStateDeleting ... + ContainerRegistryProvisioningStateDeleting ContainerRegistryProvisioningState = "Deleting" // ContainerRegistryProvisioningStateFailed ... ContainerRegistryProvisioningStateFailed ContainerRegistryProvisioningState = "Failed" // ContainerRegistryProvisioningStateSucceeded ... @@ -372,7 +427,7 @@ const ( // PossibleContainerRegistryProvisioningStateValues returns an array of possible values for the ContainerRegistryProvisioningState const type. func PossibleContainerRegistryProvisioningStateValues() []ContainerRegistryProvisioningState { - return []ContainerRegistryProvisioningState{ContainerRegistryProvisioningStateCanceled, ContainerRegistryProvisioningStateCreating, ContainerRegistryProvisioningStateFailed, ContainerRegistryProvisioningStateSucceeded, ContainerRegistryProvisioningStateUpdating} + return []ContainerRegistryProvisioningState{ContainerRegistryProvisioningStateCanceled, ContainerRegistryProvisioningStateCreating, ContainerRegistryProvisioningStateDeleting, ContainerRegistryProvisioningStateFailed, ContainerRegistryProvisioningStateSucceeded, ContainerRegistryProvisioningStateUpdating} } // CreatedByType enumerates the values for created by type. @@ -524,6 +579,40 @@ func PossibleDevToolPortalProvisioningStateValues() []DevToolPortalProvisioningS return []DevToolPortalProvisioningState{DevToolPortalProvisioningStateCanceled, DevToolPortalProvisioningStateCreating, DevToolPortalProvisioningStateDeleting, DevToolPortalProvisioningStateFailed, DevToolPortalProvisioningStateSucceeded, DevToolPortalProvisioningStateUpdating} } +// EurekaServerEnabledState enumerates the values for eureka server enabled state. +type EurekaServerEnabledState string + +const ( + // EurekaServerEnabledStateDisabled Disable the eureka server. + EurekaServerEnabledStateDisabled EurekaServerEnabledState = "Disabled" + // EurekaServerEnabledStateEnabled Enable the eureka server. + EurekaServerEnabledStateEnabled EurekaServerEnabledState = "Enabled" +) + +// PossibleEurekaServerEnabledStateValues returns an array of possible values for the EurekaServerEnabledState const type. +func PossibleEurekaServerEnabledStateValues() []EurekaServerEnabledState { + return []EurekaServerEnabledState{EurekaServerEnabledStateDisabled, EurekaServerEnabledStateEnabled} +} + +// EurekaServerState enumerates the values for eureka server state. +type EurekaServerState string + +const ( + // EurekaServerStateCanceled ... + EurekaServerStateCanceled EurekaServerState = "Canceled" + // EurekaServerStateFailed ... + EurekaServerStateFailed EurekaServerState = "Failed" + // EurekaServerStateSucceeded ... + EurekaServerStateSucceeded EurekaServerState = "Succeeded" + // EurekaServerStateUpdating ... + EurekaServerStateUpdating EurekaServerState = "Updating" +) + +// PossibleEurekaServerStateValues returns an array of possible values for the EurekaServerState const type. +func PossibleEurekaServerStateValues() []EurekaServerState { + return []EurekaServerState{EurekaServerStateCanceled, EurekaServerStateFailed, EurekaServerStateSucceeded, EurekaServerStateUpdating} +} + // GatewayCertificateVerification enumerates the values for gateway certificate verification. type GatewayCertificateVerification string @@ -575,6 +664,21 @@ func PossibleGatewayRouteConfigProtocolValues() []GatewayRouteConfigProtocol { return []GatewayRouteConfigProtocol{GatewayRouteConfigProtocolHTTP, GatewayRouteConfigProtocolHTTPS} } +// GitImplementation enumerates the values for git implementation. +type GitImplementation string + +const ( + // GitImplementationGoGit ... + GitImplementationGoGit GitImplementation = "go-git" + // GitImplementationLibgit2 ... + GitImplementationLibgit2 GitImplementation = "libgit2" +) + +// PossibleGitImplementationValues returns an array of possible values for the GitImplementation const type. +func PossibleGitImplementationValues() []GitImplementation { + return []GitImplementation{GitImplementationGoGit, GitImplementationLibgit2} +} + // HTTPSchemeType enumerates the values for http scheme type. type HTTPSchemeType string diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/eurekaservers.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/eurekaservers.go new file mode 100644 index 000000000000..02cb67869692 --- /dev/null +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/eurekaservers.go @@ -0,0 +1,377 @@ +package appplatform + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "net/http" + + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" +) + +// EurekaServersClient is the REST API for Azure Spring Apps +type EurekaServersClient struct { + BaseClient +} + +// NewEurekaServersClient creates an instance of the EurekaServersClient client. +func NewEurekaServersClient(subscriptionID string) EurekaServersClient { + return NewEurekaServersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEurekaServersClientWithBaseURI creates an instance of the EurekaServersClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewEurekaServersClientWithBaseURI(baseURI string, subscriptionID string) EurekaServersClient { + return EurekaServersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the eureka server settings. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +func (client EurekaServersClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result EurekaServerResource, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EurekaServersClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.EurekaServersClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client EurekaServersClient) GetPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EurekaServersClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EurekaServersClient) GetResponder(resp *http.Response) (result EurekaServerResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list the eureka server settings. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +func (client EurekaServersClient) List(ctx context.Context, resourceGroupName string, serviceName string) (result EurekaServerResourceCollection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EurekaServersClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.EurekaServersClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client EurekaServersClient) ListPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client EurekaServersClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client EurekaServersClient) ListResponder(resp *http.Response) (result EurekaServerResourceCollection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdatePatch update the eureka server settings. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// eurekaServerResource - parameters for the update operation +func (client EurekaServersClient) UpdatePatch(ctx context.Context, resourceGroupName string, serviceName string, eurekaServerResource EurekaServerResource) (result EurekaServersUpdatePatchFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EurekaServersClient.UpdatePatch") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.EurekaServersClient", "UpdatePatch", err.Error()) + } + + req, err := client.UpdatePatchPreparer(ctx, resourceGroupName, serviceName, eurekaServerResource) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "UpdatePatch", nil, "Failure preparing request") + return + } + + result, err = client.UpdatePatchSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "UpdatePatch", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePatchPreparer prepares the UpdatePatch request. +func (client EurekaServersClient) UpdatePatchPreparer(ctx context.Context, resourceGroupName string, serviceName string, eurekaServerResource EurekaServerResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default", pathParameters), + autorest.WithJSON(eurekaServerResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdatePatchSender sends the UpdatePatch request. The method will close the +// http.Response Body if it receives an error. +func (client EurekaServersClient) UpdatePatchSender(req *http.Request) (future EurekaServersUpdatePatchFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdatePatchResponder handles the response to the UpdatePatch request. The method always +// closes the http.Response Body. +func (client EurekaServersClient) UpdatePatchResponder(resp *http.Response) (result EurekaServerResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdatePut update the eureka server settings. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// eurekaServerResource - parameters for the update operation +func (client EurekaServersClient) UpdatePut(ctx context.Context, resourceGroupName string, serviceName string, eurekaServerResource EurekaServerResource) (result EurekaServersUpdatePutFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EurekaServersClient.UpdatePut") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.EurekaServersClient", "UpdatePut", err.Error()) + } + + req, err := client.UpdatePutPreparer(ctx, resourceGroupName, serviceName, eurekaServerResource) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "UpdatePut", nil, "Failure preparing request") + return + } + + result, err = client.UpdatePutSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersClient", "UpdatePut", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePutPreparer prepares the UpdatePut request. +func (client EurekaServersClient) UpdatePutPreparer(ctx context.Context, resourceGroupName string, serviceName string, eurekaServerResource EurekaServerResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/eurekaServers/default", pathParameters), + autorest.WithJSON(eurekaServerResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdatePutSender sends the UpdatePut request. The method will close the +// http.Response Body if it receives an error. +func (client EurekaServersClient) UpdatePutSender(req *http.Request) (future EurekaServersUpdatePutFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdatePutResponder handles the response to the UpdatePut request. The method always +// closes the http.Response Body. +func (client EurekaServersClient) UpdatePutResponder(resp *http.Response) (result EurekaServerResource, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewaycustomdomains.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewaycustomdomains.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewaycustomdomains.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewaycustomdomains.go index d8885df20ad1..9a339d373be4 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewaycustomdomains.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewaycustomdomains.go @@ -85,7 +85,7 @@ func (client GatewayCustomDomainsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -179,7 +179,7 @@ func (client GatewayCustomDomainsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -277,7 +277,7 @@ func (client GatewayCustomDomainsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -369,7 +369,7 @@ func (client GatewayCustomDomainsClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewayrouteconfigs.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewayrouteconfigs.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewayrouteconfigs.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewayrouteconfigs.go index f4c918062594..88ccf010e8fd 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gatewayrouteconfigs.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gatewayrouteconfigs.go @@ -86,7 +86,7 @@ func (client GatewayRouteConfigsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +180,7 @@ func (client GatewayRouteConfigsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -278,7 +278,7 @@ func (client GatewayRouteConfigsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -370,7 +370,7 @@ func (client GatewayRouteConfigsClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gateways.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gateways.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gateways.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gateways.go index 0a8967856586..35762e3c24a1 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/gateways.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/gateways.go @@ -91,7 +91,7 @@ func (client GatewaysClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -183,7 +183,7 @@ func (client GatewaysClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,7 +279,7 @@ func (client GatewaysClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -367,7 +367,7 @@ func (client GatewaysClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -491,7 +491,7 @@ func (client GatewaysClient) ListEnvSecretsPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -571,7 +571,7 @@ func (client GatewaysClient) RestartPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -661,7 +661,7 @@ func (client GatewaysClient) UpdateCapacityPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -763,7 +763,7 @@ func (client GatewaysClient) ValidateDomainPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/models.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/models.go similarity index 94% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/models.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/models.go index c91150b78592..eef9150f5a51 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/models.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/models.go @@ -19,7 +19,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "home/runner/work/kermit/kermit/sdk/appplatform/2023-03-01-preview/appplatform" +const fqdn = "home/runner/work/kermit/kermit/sdk/appplatform/2023-05-01-preview/appplatform" // APIPortalCustomDomainProperties the properties of custom domain for API portal type APIPortalCustomDomainProperties struct { @@ -978,6 +978,311 @@ type ActiveDeploymentCollection struct { ActiveDeploymentNames *[]string `json:"activeDeploymentNames,omitempty"` } +// ApmProperties properties of an APM +type ApmProperties struct { + // Type - APM Type + Type *string `json:"type,omitempty"` + // ProvisioningState - READ-ONLY; State of the APM. Possible values include: 'ApmProvisioningStateCreating', 'ApmProvisioningStateUpdating', 'ApmProvisioningStateSucceeded', 'ApmProvisioningStateFailed', 'ApmProvisioningStateDeleting', 'ApmProvisioningStateCanceled' + ProvisioningState ApmProvisioningState `json:"provisioningState,omitempty"` + // Properties - Non-sensitive properties for the APM + Properties map[string]*string `json:"properties"` + // Secrets - Sensitive properties for the APM + Secrets map[string]*string `json:"secrets"` +} + +// MarshalJSON is the custom marshaler for ApmProperties. +func (ap ApmProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ap.Type != nil { + objectMap["type"] = ap.Type + } + if ap.Properties != nil { + objectMap["properties"] = ap.Properties + } + if ap.Secrets != nil { + objectMap["secrets"] = ap.Secrets + } + return json.Marshal(objectMap) +} + +// ApmReference a reference to the APM +type ApmReference struct { + // ResourceID - Resource Id of the APM + ResourceID *string `json:"resourceId,omitempty"` +} + +// ApmResource APM Resource object +type ApmResource struct { + autorest.Response `json:"-"` + // Properties - Properties of an APM + Properties *ApmProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApmResource. +func (ar ApmResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ar.Properties != nil { + objectMap["properties"] = ar.Properties + } + if ar.SystemData != nil { + objectMap["systemData"] = ar.SystemData + } + return json.Marshal(objectMap) +} + +// ApmResourceCollection object that includes an array of APM resources and a possible link for next set +type ApmResourceCollection struct { + autorest.Response `json:"-"` + // Value - Collection of APM resources + Value *[]ApmResource `json:"value,omitempty"` + // NextLink - URL client should use to fetch the next page (per server side paging). + // It's null for now, added for future use. + NextLink *string `json:"nextLink,omitempty"` +} + +// ApmResourceCollectionIterator provides access to a complete listing of ApmResource values. +type ApmResourceCollectionIterator struct { + i int + page ApmResourceCollectionPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ApmResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmResourceCollectionIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ApmResourceCollectionIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ApmResourceCollectionIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ApmResourceCollectionIterator) Response() ApmResourceCollection { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ApmResourceCollectionIterator) Value() ApmResource { + if !iter.page.NotDone() { + return ApmResource{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ApmResourceCollectionIterator type. +func NewApmResourceCollectionIterator(page ApmResourceCollectionPage) ApmResourceCollectionIterator { + return ApmResourceCollectionIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (arc ApmResourceCollection) IsEmpty() bool { + return arc.Value == nil || len(*arc.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (arc ApmResourceCollection) hasNextLink() bool { + return arc.NextLink != nil && len(*arc.NextLink) != 0 +} + +// apmResourceCollectionPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (arc ApmResourceCollection) apmResourceCollectionPreparer(ctx context.Context) (*http.Request, error) { + if !arc.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(arc.NextLink))) +} + +// ApmResourceCollectionPage contains a page of ApmResource values. +type ApmResourceCollectionPage struct { + fn func(context.Context, ApmResourceCollection) (ApmResourceCollection, error) + arc ApmResourceCollection +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ApmResourceCollectionPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ApmResourceCollectionPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.arc) + if err != nil { + return err + } + page.arc = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ApmResourceCollectionPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ApmResourceCollectionPage) NotDone() bool { + return !page.arc.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ApmResourceCollectionPage) Response() ApmResourceCollection { + return page.arc +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ApmResourceCollectionPage) Values() []ApmResource { + if page.arc.IsEmpty() { + return nil + } + return *page.arc.Value +} + +// Creates a new instance of the ApmResourceCollectionPage type. +func NewApmResourceCollectionPage(cur ApmResourceCollection, getNextPage func(context.Context, ApmResourceCollection) (ApmResourceCollection, error)) ApmResourceCollectionPage { + return ApmResourceCollectionPage{ + fn: getNextPage, + arc: cur, + } +} + +// ApmSecretKeys keys of APM sensitive properties +type ApmSecretKeys struct { + autorest.Response `json:"-"` + // Value - Collection of the keys for the APM sensitive properties + Value *[]string `json:"value,omitempty"` +} + +// ApmsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type ApmsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApmsClient) (ApmResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApmsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApmsCreateOrUpdateFuture.Result. +func (future *ApmsCreateOrUpdateFuture) result(client ApmsClient) (ar ApmResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ApmsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent { + ar, err = client.CreateOrUpdateResponder(ar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsCreateOrUpdateFuture", "Result", ar.Response.Response, "Failure responding to request") + } + } + return +} + +// ApmsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. +type ApmsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ApmsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ApmsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ApmsDeleteFuture.Result. +func (future *ApmsDeleteFuture) result(client ApmsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ApmsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ApmsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // AppResource app resource payload type AppResource struct { autorest.Response `json:"-"` @@ -1204,6 +1509,8 @@ type AppResourceProperties struct { IngressSettings *IngressSettings `json:"ingressSettings,omitempty"` // Secrets - Collection of auth secrets Secrets *[]Secret `json:"secrets,omitempty"` + // WorkloadProfileName - The workload profile used for this app. Supported for Consumption + Dedicated plan. + WorkloadProfileName *string `json:"workloadProfileName,omitempty"` } // MarshalJSON is the custom marshaler for AppResourceProperties. @@ -1242,6 +1549,9 @@ func (arp AppResourceProperties) MarshalJSON() ([]byte, error) { if arp.Secrets != nil { objectMap["secrets"] = arp.Secrets } + if arp.WorkloadProfileName != nil { + objectMap["workloadProfileName"] = arp.WorkloadProfileName + } return json.Marshal(objectMap) } @@ -2872,6 +3182,10 @@ type BuildProperties struct { ProvisioningState BuildProvisioningState `json:"provisioningState,omitempty"` // Env - The environment variables for this build Env map[string]*string `json:"env"` + // Apms - The APMs for this build + Apms *[]ApmReference `json:"apms,omitempty"` + // Certificates - The CA Certificates for this build + Certificates *[]CertificateReference `json:"certificates,omitempty"` // TriggeredBuildResult - The build result triggered by this build TriggeredBuildResult *TriggeredBuildResult `json:"triggeredBuildResult,omitempty"` // ResourceRequests - The customized build resource for this build @@ -2893,6 +3207,12 @@ func (bp BuildProperties) MarshalJSON() ([]byte, error) { if bp.Env != nil { objectMap["env"] = bp.Env } + if bp.Apms != nil { + objectMap["apms"] = bp.Apms + } + if bp.Certificates != nil { + objectMap["certificates"] = bp.Certificates + } if bp.TriggeredBuildResult != nil { objectMap["triggeredBuildResult"] = bp.TriggeredBuildResult } @@ -4511,6 +4831,12 @@ func (cp CertificateProperties) AsBasicCertificateProperties() (BasicCertificate return &cp, true } +// CertificateReference a reference to the certificate +type CertificateReference struct { + // ResourceID - Resource Id of the certificate + ResourceID *string `json:"resourceId,omitempty"` +} + // CertificateResource certificate resource payload. type CertificateResource struct { autorest.Response `json:"-"` @@ -4932,6 +5258,8 @@ type ConfigServerProperties struct { ProvisioningState ConfigServerState `json:"provisioningState,omitempty"` // Error - Error when apply config server settings. Error *Error `json:"error,omitempty"` + // EnabledState - Enabled state of the config server. This is only used in Consumption tier. Possible values include: 'ConfigServerEnabledStateEnabled', 'ConfigServerEnabledStateDisabled' + EnabledState ConfigServerEnabledState `json:"enabledState,omitempty"` // ConfigServer - Settings of config server. ConfigServer *ConfigServerSettings `json:"configServer,omitempty"` } @@ -4942,6 +5270,9 @@ func (csp ConfigServerProperties) MarshalJSON() ([]byte, error) { if csp.Error != nil { objectMap["error"] = csp.Error } + if csp.EnabledState != "" { + objectMap["enabledState"] = csp.EnabledState + } if csp.ConfigServer != nil { objectMap["configServer"] = csp.ConfigServer } @@ -5165,6 +5496,10 @@ type ConfigurationServiceGitRepository struct { PrivateKey *string `json:"privateKey,omitempty"` // StrictHostKeyChecking - Strict host key checking or not. StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` + // GitImplementation - Git libraries used to support various repository providers. Possible values include: 'GitImplementationGoGit', 'GitImplementationLibgit2' + GitImplementation GitImplementation `json:"gitImplementation,omitempty"` + // CaCertResourceID - Resource Id of CA certificate for https URL of Git repository. + CaCertResourceID *string `json:"caCertResourceId,omitempty"` } // ConfigurationServiceInstance collection of instances belong to the Application Configuration Service @@ -5185,6 +5520,8 @@ func (csi ConfigurationServiceInstance) MarshalJSON() ([]byte, error) { type ConfigurationServiceProperties struct { // ProvisioningState - READ-ONLY; State of the Application Configuration Service. Possible values include: 'ConfigurationServiceProvisioningStateCreating', 'ConfigurationServiceProvisioningStateUpdating', 'ConfigurationServiceProvisioningStateSucceeded', 'ConfigurationServiceProvisioningStateFailed', 'ConfigurationServiceProvisioningStateDeleting' ProvisioningState ConfigurationServiceProvisioningState `json:"provisioningState,omitempty"` + // Generation - The generation of the Application Configuration Service. Possible values include: 'ConfigurationServiceGenerationGen1', 'ConfigurationServiceGenerationGen2' + Generation ConfigurationServiceGeneration `json:"generation,omitempty"` // ResourceRequests - The requested resource quantity for required CPU and Memory. ResourceRequests *ConfigurationServiceResourceRequests `json:"resourceRequests,omitempty"` // Instances - READ-ONLY; Collection of instances belong to Application Configuration Service. @@ -5195,6 +5532,9 @@ type ConfigurationServiceProperties struct { // MarshalJSON is the custom marshaler for ConfigurationServiceProperties. func (csp ConfigurationServiceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if csp.Generation != "" { + objectMap["generation"] = csp.Generation + } if csp.ResourceRequests != nil { objectMap["resourceRequests"] = csp.ResourceRequests } @@ -5590,24 +5930,104 @@ func (future *ContainerRegistriesCreateOrUpdateFuture) result(client ContainerRe return } -// ContainerRegistryBasicCredentials the basic authentication properties for the container registry -// resource. -type ContainerRegistryBasicCredentials struct { - // Server - The login server of the Container Registry. - Server *string `json:"server,omitempty"` - // Username - The username of the Container Registry. - Username *string `json:"username,omitempty"` - // Password - The password of the Container Registry. - Password *string `json:"password,omitempty"` - // Type - Possible values include: 'TypeContainerRegistryCredentials', 'TypeBasicAuth' - Type Type `json:"type,omitempty"` +// ContainerRegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerRegistriesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ContainerRegistriesClient) (autorest.Response, error) } -// MarshalJSON is the custom marshaler for ContainerRegistryBasicCredentials. -func (crbc ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { - crbc.Type = TypeBasicAuth - objectMap := make(map[string]interface{}) - if crbc.Server != nil { +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ContainerRegistriesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ContainerRegistriesDeleteFuture.Result. +func (future *ContainerRegistriesDeleteFuture) result(client ContainerRegistriesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ContainerRegistriesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ContainerRegistriesValidateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ContainerRegistriesValidateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ContainerRegistriesClient) (ContainerRegistryValidateResult, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ContainerRegistriesValidateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ContainerRegistriesValidateFuture.Result. +func (future *ContainerRegistriesValidateFuture) result(client ContainerRegistriesClient) (crvr ContainerRegistryValidateResult, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesValidateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + crvr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ContainerRegistriesValidateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if crvr.Response.Response, err = future.GetResult(sender); err == nil && crvr.Response.Response.StatusCode != http.StatusNoContent { + crvr, err = client.ValidateResponder(crvr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ContainerRegistriesValidateFuture", "Result", crvr.Response.Response, "Failure responding to request") + } + } + return +} + +// ContainerRegistryBasicCredentials the basic authentication properties for the container registry +// resource. +type ContainerRegistryBasicCredentials struct { + // Server - The login server of the Container Registry. + Server *string `json:"server,omitempty"` + // Username - The username of the Container Registry. + Username *string `json:"username,omitempty"` + // Password - The password of the Container Registry. + Password *string `json:"password,omitempty"` + // Type - Possible values include: 'TypeContainerRegistryCredentials', 'TypeBasicAuth' + Type Type `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ContainerRegistryBasicCredentials. +func (crbc ContainerRegistryBasicCredentials) MarshalJSON() ([]byte, error) { + crbc.Type = TypeBasicAuth + objectMap := make(map[string]interface{}) + if crbc.Server != nil { objectMap["server"] = crbc.Server } if crbc.Username != nil { @@ -5715,7 +6135,7 @@ func (crc ContainerRegistryCredentials) AsBasicContainerRegistryCredentials() (B type ContainerRegistryProperties struct { // Credentials - The credentials of the container registry resource. Credentials BasicContainerRegistryCredentials `json:"credentials,omitempty"` - // ProvisioningState - READ-ONLY; State of the Container Registry. Possible values include: 'ContainerRegistryProvisioningStateCreating', 'ContainerRegistryProvisioningStateUpdating', 'ContainerRegistryProvisioningStateSucceeded', 'ContainerRegistryProvisioningStateFailed', 'ContainerRegistryProvisioningStateCanceled' + // ProvisioningState - READ-ONLY; State of the Container Registry. Possible values include: 'ContainerRegistryProvisioningStateCreating', 'ContainerRegistryProvisioningStateUpdating', 'ContainerRegistryProvisioningStateSucceeded', 'ContainerRegistryProvisioningStateFailed', 'ContainerRegistryProvisioningStateDeleting', 'ContainerRegistryProvisioningStateCanceled' ProvisioningState ContainerRegistryProvisioningState `json:"provisioningState,omitempty"` } @@ -5945,6 +6365,15 @@ func NewContainerRegistryResourceCollectionPage(cur ContainerRegistryResourceCol } } +// ContainerRegistryValidateResult validation result for container registry properties +type ContainerRegistryValidateResult struct { + autorest.Response `json:"-"` + // IsValid - Indicate if the container registry properties are valid + IsValid *bool `json:"isValid,omitempty"` + // Message - Detailed validation messages. + Message *string `json:"message,omitempty"` +} + // ContentCertificateProperties properties of certificate imported from key vault. type ContentCertificateProperties struct { // Content - The content of uploaded certificate. @@ -7230,6 +7659,8 @@ type DeploymentSettings struct { ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` // EnvironmentVariables - Collection of environment variables EnvironmentVariables map[string]*string `json:"environmentVariables"` + // Apms - Collection of ApmReferences + Apms *[]ApmReference `json:"apms,omitempty"` // AddonConfigs - Collection of addons AddonConfigs map[string]interface{} `json:"addonConfigs"` // LivenessProbe - Periodic probe of App Instance liveness. App Instance will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes @@ -7254,6 +7685,9 @@ func (ds DeploymentSettings) MarshalJSON() ([]byte, error) { if ds.EnvironmentVariables != nil { objectMap["environmentVariables"] = ds.EnvironmentVariables } + if ds.Apms != nil { + objectMap["apms"] = ds.Apms + } if ds.AddonConfigs != nil { objectMap["addonConfigs"] = ds.AddonConfigs } @@ -8097,6 +8531,151 @@ type Error struct { Message *string `json:"message,omitempty"` } +// EurekaServerProperties eureka server properties payload +type EurekaServerProperties struct { + // ProvisioningState - READ-ONLY; State of the eureka server. Possible values include: 'EurekaServerStateFailed', 'EurekaServerStateSucceeded', 'EurekaServerStateUpdating', 'EurekaServerStateCanceled' + ProvisioningState EurekaServerState `json:"provisioningState,omitempty"` + // EnabledState - Enabled state of the eureka server. This is only used in Consumption tier. Possible values include: 'EurekaServerEnabledStateEnabled', 'EurekaServerEnabledStateDisabled' + EnabledState EurekaServerEnabledState `json:"enabledState,omitempty"` + // Error - Error when applying eureka server settings. + Error *Error `json:"error,omitempty"` +} + +// MarshalJSON is the custom marshaler for EurekaServerProperties. +func (esp EurekaServerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esp.EnabledState != "" { + objectMap["enabledState"] = esp.EnabledState + } + if esp.Error != nil { + objectMap["error"] = esp.Error + } + return json.Marshal(objectMap) +} + +// EurekaServerResource eureka server resource +type EurekaServerResource struct { + autorest.Response `json:"-"` + // Properties - Properties of the eureka server resource + Properties *EurekaServerProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource Id for the resource. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. + Type *string `json:"type,omitempty"` + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for EurekaServerResource. +func (esr EurekaServerResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if esr.Properties != nil { + objectMap["properties"] = esr.Properties + } + if esr.SystemData != nil { + objectMap["systemData"] = esr.SystemData + } + return json.Marshal(objectMap) +} + +// EurekaServerResourceCollection object that includes an array of Eureka server resources and a possible +// link for next set +type EurekaServerResourceCollection struct { + autorest.Response `json:"-"` + // Value - Collection of Eureka server resources + Value *[]EurekaServerResource `json:"value,omitempty"` + // NextLink - URL client should use to fetch the next page (per server side paging). + // It's null for now, added for future use. + NextLink *string `json:"nextLink,omitempty"` +} + +// EurekaServersUpdatePatchFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type EurekaServersUpdatePatchFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(EurekaServersClient) (EurekaServerResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *EurekaServersUpdatePatchFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for EurekaServersUpdatePatchFuture.Result. +func (future *EurekaServersUpdatePatchFuture) result(client EurekaServersClient) (esr EurekaServerResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersUpdatePatchFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + esr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.EurekaServersUpdatePatchFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if esr.Response.Response, err = future.GetResult(sender); err == nil && esr.Response.Response.StatusCode != http.StatusNoContent { + esr, err = client.UpdatePatchResponder(esr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersUpdatePatchFuture", "Result", esr.Response.Response, "Failure responding to request") + } + } + return +} + +// EurekaServersUpdatePutFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type EurekaServersUpdatePutFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(EurekaServersClient) (EurekaServerResource, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *EurekaServersUpdatePutFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for EurekaServersUpdatePutFuture.Result. +func (future *EurekaServersUpdatePutFuture) result(client EurekaServersClient) (esr EurekaServerResource, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersUpdatePutFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + esr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.EurekaServersUpdatePutFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if esr.Response.Response, err = future.GetResult(sender); err == nil && esr.Response.Response.StatusCode != http.StatusNoContent { + esr, err = client.UpdatePutResponder(esr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.EurekaServersUpdatePutFuture", "Result", esr.Response.Response, "Failure responding to request") + } + } + return +} + // ExecAction execAction describes a "run in container" action. type ExecAction struct { // Command - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. @@ -8183,6 +8762,8 @@ type GatewayAPIRoute struct { type GatewayCorsProperties struct { // AllowedOrigins - Allowed origins to make cross-site requests. The special value `*` allows all domains. AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` + // AllowedOriginPatterns - Allowed origin patterns to make cross-site requests. + AllowedOriginPatterns *[]string `json:"allowedOriginPatterns,omitempty"` // AllowedMethods - Allowed HTTP methods on cross-site requests. The special value `*` allows all methods. If not set, `GET` and `HEAD` are allowed by default. AllowedMethods *[]string `json:"allowedMethods,omitempty"` // AllowedHeaders - Allowed headers in cross-site requests. The special value `*` allows actual requests to send any header. @@ -8536,6 +9117,8 @@ type GatewayProperties struct { EnvironmentVariables *GatewayPropertiesEnvironmentVariables `json:"environmentVariables,omitempty"` // ResourceRequests - The requested resource quantity for required CPU and Memory. ResourceRequests *GatewayResourceRequests `json:"resourceRequests,omitempty"` + // AddonConfigs - Collection of addons for Spring Cloud Gateway + AddonConfigs map[string]interface{} `json:"addonConfigs"` // Instances - READ-ONLY; Collection of instances belong to Spring Cloud Gateway. Instances *[]GatewayInstance `json:"instances,omitempty"` // OperatorProperties - READ-ONLY @@ -8572,6 +9155,9 @@ func (gp GatewayProperties) MarshalJSON() ([]byte, error) { if gp.ResourceRequests != nil { objectMap["resourceRequests"] = gp.ResourceRequests } + if gp.AddonConfigs != nil { + objectMap["addonConfigs"] = gp.AddonConfigs + } return json.Marshal(objectMap) } @@ -9307,6 +9893,13 @@ type GitPatternRepository struct { StrictHostKeyChecking *bool `json:"strictHostKeyChecking,omitempty"` } +// GloballyEnabledApms globally enabled APMs payload +type GloballyEnabledApms struct { + autorest.Response `json:"-"` + // Value - Collection of the globally enabled APMs + Value *[]string `json:"value,omitempty"` +} + // HTTPGetAction hTTPGetAction describes an action based on HTTP Get requests. type HTTPGetAction struct { // Path - Path to access on the HTTP server. @@ -11526,6 +12119,80 @@ func (future *ServicesDeleteFuture) result(client ServicesClient) (ar autorest.R return } +// ServicesDisableApmGloballyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ServicesDisableApmGloballyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServicesDisableApmGloballyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServicesDisableApmGloballyFuture.Result. +func (future *ServicesDisableApmGloballyFuture) result(client ServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesDisableApmGloballyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ServicesDisableApmGloballyFuture") + return + } + ar.Response = future.Response() + return +} + +// ServicesEnableApmGloballyFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ServicesEnableApmGloballyFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ServicesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ServicesEnableApmGloballyFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ServicesEnableApmGloballyFuture.Result. +func (future *ServicesEnableApmGloballyFuture) result(client ServicesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesEnableApmGloballyFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("appplatform.ServicesEnableApmGloballyFuture") + return + } + ar.Response = future.Response() + return +} + // ServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ServicesStartFuture struct { @@ -12225,6 +12892,172 @@ func (future *StoragesDeleteFuture) result(client StoragesClient) (ar autorest.R return } +// SupportedApmType supported APM type +type SupportedApmType struct { + // Name - The name of the supported APM type + Name *string `json:"name,omitempty"` +} + +// SupportedApmTypes supported APM types payload +type SupportedApmTypes struct { + autorest.Response `json:"-"` + // Value - Collection of the supported APM type + Value *[]SupportedApmType `json:"value,omitempty"` + // NextLink - URL client should use to fetch the next page (per server side paging). + // It's null for now, added for future use. + NextLink *string `json:"nextLink,omitempty"` +} + +// SupportedApmTypesIterator provides access to a complete listing of SupportedApmType values. +type SupportedApmTypesIterator struct { + i int + page SupportedApmTypesPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *SupportedApmTypesIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SupportedApmTypesIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *SupportedApmTypesIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter SupportedApmTypesIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter SupportedApmTypesIterator) Response() SupportedApmTypes { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter SupportedApmTypesIterator) Value() SupportedApmType { + if !iter.page.NotDone() { + return SupportedApmType{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the SupportedApmTypesIterator type. +func NewSupportedApmTypesIterator(page SupportedApmTypesPage) SupportedApmTypesIterator { + return SupportedApmTypesIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (sat SupportedApmTypes) IsEmpty() bool { + return sat.Value == nil || len(*sat.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (sat SupportedApmTypes) hasNextLink() bool { + return sat.NextLink != nil && len(*sat.NextLink) != 0 +} + +// supportedApmTypesPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (sat SupportedApmTypes) supportedApmTypesPreparer(ctx context.Context) (*http.Request, error) { + if !sat.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(sat.NextLink))) +} + +// SupportedApmTypesPage contains a page of SupportedApmType values. +type SupportedApmTypesPage struct { + fn func(context.Context, SupportedApmTypes) (SupportedApmTypes, error) + sat SupportedApmTypes +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *SupportedApmTypesPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/SupportedApmTypesPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.sat) + if err != nil { + return err + } + page.sat = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *SupportedApmTypesPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page SupportedApmTypesPage) NotDone() bool { + return !page.sat.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page SupportedApmTypesPage) Response() SupportedApmTypes { + return page.sat +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page SupportedApmTypesPage) Values() []SupportedApmType { + if page.sat.IsEmpty() { + return nil + } + return *page.sat.Value +} + +// Creates a new instance of the SupportedApmTypesPage type. +func NewSupportedApmTypesPage(cur SupportedApmTypes, getNextPage func(context.Context, SupportedApmTypes) (SupportedApmTypes, error)) SupportedApmTypesPage { + return SupportedApmTypesPage{ + fn: getNextPage, + sat: cur, + } +} + // SupportedBuildpackResource supported buildpack resource payload type SupportedBuildpackResource struct { autorest.Response `json:"-"` diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/monitoringsettings.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/monitoringsettings.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/monitoringsettings.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/monitoringsettings.go index b675d09df6b6..f2506dd8e49a 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/monitoringsettings.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/monitoringsettings.go @@ -85,7 +85,7 @@ func (client MonitoringSettingsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client MonitoringSettingsClient) UpdatePatchPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -258,7 +258,7 @@ func (client MonitoringSettingsClient) UpdatePutPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/operations.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/operations.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/operations.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/operations.go index 12082d6f5c4a..3a7dc45c1eef 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/operations.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/operations.go @@ -72,7 +72,7 @@ func (client OperationsClient) List(ctx context.Context) (result AvailableOperat // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/predefinedaccelerators.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/predefinedaccelerators.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/predefinedaccelerators.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/predefinedaccelerators.go index 6d2c7df41bf4..b068fc139e3a 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/predefinedaccelerators.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/predefinedaccelerators.go @@ -82,7 +82,7 @@ func (client PredefinedAcceleratorsClient) DisablePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client PredefinedAcceleratorsClient) EnablePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +267,7 @@ func (client PredefinedAcceleratorsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +357,7 @@ func (client PredefinedAcceleratorsClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/runtimeversions.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/runtimeversions.go similarity index 98% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/runtimeversions.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/runtimeversions.go index f6fd8a89a843..711c6b4624f2 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/runtimeversions.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/runtimeversions.go @@ -67,7 +67,7 @@ func (client RuntimeVersionsClient) ListRuntimeVersions(ctx context.Context) (re // ListRuntimeVersionsPreparer prepares the ListRuntimeVersions request. func (client RuntimeVersionsClient) ListRuntimeVersionsPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/serviceregistries.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/serviceregistries.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/serviceregistries.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/serviceregistries.go index dadc0af2ce73..9514c7326720 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/serviceregistries.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/serviceregistries.go @@ -80,7 +80,7 @@ func (client ServiceRegistriesClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,7 +168,7 @@ func (client ServiceRegistriesClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -262,7 +262,7 @@ func (client ServiceRegistriesClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -350,7 +350,7 @@ func (client ServiceRegistriesClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/services.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/services.go similarity index 73% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/services.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/services.go index 5e05ad2d5fcf..7c044318d1ac 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/services.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/services.go @@ -83,7 +83,7 @@ func (client ServicesClient) CheckNameAvailabilityPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client ServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client ServicesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -290,6 +290,96 @@ func (client ServicesClient) DeleteResponder(resp *http.Response) (result autore return } +// DisableApmGlobally disable an APM globally. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apm - the target APM for the disable operation +func (client ServicesClient) DisableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference) (result ServicesDisableApmGloballyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.DisableApmGlobally") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apm, + Constraints: []validation.Constraint{{Target: "apm.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ServicesClient", "DisableApmGlobally", err.Error()) + } + + req, err := client.DisableApmGloballyPreparer(ctx, resourceGroupName, serviceName, apm) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "DisableApmGlobally", nil, "Failure preparing request") + return + } + + result, err = client.DisableApmGloballySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "DisableApmGlobally", result.Response(), "Failure sending request") + return + } + + return +} + +// DisableApmGloballyPreparer prepares the DisableApmGlobally request. +func (client ServicesClient) DisableApmGloballyPreparer(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/disableApmGlobally", pathParameters), + autorest.WithJSON(apm), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DisableApmGloballySender sends the DisableApmGlobally request. The method will close the +// http.Response Body if it receives an error. +func (client ServicesClient) DisableApmGloballySender(req *http.Request) (future ServicesDisableApmGloballyFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DisableApmGloballyResponder handles the response to the DisableApmGlobally request. The method always +// closes the http.Response Body. +func (client ServicesClient) DisableApmGloballyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // DisableTestEndpoint disable test endpoint functionality for a Service. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value @@ -342,7 +432,7 @@ func (client ServicesClient) DisableTestEndpointPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -372,6 +462,96 @@ func (client ServicesClient) DisableTestEndpointResponder(resp *http.Response) ( return } +// EnableApmGlobally enable an APM globally. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +// apm - the target APM for the enable operation +func (client ServicesClient) EnableApmGlobally(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference) (result ServicesEnableApmGloballyFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.EnableApmGlobally") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}, + {TargetValue: apm, + Constraints: []validation.Constraint{{Target: "apm.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ServicesClient", "EnableApmGlobally", err.Error()) + } + + req, err := client.EnableApmGloballyPreparer(ctx, resourceGroupName, serviceName, apm) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "EnableApmGlobally", nil, "Failure preparing request") + return + } + + result, err = client.EnableApmGloballySender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "EnableApmGlobally", result.Response(), "Failure sending request") + return + } + + return +} + +// EnableApmGloballyPreparer prepares the EnableApmGlobally request. +func (client ServicesClient) EnableApmGloballyPreparer(ctx context.Context, resourceGroupName string, serviceName string, apm ApmReference) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/enableApmGlobally", pathParameters), + autorest.WithJSON(apm), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// EnableApmGloballySender sends the EnableApmGlobally request. The method will close the +// http.Response Body if it receives an error. +func (client ServicesClient) EnableApmGloballySender(req *http.Request) (future ServicesEnableApmGloballyFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// EnableApmGloballyResponder handles the response to the EnableApmGlobally request. The method always +// closes the http.Response Body. +func (client ServicesClient) EnableApmGloballyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // EnableTestEndpoint enable test endpoint functionality for a Service. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value @@ -424,7 +604,7 @@ func (client ServicesClient) EnableTestEndpointPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -507,7 +687,7 @@ func (client ServicesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -587,7 +767,7 @@ func (client ServicesClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -700,7 +880,7 @@ func (client ServicesClient) ListBySubscriptionPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -768,6 +948,214 @@ func (client ServicesClient) ListBySubscriptionComplete(ctx context.Context) (re return } +// ListGloballyEnabledApms list globally enabled APMs for a Service. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +func (client ServicesClient) ListGloballyEnabledApms(ctx context.Context, resourceGroupName string, serviceName string) (result GloballyEnabledApms, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.ListGloballyEnabledApms") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ServicesClient", "ListGloballyEnabledApms", err.Error()) + } + + req, err := client.ListGloballyEnabledApmsPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListGloballyEnabledApms", nil, "Failure preparing request") + return + } + + resp, err := client.ListGloballyEnabledApmsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListGloballyEnabledApms", resp, "Failure sending request") + return + } + + result, err = client.ListGloballyEnabledApmsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListGloballyEnabledApms", resp, "Failure responding to request") + return + } + + return +} + +// ListGloballyEnabledApmsPreparer prepares the ListGloballyEnabledApms request. +func (client ServicesClient) ListGloballyEnabledApmsPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/listGloballyEnabledApms", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListGloballyEnabledApmsSender sends the ListGloballyEnabledApms request. The method will close the +// http.Response Body if it receives an error. +func (client ServicesClient) ListGloballyEnabledApmsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListGloballyEnabledApmsResponder handles the response to the ListGloballyEnabledApms request. The method always +// closes the http.Response Body. +func (client ServicesClient) ListGloballyEnabledApmsResponder(resp *http.Response) (result GloballyEnabledApms, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSupportedApmTypes list supported APM types for a Service. +// Parameters: +// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. +// serviceName - the name of the Service resource. +func (client ServicesClient) ListSupportedApmTypes(ctx context.Context, resourceGroupName string, serviceName string) (result SupportedApmTypesPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.ListSupportedApmTypes") + defer func() { + sc := -1 + if result.sat.Response.Response != nil { + sc = result.sat.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: serviceName, + Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9-]*[a-z0-9]$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("appplatform.ServicesClient", "ListSupportedApmTypes", err.Error()) + } + + result.fn = client.listSupportedApmTypesNextResults + req, err := client.ListSupportedApmTypesPreparer(ctx, resourceGroupName, serviceName) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListSupportedApmTypes", nil, "Failure preparing request") + return + } + + resp, err := client.ListSupportedApmTypesSender(req) + if err != nil { + result.sat.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListSupportedApmTypes", resp, "Failure sending request") + return + } + + result.sat, err = client.ListSupportedApmTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "ListSupportedApmTypes", resp, "Failure responding to request") + return + } + if result.sat.hasNextLink() && result.sat.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListSupportedApmTypesPreparer prepares the ListSupportedApmTypes request. +func (client ServicesClient) ListSupportedApmTypesPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serviceName": autorest.Encode("path", serviceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2023-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/supportedApmTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSupportedApmTypesSender sends the ListSupportedApmTypes request. The method will close the +// http.Response Body if it receives an error. +func (client ServicesClient) ListSupportedApmTypesSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListSupportedApmTypesResponder handles the response to the ListSupportedApmTypes request. The method always +// closes the http.Response Body. +func (client ServicesClient) ListSupportedApmTypesResponder(resp *http.Response) (result SupportedApmTypes, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listSupportedApmTypesNextResults retrieves the next set of results, if any. +func (client ServicesClient) listSupportedApmTypesNextResults(ctx context.Context, lastResults SupportedApmTypes) (result SupportedApmTypes, err error) { + req, err := lastResults.supportedApmTypesPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "appplatform.ServicesClient", "listSupportedApmTypesNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSupportedApmTypesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "appplatform.ServicesClient", "listSupportedApmTypesNextResults", resp, "Failure sending next results request") + } + result, err = client.ListSupportedApmTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "appplatform.ServicesClient", "listSupportedApmTypesNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListSupportedApmTypesComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServicesClient) ListSupportedApmTypesComplete(ctx context.Context, resourceGroupName string, serviceName string) (result SupportedApmTypesIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServicesClient.ListSupportedApmTypes") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListSupportedApmTypes(ctx, resourceGroupName, serviceName) + return +} + // ListTestKeys list test keys for a Service. // Parameters: // resourceGroupName - the name of the resource group that contains the resource. You can obtain this value @@ -820,7 +1208,7 @@ func (client ServicesClient) ListTestKeysPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -904,7 +1292,7 @@ func (client ServicesClient) RegenerateTestKeyPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -982,7 +1370,7 @@ func (client ServicesClient) StartPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1067,7 +1455,7 @@ func (client ServicesClient) StopPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1153,7 +1541,7 @@ func (client ServicesClient) UpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/skus.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/skus.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/skus.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/skus.go index 7207550481f6..9a2ea17e15a2 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/skus.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/skus.go @@ -76,7 +76,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/storages.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/storages.go similarity index 99% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/storages.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/storages.go index 31ab9403c638..e7af7140caf4 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/storages.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/storages.go @@ -80,7 +80,7 @@ func (client StoragesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client StoragesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -264,7 +264,7 @@ func (client StoragesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +352,7 @@ func (client StoragesClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2023-03-01-preview" + const APIVersion = "2023-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/version.go b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/version.go similarity index 97% rename from vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/version.go rename to vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/version.go index 10f6ff299b93..32586292d65b 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform/version.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform/version.go @@ -10,7 +10,7 @@ import "github.com/tombuildsstuff/kermit/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "tombuildsstuff/kermit/" + Version() + " appplatform/2023-03-01-preview" + return "tombuildsstuff/kermit/" + Version() + " appplatform/2023-05-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/tombuildsstuff/kermit/sdk/synapse/2021-06-01-preview/synapse/models.go b/vendor/github.com/tombuildsstuff/kermit/sdk/synapse/2021-06-01-preview/synapse/models.go index 37cd399db646..f79c36ee71ad 100644 --- a/vendor/github.com/tombuildsstuff/kermit/sdk/synapse/2021-06-01-preview/synapse/models.go +++ b/vendor/github.com/tombuildsstuff/kermit/sdk/synapse/2021-06-01-preview/synapse/models.go @@ -248001,8 +248001,8 @@ type WebActivityAuthentication struct { Username *string `json:"username,omitempty"` // Password - Password for the PFX file or basic authentication. Password BasicSecretBase `json:"password,omitempty"` - // Resource - Resource for which Azure Auth token will be requested when using MSI Authentication. - Resource *string `json:"resource,omitempty"` + // Resource - Resource for which Azure Auth token will be requested when using MSI Authentication. Type: string (or Expression with resultType string). + Resource interface{} `json:"resource,omitempty"` } // UnmarshalJSON is the custom unmarshaler for WebActivityAuthentication struct. @@ -248050,12 +248050,12 @@ func (waa *WebActivityAuthentication) UnmarshalJSON(body []byte) error { } case "resource": if v != nil { - var resource string + var resource interface{} err = json.Unmarshal(*v, &resource) if err != nil { return err } - waa.Resource = &resource + waa.Resource = resource } } } diff --git a/vendor/github.com/tombuildsstuff/kermit/version/version.go b/vendor/github.com/tombuildsstuff/kermit/version/version.go index b5e5551ed9cd..86ec90be1c0f 100644 --- a/vendor/github.com/tombuildsstuff/kermit/version/version.go +++ b/vendor/github.com/tombuildsstuff/kermit/version/version.go @@ -1,3 +1,3 @@ package version -const Number = "v0.20230518.1143920" +const Number = "v0.20230526.1080329" diff --git a/vendor/modules.txt b/vendor/modules.txt index d79afb807adb..12ea8eb453c9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -822,10 +822,10 @@ github.com/tombuildsstuff/giovanni/storage/accesscontrol github.com/tombuildsstuff/giovanni/storage/internal/endpoints github.com/tombuildsstuff/giovanni/storage/internal/metadata github.com/tombuildsstuff/giovanni/version -# github.com/tombuildsstuff/kermit v0.20230518.1143920 +# github.com/tombuildsstuff/kermit v0.20230526.1080329 ## explicit; go 1.18 github.com/tombuildsstuff/kermit/sdk/appconfiguration/1.0/appconfiguration -github.com/tombuildsstuff/kermit/sdk/appplatform/2023-03-01-preview/appplatform +github.com/tombuildsstuff/kermit/sdk/appplatform/2023-05-01-preview/appplatform github.com/tombuildsstuff/kermit/sdk/attestation/2022-08-01/attestation github.com/tombuildsstuff/kermit/sdk/batch/2022-01.15.0/batch github.com/tombuildsstuff/kermit/sdk/botservice/2021-05-01-preview/botservice