diff --git a/Makefile b/Makefile index f7501b418f5..241139122ef 100644 --- a/Makefile +++ b/Makefile @@ -206,7 +206,7 @@ validate-cainjection-files: # Generate manifests for helm and package them up .PHONY: helm-chart-manifests -helm-chart-manifests: LATEST_TAG := $(shell curl -sL https://api.github.com/repos/Azure/azure-service-operator/releases/latest | jq '.tag_name' --raw-output ) +helm-chart-manifests: LATEST_TAG := $(shell curl -sL https://api.github.com/repos/Azure/azure-service-operator/releases | jq '[.[] | select(.tag_name | startswith("1.0")).tag_name][0]' --raw-output ) helm-chart-manifests: KUBE_RBAC_PROXY := gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 helm-chart-manifests: generate @echo "Latest released tag is $(LATEST_TAG)" diff --git a/charts/azure-service-operator-1.12.0.tgz b/charts/azure-service-operator-1.12.0.tgz new file mode 100644 index 00000000000..30d215b13cd Binary files /dev/null and b/charts/azure-service-operator-1.12.0.tgz differ diff --git a/charts/azure-service-operator/Chart.yaml b/charts/azure-service-operator/Chart.yaml index 56385155a26..0f329cd43b9 100644 --- a/charts/azure-service-operator/Chart.yaml +++ b/charts/azure-service-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: azure-service-operator -version: 1.11.0 -appVersion: 1.0.45297 +version: 1.12.0 +appVersion: 1.0.59040 description: Deploy components and dependencies of azure-service-operator home: https://github.com/Azure/azure-service-operator sources: diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlactions.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlactions.azure.microsoft.com.yaml index 60d6ced0d11..c975425a153 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlactions.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlactions.azure.microsoft.com.yaml @@ -62,6 +62,8 @@ spec: type: string serverSecretKeyVault: type: string + subscriptionId: + type: string userSecretKeyVault: type: string required: diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqldatabases.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqldatabases.azure.microsoft.com.yaml index 2fafef62db1..f9e94cb7e6c 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqldatabases.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqldatabases.azure.microsoft.com.yaml @@ -205,6 +205,8 @@ spec: required: - name type: object + subscriptionId: + type: string weekOfYear: format: int32 type: integer @@ -213,6 +215,7 @@ spec: yearlyRetention: type: string required: + - edition - location - resourceGroup - server diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfailovergroups.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfailovergroups.azure.microsoft.com.yaml index 675bf3bd110..230d87cab0a 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfailovergroups.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfailovergroups.azure.microsoft.com.yaml @@ -162,6 +162,8 @@ spec: spec: description: AzureSqlFailoverGroupSpec defines the desired state of AzureSqlFailoverGroup properties: + SecondaryServerSubscriptionId: + type: string databaseList: items: type: string @@ -196,6 +198,8 @@ spec: server: minLength: 1 type: string + subscriptionId: + type: string required: - databaseList - failoverGracePeriod diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfirewallrules.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfirewallrules.azure.microsoft.com.yaml index 26c950c91df..c9836663192 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfirewallrules.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlfirewallrules.azure.microsoft.com.yaml @@ -155,6 +155,8 @@ spec: type: string startIpAddress: type: string + subscriptionID: + type: string required: - resourceGroup - server diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlmanagedusers.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlmanagedusers.azure.microsoft.com.yaml index 2005e97faa1..59823792c25 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlmanagedusers.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlmanagedusers.azure.microsoft.com.yaml @@ -67,6 +67,8 @@ spec: server: minLength: 1 type: string + subscriptionId: + type: string required: - dbName - managedIdentityClientId diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlservers.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlservers.azure.microsoft.com.yaml index ea8d97010d3..d18abfad289 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlservers.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlservers.azure.microsoft.com.yaml @@ -149,6 +149,8 @@ spec: minLength: 1 pattern: ^[-\w\._\(\)]+$ type: string + subscriptionId: + type: string required: - location - resourceGroup diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlusers.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlusers.azure.microsoft.com.yaml index 9bfcac76ae8..d86ca0de8a3 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlusers.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlusers.azure.microsoft.com.yaml @@ -45,7 +45,6 @@ spec: description: AzureSQLUserSpec defines the desired state of SqlUser properties: adminSecret: - description: optional type: string adminSecretKeyVault: type: string @@ -71,6 +70,9 @@ spec: server: minLength: 1 type: string + subscriptionId: + description: optional + type: string username: type: string required: diff --git a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlvnetrules.azure.microsoft.com.yaml b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlvnetrules.azure.microsoft.com.yaml index 90c208bbc18..78aa906f004 100644 --- a/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlvnetrules.azure.microsoft.com.yaml +++ b/charts/azure-service-operator/crds/apiextensions.k8s.io_v1_customresourcedefinition_azuresqlvnetrules.azure.microsoft.com.yaml @@ -57,6 +57,8 @@ spec: server: minLength: 1 type: string + serverSubscriptionID: + type: string subnetName: type: string vNetName: diff --git a/charts/azure-service-operator/values.yaml b/charts/azure-service-operator/values.yaml index 6e246d1ef75..8bf3bf47889 100644 --- a/charts/azure-service-operator/values.yaml +++ b/charts/azure-service-operator/values.yaml @@ -48,7 +48,7 @@ recoverSoftDeletedKeyVaultSecrets: True # corresponding CRD yaml in the cart (and so no CRD in the k8s # repository). image: - repository: mcr.microsoft.com/k8s/azureserviceoperator:1.0.45297 + repository: mcr.microsoft.com/k8s/azureserviceoperator:1.0.59040 kubeRBACProxy: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 # installAadPodIdentity determines if the aad-pod-identity subchart should be installed. diff --git a/charts/index.yaml b/charts/index.yaml index daeacea674f..8838910ed17 100644 --- a/charts/index.yaml +++ b/charts/index.yaml @@ -1,9 +1,26 @@ apiVersion: v1 entries: azure-service-operator: + - apiVersion: v2 + appVersion: 1.0.59040 + created: "2023-06-14T20:49:59.882254535Z" + dependencies: + - condition: installAadPodIdentity + name: aad-pod-identity + repository: https://raw.githubusercontent.com/Azure/aad-pod-identity/master/charts + version: 4.1.9 + description: Deploy components and dependencies of azure-service-operator + digest: 6c019f7349b413b9d59e41fa2befcf20171bd3a5fba09e5b6247e6458c4dc4ee + home: https://github.com/Azure/azure-service-operator + name: azure-service-operator + sources: + - https://github.com/Azure/azure-service-operator + urls: + - azure-service-operator-1.12.0.tgz + version: 1.12.0 - apiVersion: v2 appVersion: 1.0.45297 - created: "2022-07-29T22:11:53.712151172Z" + created: "2023-06-14T20:49:59.879235895Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -20,7 +37,7 @@ entries: version: 1.11.0 - apiVersion: v2 appVersion: 1.0.39435 - created: "2022-07-29T22:11:53.708389881Z" + created: "2023-06-14T20:49:59.877141044Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -37,7 +54,7 @@ entries: version: 1.10.0 - apiVersion: v2 appVersion: 1.0.28631 - created: "2022-07-29T22:11:53.746124088Z" + created: "2023-06-14T20:49:59.899129212Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -54,7 +71,7 @@ entries: version: 1.9.0 - apiVersion: v2 appVersion: 1.0.28631 - created: "2022-07-29T22:11:53.733547119Z" + created: "2023-06-14T20:49:59.89723051Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -71,7 +88,7 @@ entries: version: 1.8.0 - apiVersion: v2 appVersion: 1.0.27207 - created: "2022-07-29T22:11:53.731312024Z" + created: "2023-06-14T20:49:59.895052889Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -88,7 +105,7 @@ entries: version: 1.7.0 - apiVersion: v2 appVersion: 1.0.24492 - created: "2022-07-29T22:11:53.728443231Z" + created: "2023-06-14T20:49:59.891652991Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -105,7 +122,7 @@ entries: version: 1.6.0 - apiVersion: v2 appVersion: 1.0.24492 - created: "2022-07-29T22:11:53.726515636Z" + created: "2023-06-14T20:49:59.889778885Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -122,7 +139,7 @@ entries: version: 1.5.0 - apiVersion: v2 appVersion: 1.0.23956 - created: "2022-07-29T22:11:53.72480264Z" + created: "2023-06-14T20:49:59.888101095Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -139,7 +156,7 @@ entries: version: 1.4.0 - apiVersion: v2 appVersion: 1.0.23694 - created: "2022-07-29T22:11:53.716022262Z" + created: "2023-06-14T20:49:59.885660994Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -156,7 +173,7 @@ entries: version: 1.3.0 - apiVersion: v2 appVersion: 1.0.22275 - created: "2022-07-29T22:11:53.714181867Z" + created: "2023-06-14T20:49:59.883989582Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -173,7 +190,7 @@ entries: version: 1.2.0 - apiVersion: v2 appVersion: 0.1.0 - created: "2022-07-29T22:11:53.705921787Z" + created: "2023-06-14T20:49:59.874792911Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -190,7 +207,7 @@ entries: version: 1.1.0 - apiVersion: v2 appVersion: 0.1.0 - created: "2022-07-29T22:11:53.703722993Z" + created: "2023-06-14T20:49:59.871222855Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -207,7 +224,7 @@ entries: version: 1.0.0 - apiVersion: v2 appVersion: 0.1.0 - created: "2022-07-29T22:11:53.699061804Z" + created: "2023-06-14T20:49:59.869257541Z" dependencies: - condition: installAadPodIdentity name: aad-pod-identity @@ -222,4 +239,4 @@ entries: urls: - azure-service-operator-0.1.0.tgz version: 0.1.0 -generated: "2022-07-29T22:11:53.697048209Z" +generated: "2023-06-14T20:49:59.867354816Z" diff --git a/v2/api/search/customizations/search_service_extension.go b/v2/api/search/customizations/search_service_extension.go new file mode 100644 index 00000000000..781b3155a54 --- /dev/null +++ b/v2/api/search/customizations/search_service_extension.go @@ -0,0 +1,150 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package customizations + +import ( + "context" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch" + "github.com/go-logr/logr" + "github.com/pkg/errors" + "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/conversion" + + search "github.com/Azure/azure-service-operator/v2/api/search/v1api20220901storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + . "github.com/Azure/azure-service-operator/v2/internal/logging" + "github.com/Azure/azure-service-operator/v2/internal/util/to" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" +) + +var _ genruntime.KubernetesExporter = &SearchServiceExtension{} + +func (ext *SearchServiceExtension) ExportKubernetesResources( + ctx context.Context, + obj genruntime.MetaObject, + armClient *genericarmclient.GenericClient, + log logr.Logger) ([]client.Object, error) { + + // This has to be the current hub devices version. It will need to be updated + // if the hub devices version changes. + typedObj, ok := obj.(*search.SearchService) + if !ok { + return nil, errors.Errorf("cannot run on unknown resource type %T, expected *devices.IotHub", obj) + } + + // Type assert that we are the hub type. This will fail to compile if + // the hub type has been changed but this extension has not + var _ conversion.Hub = typedObj + + hasSecrets := secretsSpecified(typedObj) + if !hasSecrets { + log.V(Debug).Info("No secrets retrieval to perform as operatorSpec is empty") + return nil, nil + } + + id, err := genruntime.GetAndParseResourceID(typedObj) + if err != nil { + return nil, err + } + + queryKeys := make(map[string]armsearch.QueryKey) + var adminKeys armsearch.AdminKeysClientGetResponse + // Only bother calling ListKeys if there are secrets to retrieve + if hasSecrets { + subscription := id.SubscriptionID + // Using armClient.ClientOptions() here ensures we share the same HTTP connection, so this is not opening a new + // connection each time through + var queryKeysClient *armsearch.QueryKeysClient + queryKeysClient, err = armsearch.NewQueryKeysClient(subscription, armClient.Creds(), armClient.ClientOptions()) + if err != nil { + return nil, errors.Wrapf(err, "failed to create new SeachServiceQueryClient") + } + + var pager *runtime.Pager[armsearch.QueryKeysClientListBySearchServiceResponse] + var resp armsearch.QueryKeysClientListBySearchServiceResponse + pager = queryKeysClient.NewListBySearchServicePager(id.ResourceGroupName, typedObj.AzureName(), nil, nil) + for pager.More() { + resp, err = pager.NextPage(ctx) + addSecretsToMap(resp.Value, queryKeys) + } + + if err != nil { + return nil, errors.Wrapf(err, "failed listing query keys") + } + + var adminKeysClient *armsearch.AdminKeysClient + adminKeysClient, err = armsearch.NewAdminKeysClient(subscription, armClient.Creds(), armClient.ClientOptions()) + if err != nil { + return nil, errors.Wrapf(err, "failed to create new SeachServiceAdminClient") + } + + adminKeys, err = adminKeysClient.Get(ctx, id.ResourceGroupName, typedObj.AzureName(), nil, nil) + if err != nil { + return nil, err + } + } + + secretSlice, err := secretsToWrite(typedObj, queryKeys, adminKeys) + if err != nil { + return nil, err + } + + return secrets.SliceToClientObjectSlice(secretSlice), nil +} + +func secretsSpecified(obj *search.SearchService) bool { + if obj.Spec.OperatorSpec == nil || obj.Spec.OperatorSpec.Secrets == nil { + return false + } + + secrets := obj.Spec.OperatorSpec.Secrets + + if secrets.AdminPrimaryKey != nil || + secrets.AdminSecondaryKey != nil || + secrets.QueryKey != nil { + return true + } + + return false +} + +func addSecretsToMap(keys []*armsearch.QueryKey, result map[string]armsearch.QueryKey) { + for _, key := range keys { + if key == nil { + continue + } + + // We have to do it this way, since the autogenerated query key has key.Name == nil. See screenshot in https://learn.microsoft.com/en-us/azure/search/search-security-api-keys?tabs=portal-use%2Cportal-find%2Cportal-query#find-existing-keys + if key.Name == nil && key.Key != nil { + result["default"] = *key + continue + } + + result[*key.Name] = *key + } +} + +func secretsToWrite(obj *search.SearchService, queryKeys map[string]armsearch.QueryKey, adminKeys armsearch.AdminKeysClientGetResponse) ([]*v1.Secret, error) { + operatorSpecSecrets := obj.Spec.OperatorSpec.Secrets + if operatorSpecSecrets == nil { + return nil, errors.Errorf("unexpected nil operatorspec") + } + + collector := secrets.NewCollector(obj.Namespace) + defaultQueryKey, ok := queryKeys["default"] + if ok { + collector.AddValue(operatorSpecSecrets.QueryKey, to.Value(defaultQueryKey.Key)) + } + + collector.AddValue(operatorSpecSecrets.AdminPrimaryKey, to.Value(adminKeys.PrimaryKey)) + collector.AddValue(operatorSpecSecrets.AdminSecondaryKey, to.Value(adminKeys.SecondaryKey)) + + return collector.Values() +} diff --git a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go index 144871822d9..aa5be344f39 100644 --- a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go +++ b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go @@ -49,6 +49,10 @@ type Identity_ARM struct { // Properties of the search service. type SearchServiceProperties_ARM struct { + // AuthOptions: Defines the options for how the data plane API of a search service authenticates requests. This cannot be + // set if 'disableLocalAuth' is set to true. + AuthOptions *DataPlaneAuthOptions_ARM `json:"authOptions,omitempty"` + // DisableLocalAuth: When set to true, calls to the search service will not be permitted to utilize API keys for // authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` @@ -91,6 +95,14 @@ type Sku_ARM struct { Name *Sku_Name `json:"name,omitempty"` } +// Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if +// 'disableLocalAuth' is set to true. +type DataPlaneAuthOptions_ARM struct { + // AadOrApiKey: Indicates that either the API key or an access token from Azure Active Directory can be used for + // authentication. + AadOrApiKey *DataPlaneAadOrApiKeyAuthOption_ARM `json:"aadOrApiKey,omitempty"` +} + // Describes a policy that determines how resources within the search service are to be encrypted with Customer Managed // Keys. type EncryptionWithCmk_ARM struct { @@ -128,6 +140,13 @@ const ( Sku_Name_Storage_Optimized_L2 = Sku_Name("storage_optimized_l2") ) +// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. +type DataPlaneAadOrApiKeyAuthOption_ARM struct { + // AadAuthFailureMode: Describes what response the data plane API of a Search service would send for requests that failed + // authentication. + AadAuthFailureMode *DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode `json:"aadAuthFailureMode,omitempty"` +} + // The IP restriction rule of the Azure Cognitive Search service. type IpRule_ARM struct { // Value: Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) diff --git a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen_test.go b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen_test.go index acd3b1e732b..11effbd66d1 100644 --- a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen_test.go +++ b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen_test.go @@ -232,6 +232,7 @@ func AddIndependentPropertyGeneratorsForSearchServiceProperties_ARM(gens map[str // AddRelatedPropertyGeneratorsForSearchServiceProperties_ARM is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForSearchServiceProperties_ARM(gens map[string]gopter.Gen) { + gens["AuthOptions"] = gen.PtrOf(DataPlaneAuthOptions_ARMGenerator()) gens["EncryptionWithCmk"] = gen.PtrOf(EncryptionWithCmk_ARMGenerator()) gens["NetworkRuleSet"] = gen.PtrOf(NetworkRuleSet_ARMGenerator()) } @@ -303,6 +304,67 @@ func AddIndependentPropertyGeneratorsForSku_ARM(gens map[string]gopter.Gen) { Sku_Name_Storage_Optimized_L2)) } +func Test_DataPlaneAuthOptions_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAuthOptions_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAuthOptions_ARM, DataPlaneAuthOptions_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAuthOptions_ARM runs a test to see if a specific instance of DataPlaneAuthOptions_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAuthOptions_ARM(subject DataPlaneAuthOptions_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAuthOptions_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAuthOptions_ARM instances for property testing - lazily instantiated by +// DataPlaneAuthOptions_ARMGenerator() +var dataPlaneAuthOptions_ARMGenerator gopter.Gen + +// DataPlaneAuthOptions_ARMGenerator returns a generator of DataPlaneAuthOptions_ARM instances for property testing. +func DataPlaneAuthOptions_ARMGenerator() gopter.Gen { + if dataPlaneAuthOptions_ARMGenerator != nil { + return dataPlaneAuthOptions_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForDataPlaneAuthOptions_ARM(generators) + dataPlaneAuthOptions_ARMGenerator = gen.Struct(reflect.TypeOf(DataPlaneAuthOptions_ARM{}), generators) + + return dataPlaneAuthOptions_ARMGenerator +} + +// AddRelatedPropertyGeneratorsForDataPlaneAuthOptions_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDataPlaneAuthOptions_ARM(gens map[string]gopter.Gen) { + gens["AadOrApiKey"] = gen.PtrOf(DataPlaneAadOrApiKeyAuthOption_ARMGenerator()) +} + func Test_EncryptionWithCmk_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -424,6 +486,67 @@ func AddRelatedPropertyGeneratorsForNetworkRuleSet_ARM(gens map[string]gopter.Ge gens["IpRules"] = gen.SliceOf(IpRule_ARMGenerator()) } +func Test_DataPlaneAadOrApiKeyAuthOption_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAadOrApiKeyAuthOption_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption_ARM, DataPlaneAadOrApiKeyAuthOption_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption_ARM runs a test to see if a specific instance of DataPlaneAadOrApiKeyAuthOption_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption_ARM(subject DataPlaneAadOrApiKeyAuthOption_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAadOrApiKeyAuthOption_ARM + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAadOrApiKeyAuthOption_ARM instances for property testing - lazily instantiated by +// DataPlaneAadOrApiKeyAuthOption_ARMGenerator() +var dataPlaneAadOrApiKeyAuthOption_ARMGenerator gopter.Gen + +// DataPlaneAadOrApiKeyAuthOption_ARMGenerator returns a generator of DataPlaneAadOrApiKeyAuthOption_ARM instances for property testing. +func DataPlaneAadOrApiKeyAuthOption_ARMGenerator() gopter.Gen { + if dataPlaneAadOrApiKeyAuthOption_ARMGenerator != nil { + return dataPlaneAadOrApiKeyAuthOption_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption_ARM(generators) + dataPlaneAadOrApiKeyAuthOption_ARMGenerator = gen.Struct(reflect.TypeOf(DataPlaneAadOrApiKeyAuthOption_ARM{}), generators) + + return dataPlaneAadOrApiKeyAuthOption_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption_ARM(gens map[string]gopter.Gen) { + gens["AadAuthFailureMode"] = gen.PtrOf(gen.OneConstOf(DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http401WithBearerChallenge, DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http403)) +} + func Test_IpRule_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/search/v1api20220901/search_service_types_gen.go b/v2/api/search/v1api20220901/search_service_types_gen.go index e2c8784f169..b0a7547c896 100644 --- a/v2/api/search/v1api20220901/search_service_types_gen.go +++ b/v2/api/search/v1api20220901/search_service_types_gen.go @@ -226,7 +226,7 @@ func (service *SearchService) ValidateUpdate(old runtime.Object) error { // createValidations validates the creation of the resource func (service *SearchService) createValidations() []func() error { - return []func() error{service.validateResourceReferences} + return []func() error{service.validateResourceReferences, service.validateSecretDestinations} } // deleteValidations validates the deletion of the resource @@ -240,7 +240,11 @@ func (service *SearchService) updateValidations() []func(old runtime.Object) err func(old runtime.Object) error { return service.validateResourceReferences() }, - service.validateWriteOnceProperties} + service.validateWriteOnceProperties, + func(old runtime.Object) error { + return service.validateSecretDestinations() + }, + } } // validateResourceReferences validates all resource references @@ -252,6 +256,22 @@ func (service *SearchService) validateResourceReferences() error { return genruntime.ValidateResourceReferences(refs) } +// validateSecretDestinations validates there are no colliding genruntime.SecretDestination's +func (service *SearchService) validateSecretDestinations() error { + if service.Spec.OperatorSpec == nil { + return nil + } + if service.Spec.OperatorSpec.Secrets == nil { + return nil + } + toValidate := []*genruntime.SecretDestination{ + service.Spec.OperatorSpec.Secrets.AdminPrimaryKey, + service.Spec.OperatorSpec.Secrets.AdminSecondaryKey, + service.Spec.OperatorSpec.Secrets.QueryKey, + } + return genruntime.ValidateSecretDestinations(toValidate) +} + // validateWriteOnceProperties validates all WriteOnce properties func (service *SearchService) validateWriteOnceProperties(old runtime.Object) error { oldObj, ok := old.(*SearchService) @@ -339,6 +359,10 @@ type APIVersion string const APIVersion_Value = APIVersion("2022-09-01") type SearchService_Spec struct { + // AuthOptions: Defines the options for how the data plane API of a search service authenticates requests. This cannot be + // set if 'disableLocalAuth' is set to true. + AuthOptions *DataPlaneAuthOptions `json:"authOptions,omitempty"` + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. AzureName string `json:"azureName,omitempty"` @@ -366,6 +390,10 @@ type SearchService_Spec struct { // NetworkRuleSet: Network specific rules that determine how the Azure Cognitive Search service may be reached. NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` + // OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not + // passed directly to Azure + OperatorSpec *SearchServiceOperatorSpec `json:"operatorSpec,omitempty"` + // +kubebuilder:validation:Required // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a @@ -427,7 +455,8 @@ func (service *SearchService_Spec) ConvertToARM(resolved genruntime.ConvertToARM result.Name = resolved.Name // Set property ‘Properties’: - if service.DisableLocalAuth != nil || + if service.AuthOptions != nil || + service.DisableLocalAuth != nil || service.EncryptionWithCmk != nil || service.HostingMode != nil || service.NetworkRuleSet != nil || @@ -436,6 +465,14 @@ func (service *SearchService_Spec) ConvertToARM(resolved genruntime.ConvertToARM service.ReplicaCount != nil { result.Properties = &SearchServiceProperties_ARM{} } + if service.AuthOptions != nil { + authOptions_ARM, err := (*service.AuthOptions).ConvertToARM(resolved) + if err != nil { + return nil, err + } + authOptions := *authOptions_ARM.(*DataPlaneAuthOptions_ARM) + result.Properties.AuthOptions = &authOptions + } if service.DisableLocalAuth != nil { disableLocalAuth := *service.DisableLocalAuth result.Properties.DisableLocalAuth = &disableLocalAuth @@ -505,6 +542,20 @@ func (service *SearchService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwn return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected SearchService_Spec_ARM, got %T", armInput) } + // Set property ‘AuthOptions’: + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.AuthOptions != nil { + var authOptions1 DataPlaneAuthOptions + err := authOptions1.PopulateFromARM(owner, *typedInput.Properties.AuthOptions) + if err != nil { + return err + } + authOptions := authOptions1 + service.AuthOptions = &authOptions + } + } + // Set property ‘AzureName’: service.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) @@ -571,6 +622,8 @@ func (service *SearchService_Spec) PopulateFromARM(owner genruntime.ArbitraryOwn } } + // no assignment for property ‘OperatorSpec’ + // Set property ‘Owner’: service.Owner = &genruntime.KnownResourceReference{Name: owner.Name} @@ -677,6 +730,18 @@ func (service *SearchService_Spec) ConvertSpecTo(destination genruntime.Converti // AssignProperties_From_SearchService_Spec populates our SearchService_Spec from the provided source SearchService_Spec func (service *SearchService_Spec) AssignProperties_From_SearchService_Spec(source *v1api20220901s.SearchService_Spec) error { + // AuthOptions + if source.AuthOptions != nil { + var authOption DataPlaneAuthOptions + err := authOption.AssignProperties_From_DataPlaneAuthOptions(source.AuthOptions) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DataPlaneAuthOptions() to populate field AuthOptions") + } + service.AuthOptions = &authOption + } else { + service.AuthOptions = nil + } + // AzureName service.AzureName = source.AzureName @@ -735,6 +800,18 @@ func (service *SearchService_Spec) AssignProperties_From_SearchService_Spec(sour service.NetworkRuleSet = nil } + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec SearchServiceOperatorSpec + err := operatorSpec.AssignProperties_From_SearchServiceOperatorSpec(source.OperatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SearchServiceOperatorSpec() to populate field OperatorSpec") + } + service.OperatorSpec = &operatorSpec + } else { + service.OperatorSpec = nil + } + // Owner if source.Owner != nil { owner := source.Owner.Copy() @@ -791,6 +868,18 @@ func (service *SearchService_Spec) AssignProperties_To_SearchService_Spec(destin // Create a new property bag propertyBag := genruntime.NewPropertyBag() + // AuthOptions + if service.AuthOptions != nil { + var authOption v1api20220901s.DataPlaneAuthOptions + err := service.AuthOptions.AssignProperties_To_DataPlaneAuthOptions(&authOption) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DataPlaneAuthOptions() to populate field AuthOptions") + } + destination.AuthOptions = &authOption + } else { + destination.AuthOptions = nil + } + // AzureName destination.AzureName = service.AzureName @@ -849,6 +938,18 @@ func (service *SearchService_Spec) AssignProperties_To_SearchService_Spec(destin destination.NetworkRuleSet = nil } + // OperatorSpec + if service.OperatorSpec != nil { + var operatorSpec v1api20220901s.SearchServiceOperatorSpec + err := service.OperatorSpec.AssignProperties_To_SearchServiceOperatorSpec(&operatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SearchServiceOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + // OriginalVersion destination.OriginalVersion = service.OriginalVersion() @@ -913,6 +1014,18 @@ func (service *SearchService_Spec) AssignProperties_To_SearchService_Spec(destin // Initialize_From_SearchService_STATUS populates our SearchService_Spec from the provided source SearchService_STATUS func (service *SearchService_Spec) Initialize_From_SearchService_STATUS(source *SearchService_STATUS) error { + // AuthOptions + if source.AuthOptions != nil { + var authOption DataPlaneAuthOptions + err := authOption.Initialize_From_DataPlaneAuthOptions_STATUS(source.AuthOptions) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DataPlaneAuthOptions_STATUS() to populate field AuthOptions") + } + service.AuthOptions = &authOption + } else { + service.AuthOptions = nil + } + // DisableLocalAuth if source.DisableLocalAuth != nil { disableLocalAuth := *source.DisableLocalAuth @@ -1722,6 +1835,128 @@ func (service *SearchService_STATUS) AssignProperties_To_SearchService_STATUS(de return nil } +// Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if +// 'disableLocalAuth' is set to true. +type DataPlaneAuthOptions struct { + // AadOrApiKey: Indicates that either the API key or an access token from Azure Active Directory can be used for + // authentication. + AadOrApiKey *DataPlaneAadOrApiKeyAuthOption `json:"aadOrApiKey,omitempty"` +} + +var _ genruntime.ARMTransformer = &DataPlaneAuthOptions{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (options *DataPlaneAuthOptions) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if options == nil { + return nil, nil + } + result := &DataPlaneAuthOptions_ARM{} + + // Set property ‘AadOrApiKey’: + if options.AadOrApiKey != nil { + aadOrApiKey_ARM, err := (*options.AadOrApiKey).ConvertToARM(resolved) + if err != nil { + return nil, err + } + aadOrApiKey := *aadOrApiKey_ARM.(*DataPlaneAadOrApiKeyAuthOption_ARM) + result.AadOrApiKey = &aadOrApiKey + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (options *DataPlaneAuthOptions) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DataPlaneAuthOptions_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (options *DataPlaneAuthOptions) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DataPlaneAuthOptions_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DataPlaneAuthOptions_ARM, got %T", armInput) + } + + // Set property ‘AadOrApiKey’: + if typedInput.AadOrApiKey != nil { + var aadOrApiKey1 DataPlaneAadOrApiKeyAuthOption + err := aadOrApiKey1.PopulateFromARM(owner, *typedInput.AadOrApiKey) + if err != nil { + return err + } + aadOrApiKey := aadOrApiKey1 + options.AadOrApiKey = &aadOrApiKey + } + + // No error + return nil +} + +// AssignProperties_From_DataPlaneAuthOptions populates our DataPlaneAuthOptions from the provided source DataPlaneAuthOptions +func (options *DataPlaneAuthOptions) AssignProperties_From_DataPlaneAuthOptions(source *v1api20220901s.DataPlaneAuthOptions) error { + + // AadOrApiKey + if source.AadOrApiKey != nil { + var aadOrApiKey DataPlaneAadOrApiKeyAuthOption + err := aadOrApiKey.AssignProperties_From_DataPlaneAadOrApiKeyAuthOption(source.AadOrApiKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_DataPlaneAadOrApiKeyAuthOption() to populate field AadOrApiKey") + } + options.AadOrApiKey = &aadOrApiKey + } else { + options.AadOrApiKey = nil + } + + // No error + return nil +} + +// AssignProperties_To_DataPlaneAuthOptions populates the provided destination DataPlaneAuthOptions from our DataPlaneAuthOptions +func (options *DataPlaneAuthOptions) AssignProperties_To_DataPlaneAuthOptions(destination *v1api20220901s.DataPlaneAuthOptions) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AadOrApiKey + if options.AadOrApiKey != nil { + var aadOrApiKey v1api20220901s.DataPlaneAadOrApiKeyAuthOption + err := options.AadOrApiKey.AssignProperties_To_DataPlaneAadOrApiKeyAuthOption(&aadOrApiKey) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_DataPlaneAadOrApiKeyAuthOption() to populate field AadOrApiKey") + } + destination.AadOrApiKey = &aadOrApiKey + } else { + destination.AadOrApiKey = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DataPlaneAuthOptions_STATUS populates our DataPlaneAuthOptions from the provided source DataPlaneAuthOptions_STATUS +func (options *DataPlaneAuthOptions) Initialize_From_DataPlaneAuthOptions_STATUS(source *DataPlaneAuthOptions_STATUS) error { + + // AadOrApiKey + if source.AadOrApiKey != nil { + var aadOrApiKey DataPlaneAadOrApiKeyAuthOption + err := aadOrApiKey.Initialize_From_DataPlaneAadOrApiKeyAuthOption_STATUS(source.AadOrApiKey) + if err != nil { + return errors.Wrap(err, "calling Initialize_From_DataPlaneAadOrApiKeyAuthOption_STATUS() to populate field AadOrApiKey") + } + options.AadOrApiKey = &aadOrApiKey + } else { + options.AadOrApiKey = nil + } + + // No error + return nil +} + // Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if // 'disableLocalAuth' is set to true. type DataPlaneAuthOptions_STATUS struct { @@ -2534,6 +2769,59 @@ func (connection *PrivateEndpointConnection_STATUS) AssignProperties_To_PrivateE return nil } +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type SearchServiceOperatorSpec struct { + // Secrets: configures where to place Azure generated secrets. + Secrets *SearchServiceOperatorSecrets `json:"secrets,omitempty"` +} + +// AssignProperties_From_SearchServiceOperatorSpec populates our SearchServiceOperatorSpec from the provided source SearchServiceOperatorSpec +func (operator *SearchServiceOperatorSpec) AssignProperties_From_SearchServiceOperatorSpec(source *v1api20220901s.SearchServiceOperatorSpec) error { + + // Secrets + if source.Secrets != nil { + var secret SearchServiceOperatorSecrets + err := secret.AssignProperties_From_SearchServiceOperatorSecrets(source.Secrets) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SearchServiceOperatorSecrets() to populate field Secrets") + } + operator.Secrets = &secret + } else { + operator.Secrets = nil + } + + // No error + return nil +} + +// AssignProperties_To_SearchServiceOperatorSpec populates the provided destination SearchServiceOperatorSpec from our SearchServiceOperatorSpec +func (operator *SearchServiceOperatorSpec) AssignProperties_To_SearchServiceOperatorSpec(destination *v1api20220901s.SearchServiceOperatorSpec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Secrets + if operator.Secrets != nil { + var secret v1api20220901s.SearchServiceOperatorSecrets + err := operator.Secrets.AssignProperties_To_SearchServiceOperatorSecrets(&secret) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SearchServiceOperatorSecrets() to populate field Secrets") + } + destination.Secrets = &secret + } else { + destination.Secrets = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + // +kubebuilder:validation:Enum={"default","highDensity"} type SearchServiceProperties_HostingMode string @@ -2821,6 +3109,106 @@ func (sku *Sku_STATUS) AssignProperties_To_Sku_STATUS(destination *v1api20220901 return nil } +// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. +type DataPlaneAadOrApiKeyAuthOption struct { + // AadAuthFailureMode: Describes what response the data plane API of a Search service would send for requests that failed + // authentication. + AadAuthFailureMode *DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode `json:"aadAuthFailureMode,omitempty"` +} + +var _ genruntime.ARMTransformer = &DataPlaneAadOrApiKeyAuthOption{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (option *DataPlaneAadOrApiKeyAuthOption) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if option == nil { + return nil, nil + } + result := &DataPlaneAadOrApiKeyAuthOption_ARM{} + + // Set property ‘AadAuthFailureMode’: + if option.AadAuthFailureMode != nil { + aadAuthFailureMode := *option.AadAuthFailureMode + result.AadAuthFailureMode = &aadAuthFailureMode + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (option *DataPlaneAadOrApiKeyAuthOption) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &DataPlaneAadOrApiKeyAuthOption_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (option *DataPlaneAadOrApiKeyAuthOption) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(DataPlaneAadOrApiKeyAuthOption_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected DataPlaneAadOrApiKeyAuthOption_ARM, got %T", armInput) + } + + // Set property ‘AadAuthFailureMode’: + if typedInput.AadAuthFailureMode != nil { + aadAuthFailureMode := *typedInput.AadAuthFailureMode + option.AadAuthFailureMode = &aadAuthFailureMode + } + + // No error + return nil +} + +// AssignProperties_From_DataPlaneAadOrApiKeyAuthOption populates our DataPlaneAadOrApiKeyAuthOption from the provided source DataPlaneAadOrApiKeyAuthOption +func (option *DataPlaneAadOrApiKeyAuthOption) AssignProperties_From_DataPlaneAadOrApiKeyAuthOption(source *v1api20220901s.DataPlaneAadOrApiKeyAuthOption) error { + + // AadAuthFailureMode + if source.AadAuthFailureMode != nil { + aadAuthFailureMode := DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode(*source.AadAuthFailureMode) + option.AadAuthFailureMode = &aadAuthFailureMode + } else { + option.AadAuthFailureMode = nil + } + + // No error + return nil +} + +// AssignProperties_To_DataPlaneAadOrApiKeyAuthOption populates the provided destination DataPlaneAadOrApiKeyAuthOption from our DataPlaneAadOrApiKeyAuthOption +func (option *DataPlaneAadOrApiKeyAuthOption) AssignProperties_To_DataPlaneAadOrApiKeyAuthOption(destination *v1api20220901s.DataPlaneAadOrApiKeyAuthOption) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AadAuthFailureMode + if option.AadAuthFailureMode != nil { + aadAuthFailureMode := string(*option.AadAuthFailureMode) + destination.AadAuthFailureMode = &aadAuthFailureMode + } else { + destination.AadAuthFailureMode = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_DataPlaneAadOrApiKeyAuthOption_STATUS populates our DataPlaneAadOrApiKeyAuthOption from the provided source DataPlaneAadOrApiKeyAuthOption_STATUS +func (option *DataPlaneAadOrApiKeyAuthOption) Initialize_From_DataPlaneAadOrApiKeyAuthOption_STATUS(source *DataPlaneAadOrApiKeyAuthOption_STATUS) error { + + // AadAuthFailureMode + if source.AadAuthFailureMode != nil { + aadAuthFailureMode := DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode(*source.AadAuthFailureMode) + option.AadAuthFailureMode = &aadAuthFailureMode + } else { + option.AadAuthFailureMode = nil + } + + // No error + return nil +} + // Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. type DataPlaneAadOrApiKeyAuthOption_STATUS struct { // AadAuthFailureMode: Describes what response the data plane API of a Search service would send for requests that failed @@ -3060,6 +3448,98 @@ func (rule *IpRule_STATUS) AssignProperties_To_IpRule_STATUS(destination *v1api2 return nil } +type SearchServiceOperatorSecrets struct { + // AdminPrimaryKey: indicates where the AdminPrimaryKey secret should be placed. If omitted, the secret will not be + // retrieved from Azure. + AdminPrimaryKey *genruntime.SecretDestination `json:"adminPrimaryKey,omitempty"` + + // AdminSecondaryKey: indicates where the AdminSecondaryKey secret should be placed. If omitted, the secret will not be + // retrieved from Azure. + AdminSecondaryKey *genruntime.SecretDestination `json:"adminSecondaryKey,omitempty"` + + // QueryKey: indicates where the QueryKey secret should be placed. If omitted, the secret will not be retrieved from Azure. + QueryKey *genruntime.SecretDestination `json:"queryKey,omitempty"` +} + +// AssignProperties_From_SearchServiceOperatorSecrets populates our SearchServiceOperatorSecrets from the provided source SearchServiceOperatorSecrets +func (secrets *SearchServiceOperatorSecrets) AssignProperties_From_SearchServiceOperatorSecrets(source *v1api20220901s.SearchServiceOperatorSecrets) error { + + // AdminPrimaryKey + if source.AdminPrimaryKey != nil { + adminPrimaryKey := source.AdminPrimaryKey.Copy() + secrets.AdminPrimaryKey = &adminPrimaryKey + } else { + secrets.AdminPrimaryKey = nil + } + + // AdminSecondaryKey + if source.AdminSecondaryKey != nil { + adminSecondaryKey := source.AdminSecondaryKey.Copy() + secrets.AdminSecondaryKey = &adminSecondaryKey + } else { + secrets.AdminSecondaryKey = nil + } + + // QueryKey + if source.QueryKey != nil { + queryKey := source.QueryKey.Copy() + secrets.QueryKey = &queryKey + } else { + secrets.QueryKey = nil + } + + // No error + return nil +} + +// AssignProperties_To_SearchServiceOperatorSecrets populates the provided destination SearchServiceOperatorSecrets from our SearchServiceOperatorSecrets +func (secrets *SearchServiceOperatorSecrets) AssignProperties_To_SearchServiceOperatorSecrets(destination *v1api20220901s.SearchServiceOperatorSecrets) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AdminPrimaryKey + if secrets.AdminPrimaryKey != nil { + adminPrimaryKey := secrets.AdminPrimaryKey.Copy() + destination.AdminPrimaryKey = &adminPrimaryKey + } else { + destination.AdminPrimaryKey = nil + } + + // AdminSecondaryKey + if secrets.AdminSecondaryKey != nil { + adminSecondaryKey := secrets.AdminSecondaryKey.Copy() + destination.AdminSecondaryKey = &adminSecondaryKey + } else { + destination.AdminSecondaryKey = nil + } + + // QueryKey + if secrets.QueryKey != nil { + queryKey := secrets.QueryKey.Copy() + destination.QueryKey = &queryKey + } else { + destination.QueryKey = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"http401WithBearerChallenge","http403"} +type DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode string + +const ( + DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http401WithBearerChallenge = DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode("http401WithBearerChallenge") + DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http403 = DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode("http403") +) + type DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS string const ( diff --git a/v2/api/search/v1api20220901/search_service_types_gen_test.go b/v2/api/search/v1api20220901/search_service_types_gen_test.go index 5ea74d35a60..41ea1cefd58 100644 --- a/v2/api/search/v1api20220901/search_service_types_gen_test.go +++ b/v2/api/search/v1api20220901/search_service_types_gen_test.go @@ -284,9 +284,11 @@ func AddIndependentPropertyGeneratorsForSearchService_Spec(gens map[string]gopte // AddRelatedPropertyGeneratorsForSearchService_Spec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForSearchService_Spec(gens map[string]gopter.Gen) { + gens["AuthOptions"] = gen.PtrOf(DataPlaneAuthOptionsGenerator()) gens["EncryptionWithCmk"] = gen.PtrOf(EncryptionWithCmkGenerator()) gens["Identity"] = gen.PtrOf(IdentityGenerator()) gens["NetworkRuleSet"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["OperatorSpec"] = gen.PtrOf(SearchServiceOperatorSpecGenerator()) gens["Sku"] = gen.PtrOf(SkuGenerator()) } @@ -431,6 +433,109 @@ func AddRelatedPropertyGeneratorsForSearchService_STATUS(gens map[string]gopter. gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) } +func Test_DataPlaneAuthOptions_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DataPlaneAuthOptions to DataPlaneAuthOptions via AssignProperties_To_DataPlaneAuthOptions & AssignProperties_From_DataPlaneAuthOptions returns original", + prop.ForAll(RunPropertyAssignmentTestForDataPlaneAuthOptions, DataPlaneAuthOptionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDataPlaneAuthOptions tests if a specific instance of DataPlaneAuthOptions can be assigned to v1api20220901storage and back losslessly +func RunPropertyAssignmentTestForDataPlaneAuthOptions(subject DataPlaneAuthOptions) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20220901s.DataPlaneAuthOptions + err := copied.AssignProperties_To_DataPlaneAuthOptions(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DataPlaneAuthOptions + err = actual.AssignProperties_From_DataPlaneAuthOptions(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DataPlaneAuthOptions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAuthOptions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAuthOptions, DataPlaneAuthOptionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAuthOptions runs a test to see if a specific instance of DataPlaneAuthOptions round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAuthOptions(subject DataPlaneAuthOptions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAuthOptions + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAuthOptions instances for property testing - lazily instantiated by +// DataPlaneAuthOptionsGenerator() +var dataPlaneAuthOptionsGenerator gopter.Gen + +// DataPlaneAuthOptionsGenerator returns a generator of DataPlaneAuthOptions instances for property testing. +func DataPlaneAuthOptionsGenerator() gopter.Gen { + if dataPlaneAuthOptionsGenerator != nil { + return dataPlaneAuthOptionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForDataPlaneAuthOptions(generators) + dataPlaneAuthOptionsGenerator = gen.Struct(reflect.TypeOf(DataPlaneAuthOptions{}), generators) + + return dataPlaneAuthOptionsGenerator +} + +// AddRelatedPropertyGeneratorsForDataPlaneAuthOptions is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDataPlaneAuthOptions(gens map[string]gopter.Gen) { + gens["AadOrApiKey"] = gen.PtrOf(DataPlaneAadOrApiKeyAuthOptionGenerator()) +} + func Test_DataPlaneAuthOptions_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1254,6 +1359,109 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(gens ma gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_SearchServiceOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SearchServiceOperatorSpec to SearchServiceOperatorSpec via AssignProperties_To_SearchServiceOperatorSpec & AssignProperties_From_SearchServiceOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForSearchServiceOperatorSpec, SearchServiceOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSearchServiceOperatorSpec tests if a specific instance of SearchServiceOperatorSpec can be assigned to v1api20220901storage and back losslessly +func RunPropertyAssignmentTestForSearchServiceOperatorSpec(subject SearchServiceOperatorSpec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20220901s.SearchServiceOperatorSpec + err := copied.AssignProperties_To_SearchServiceOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SearchServiceOperatorSpec + err = actual.AssignProperties_From_SearchServiceOperatorSpec(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SearchServiceOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SearchServiceOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSearchServiceOperatorSpec, SearchServiceOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSearchServiceOperatorSpec runs a test to see if a specific instance of SearchServiceOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForSearchServiceOperatorSpec(subject SearchServiceOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SearchServiceOperatorSpec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SearchServiceOperatorSpec instances for property testing - lazily instantiated by +// SearchServiceOperatorSpecGenerator() +var searchServiceOperatorSpecGenerator gopter.Gen + +// SearchServiceOperatorSpecGenerator returns a generator of SearchServiceOperatorSpec instances for property testing. +func SearchServiceOperatorSpecGenerator() gopter.Gen { + if searchServiceOperatorSpecGenerator != nil { + return searchServiceOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec(generators) + searchServiceOperatorSpecGenerator = gen.Struct(reflect.TypeOf(SearchServiceOperatorSpec{}), generators) + + return searchServiceOperatorSpecGenerator +} + +// AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec(gens map[string]gopter.Gen) { + gens["Secrets"] = gen.PtrOf(SearchServiceOperatorSecretsGenerator()) +} + func Test_SharedPrivateLinkResource_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1575,6 +1783,109 @@ func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { Sku_Name_STATUS_Storage_Optimized_L2)) } +func Test_DataPlaneAadOrApiKeyAuthOption_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from DataPlaneAadOrApiKeyAuthOption to DataPlaneAadOrApiKeyAuthOption via AssignProperties_To_DataPlaneAadOrApiKeyAuthOption & AssignProperties_From_DataPlaneAadOrApiKeyAuthOption returns original", + prop.ForAll(RunPropertyAssignmentTestForDataPlaneAadOrApiKeyAuthOption, DataPlaneAadOrApiKeyAuthOptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForDataPlaneAadOrApiKeyAuthOption tests if a specific instance of DataPlaneAadOrApiKeyAuthOption can be assigned to v1api20220901storage and back losslessly +func RunPropertyAssignmentTestForDataPlaneAadOrApiKeyAuthOption(subject DataPlaneAadOrApiKeyAuthOption) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20220901s.DataPlaneAadOrApiKeyAuthOption + err := copied.AssignProperties_To_DataPlaneAadOrApiKeyAuthOption(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual DataPlaneAadOrApiKeyAuthOption + err = actual.AssignProperties_From_DataPlaneAadOrApiKeyAuthOption(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_DataPlaneAadOrApiKeyAuthOption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAadOrApiKeyAuthOption via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption, DataPlaneAadOrApiKeyAuthOptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption runs a test to see if a specific instance of DataPlaneAadOrApiKeyAuthOption round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption(subject DataPlaneAadOrApiKeyAuthOption) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAadOrApiKeyAuthOption + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAadOrApiKeyAuthOption instances for property testing - lazily instantiated by +// DataPlaneAadOrApiKeyAuthOptionGenerator() +var dataPlaneAadOrApiKeyAuthOptionGenerator gopter.Gen + +// DataPlaneAadOrApiKeyAuthOptionGenerator returns a generator of DataPlaneAadOrApiKeyAuthOption instances for property testing. +func DataPlaneAadOrApiKeyAuthOptionGenerator() gopter.Gen { + if dataPlaneAadOrApiKeyAuthOptionGenerator != nil { + return dataPlaneAadOrApiKeyAuthOptionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption(generators) + dataPlaneAadOrApiKeyAuthOptionGenerator = gen.Struct(reflect.TypeOf(DataPlaneAadOrApiKeyAuthOption{}), generators) + + return dataPlaneAadOrApiKeyAuthOptionGenerator +} + +// AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption(gens map[string]gopter.Gen) { + gens["AadAuthFailureMode"] = gen.PtrOf(gen.OneConstOf(DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http401WithBearerChallenge, DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http403)) +} + func Test_DataPlaneAadOrApiKeyAuthOption_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1881,3 +2192,100 @@ func IpRule_STATUSGenerator() gopter.Gen { func AddIndependentPropertyGeneratorsForIpRule_STATUS(gens map[string]gopter.Gen) { gens["Value"] = gen.PtrOf(gen.AlphaString()) } + +func Test_SearchServiceOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from SearchServiceOperatorSecrets to SearchServiceOperatorSecrets via AssignProperties_To_SearchServiceOperatorSecrets & AssignProperties_From_SearchServiceOperatorSecrets returns original", + prop.ForAll(RunPropertyAssignmentTestForSearchServiceOperatorSecrets, SearchServiceOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForSearchServiceOperatorSecrets tests if a specific instance of SearchServiceOperatorSecrets can be assigned to v1api20220901storage and back losslessly +func RunPropertyAssignmentTestForSearchServiceOperatorSecrets(subject SearchServiceOperatorSecrets) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20220901s.SearchServiceOperatorSecrets + err := copied.AssignProperties_To_SearchServiceOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual SearchServiceOperatorSecrets + err = actual.AssignProperties_From_SearchServiceOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Check for a match + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_SearchServiceOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SearchServiceOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSearchServiceOperatorSecrets, SearchServiceOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSearchServiceOperatorSecrets runs a test to see if a specific instance of SearchServiceOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForSearchServiceOperatorSecrets(subject SearchServiceOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SearchServiceOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SearchServiceOperatorSecrets instances for property testing - lazily instantiated by +// SearchServiceOperatorSecretsGenerator() +var searchServiceOperatorSecretsGenerator gopter.Gen + +// SearchServiceOperatorSecretsGenerator returns a generator of SearchServiceOperatorSecrets instances for property testing. +func SearchServiceOperatorSecretsGenerator() gopter.Gen { + if searchServiceOperatorSecretsGenerator != nil { + return searchServiceOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + searchServiceOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(SearchServiceOperatorSecrets{}), generators) + + return searchServiceOperatorSecretsGenerator +} diff --git a/v2/api/search/v1api20220901/structure.txt b/v2/api/search/v1api20220901/structure.txt index 5fe2b0d8aa0..d85cb871842 100644 --- a/v2/api/search/v1api20220901/structure.txt +++ b/v2/api/search/v1api20220901/structure.txt @@ -4,7 +4,12 @@ github.com/Azure/azure-service-operator/v2/api/search/v1api20220901 │ └── "2022-09-01" ├── SearchService: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup -│ ├── Spec: Object (13 properties) +│ ├── Spec: Object (15 properties) +│ │ ├── AuthOptions: *Object (1 property) +│ │ │ └── AadOrApiKey: *Object (1 property) +│ │ │ └── AadAuthFailureMode: *Enum (2 values) +│ │ │ ├── "http401WithBearerChallenge" +│ │ │ └── "http403" │ │ ├── AzureName: string │ │ ├── DisableLocalAuth: *bool │ │ ├── EncryptionWithCmk: *Object (1 property) @@ -23,6 +28,11 @@ github.com/Azure/azure-service-operator/v2/api/search/v1api20220901 │ │ ├── NetworkRuleSet: *Object (1 property) │ │ │ └── IpRules: Object (1 property)[] │ │ │ └── Value: *string +│ │ ├── OperatorSpec: *Object (1 property) +│ │ │ └── Secrets: *Object (3 properties) +│ │ │ ├── AdminPrimaryKey: *genruntime.SecretDestination +│ │ │ ├── AdminSecondaryKey: *genruntime.SecretDestination +│ │ │ └── QueryKey: *genruntime.SecretDestination │ │ ├── Owner: *genruntime.KnownResourceReference │ │ ├── PartitionCount: Validated<*int> (2 rules) │ │ │ ├── Rule 0: Maximum: 12 @@ -178,7 +188,12 @@ github.com/Azure/azure-service-operator/v2/api/search/v1api20220901 │ └── "SystemAssigned" ├── Location: *string ├── Name: string - ├── Properties: *Object (7 properties) + ├── Properties: *Object (8 properties) + │ ├── AuthOptions: *Object (1 property) + │ │ └── AadOrApiKey: *Object (1 property) + │ │ └── AadAuthFailureMode: *Enum (2 values) + │ │ ├── "http401WithBearerChallenge" + │ │ └── "http403" │ ├── DisableLocalAuth: *bool │ ├── EncryptionWithCmk: *Object (1 property) │ │ └── Enforcement: *Enum (3 values) diff --git a/v2/api/search/v1api20220901/zz_generated.deepcopy.go b/v2/api/search/v1api20220901/zz_generated.deepcopy.go index 3f52f7c9150..8b14b37de8b 100644 --- a/v2/api/search/v1api20220901/zz_generated.deepcopy.go +++ b/v2/api/search/v1api20220901/zz_generated.deepcopy.go @@ -17,6 +17,46 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAadOrApiKeyAuthOption) DeepCopyInto(out *DataPlaneAadOrApiKeyAuthOption) { + *out = *in + if in.AadAuthFailureMode != nil { + in, out := &in.AadAuthFailureMode, &out.AadAuthFailureMode + *out = new(DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAadOrApiKeyAuthOption. +func (in *DataPlaneAadOrApiKeyAuthOption) DeepCopy() *DataPlaneAadOrApiKeyAuthOption { + if in == nil { + return nil + } + out := new(DataPlaneAadOrApiKeyAuthOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAadOrApiKeyAuthOption_ARM) DeepCopyInto(out *DataPlaneAadOrApiKeyAuthOption_ARM) { + *out = *in + if in.AadAuthFailureMode != nil { + in, out := &in.AadAuthFailureMode, &out.AadAuthFailureMode + *out = new(DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAadOrApiKeyAuthOption_ARM. +func (in *DataPlaneAadOrApiKeyAuthOption_ARM) DeepCopy() *DataPlaneAadOrApiKeyAuthOption_ARM { + if in == nil { + return nil + } + out := new(DataPlaneAadOrApiKeyAuthOption_ARM) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataPlaneAadOrApiKeyAuthOption_STATUS) DeepCopyInto(out *DataPlaneAadOrApiKeyAuthOption_STATUS) { *out = *in @@ -57,6 +97,46 @@ func (in *DataPlaneAadOrApiKeyAuthOption_STATUS_ARM) DeepCopy() *DataPlaneAadOrA return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAuthOptions) DeepCopyInto(out *DataPlaneAuthOptions) { + *out = *in + if in.AadOrApiKey != nil { + in, out := &in.AadOrApiKey, &out.AadOrApiKey + *out = new(DataPlaneAadOrApiKeyAuthOption) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAuthOptions. +func (in *DataPlaneAuthOptions) DeepCopy() *DataPlaneAuthOptions { + if in == nil { + return nil + } + out := new(DataPlaneAuthOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAuthOptions_ARM) DeepCopyInto(out *DataPlaneAuthOptions_ARM) { + *out = *in + if in.AadOrApiKey != nil { + in, out := &in.AadOrApiKey, &out.AadOrApiKey + *out = new(DataPlaneAadOrApiKeyAuthOption_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAuthOptions_ARM. +func (in *DataPlaneAuthOptions_ARM) DeepCopy() *DataPlaneAuthOptions_ARM { + if in == nil { + return nil + } + out := new(DataPlaneAuthOptions_ARM) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataPlaneAuthOptions_STATUS) DeepCopyInto(out *DataPlaneAuthOptions_STATUS) { *out = *in @@ -568,9 +648,64 @@ func (in *SearchServiceList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SearchServiceOperatorSecrets) DeepCopyInto(out *SearchServiceOperatorSecrets) { + *out = *in + if in.AdminPrimaryKey != nil { + in, out := &in.AdminPrimaryKey, &out.AdminPrimaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.AdminSecondaryKey != nil { + in, out := &in.AdminSecondaryKey, &out.AdminSecondaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.QueryKey != nil { + in, out := &in.QueryKey, &out.QueryKey + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchServiceOperatorSecrets. +func (in *SearchServiceOperatorSecrets) DeepCopy() *SearchServiceOperatorSecrets { + if in == nil { + return nil + } + out := new(SearchServiceOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SearchServiceOperatorSpec) DeepCopyInto(out *SearchServiceOperatorSpec) { + *out = *in + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(SearchServiceOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchServiceOperatorSpec. +func (in *SearchServiceOperatorSpec) DeepCopy() *SearchServiceOperatorSpec { + if in == nil { + return nil + } + out := new(SearchServiceOperatorSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SearchServiceProperties_ARM) DeepCopyInto(out *SearchServiceProperties_ARM) { *out = *in + if in.AuthOptions != nil { + in, out := &in.AuthOptions, &out.AuthOptions + *out = new(DataPlaneAuthOptions_ARM) + (*in).DeepCopyInto(*out) + } if in.DisableLocalAuth != nil { in, out := &in.DisableLocalAuth, &out.DisableLocalAuth *out = new(bool) @@ -890,6 +1025,11 @@ func (in *SearchService_STATUS_ARM) DeepCopy() *SearchService_STATUS_ARM { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SearchService_Spec) DeepCopyInto(out *SearchService_Spec) { *out = *in + if in.AuthOptions != nil { + in, out := &in.AuthOptions, &out.AuthOptions + *out = new(DataPlaneAuthOptions) + (*in).DeepCopyInto(*out) + } if in.DisableLocalAuth != nil { in, out := &in.DisableLocalAuth, &out.DisableLocalAuth *out = new(bool) @@ -920,6 +1060,11 @@ func (in *SearchService_Spec) DeepCopyInto(out *SearchService_Spec) { *out = new(NetworkRuleSet) (*in).DeepCopyInto(*out) } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(SearchServiceOperatorSpec) + (*in).DeepCopyInto(*out) + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) diff --git a/v2/api/search/v1api20220901storage/search_service_types_gen.go b/v2/api/search/v1api20220901storage/search_service_types_gen.go index 0652f3c3090..90bfd9bffb4 100644 --- a/v2/api/search/v1api20220901storage/search_service_types_gen.go +++ b/v2/api/search/v1api20220901storage/search_service_types_gen.go @@ -142,16 +142,19 @@ const APIVersion_Value = APIVersion("2022-09-01") // Storage version of v1api20220901.SearchService_Spec type SearchService_Spec struct { + AuthOptions *DataPlaneAuthOptions `json:"authOptions,omitempty"` + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it // doesn't have to be. - AzureName string `json:"azureName,omitempty"` - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - EncryptionWithCmk *EncryptionWithCmk `json:"encryptionWithCmk,omitempty"` - HostingMode *string `json:"hostingMode,omitempty"` - Identity *Identity `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` - OriginalVersion string `json:"originalVersion,omitempty"` + AzureName string `json:"azureName,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + EncryptionWithCmk *EncryptionWithCmk `json:"encryptionWithCmk,omitempty"` + HostingMode *string `json:"hostingMode,omitempty"` + Identity *Identity `json:"identity,omitempty"` + Location *string `json:"location,omitempty"` + NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"` + OperatorSpec *SearchServiceOperatorSpec `json:"operatorSpec,omitempty"` + OriginalVersion string `json:"originalVersion,omitempty"` // +kubebuilder:validation:Required // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also @@ -233,6 +236,14 @@ func (service *SearchService_STATUS) ConvertStatusTo(destination genruntime.Conv return destination.ConvertStatusFrom(service) } +// Storage version of v1api20220901.DataPlaneAuthOptions +// Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if +// 'disableLocalAuth' is set to true. +type DataPlaneAuthOptions struct { + AadOrApiKey *DataPlaneAadOrApiKeyAuthOption `json:"aadOrApiKey,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + // Storage version of v1api20220901.DataPlaneAuthOptions_STATUS // Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if // 'disableLocalAuth' is set to true. @@ -296,6 +307,13 @@ type PrivateEndpointConnection_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// Storage version of v1api20220901.SearchServiceOperatorSpec +// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type SearchServiceOperatorSpec struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *SearchServiceOperatorSecrets `json:"secrets,omitempty"` +} + // Storage version of v1api20220901.SharedPrivateLinkResource_STATUS // Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. type SharedPrivateLinkResource_STATUS struct { @@ -317,6 +335,13 @@ type Sku_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// Storage version of v1api20220901.DataPlaneAadOrApiKeyAuthOption +// Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. +type DataPlaneAadOrApiKeyAuthOption struct { + AadAuthFailureMode *string `json:"aadAuthFailureMode,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + // Storage version of v1api20220901.DataPlaneAadOrApiKeyAuthOption_STATUS // Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. type DataPlaneAadOrApiKeyAuthOption_STATUS struct { @@ -338,6 +363,14 @@ type IpRule_STATUS struct { Value *string `json:"value,omitempty"` } +// Storage version of v1api20220901.SearchServiceOperatorSecrets +type SearchServiceOperatorSecrets struct { + AdminPrimaryKey *genruntime.SecretDestination `json:"adminPrimaryKey,omitempty"` + AdminSecondaryKey *genruntime.SecretDestination `json:"adminSecondaryKey,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + QueryKey *genruntime.SecretDestination `json:"queryKey,omitempty"` +} + func init() { SchemeBuilder.Register(&SearchService{}, &SearchServiceList{}) } diff --git a/v2/api/search/v1api20220901storage/search_service_types_gen_test.go b/v2/api/search/v1api20220901storage/search_service_types_gen_test.go index a6b68ffc4cd..df030dcc1ec 100644 --- a/v2/api/search/v1api20220901storage/search_service_types_gen_test.go +++ b/v2/api/search/v1api20220901storage/search_service_types_gen_test.go @@ -157,9 +157,11 @@ func AddIndependentPropertyGeneratorsForSearchService_Spec(gens map[string]gopte // AddRelatedPropertyGeneratorsForSearchService_Spec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForSearchService_Spec(gens map[string]gopter.Gen) { + gens["AuthOptions"] = gen.PtrOf(DataPlaneAuthOptionsGenerator()) gens["EncryptionWithCmk"] = gen.PtrOf(EncryptionWithCmkGenerator()) gens["Identity"] = gen.PtrOf(IdentityGenerator()) gens["NetworkRuleSet"] = gen.PtrOf(NetworkRuleSetGenerator()) + gens["OperatorSpec"] = gen.PtrOf(SearchServiceOperatorSpecGenerator()) gens["Sku"] = gen.PtrOf(SkuGenerator()) } @@ -256,6 +258,67 @@ func AddRelatedPropertyGeneratorsForSearchService_STATUS(gens map[string]gopter. gens["Sku"] = gen.PtrOf(Sku_STATUSGenerator()) } +func Test_DataPlaneAuthOptions_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAuthOptions via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAuthOptions, DataPlaneAuthOptionsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAuthOptions runs a test to see if a specific instance of DataPlaneAuthOptions round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAuthOptions(subject DataPlaneAuthOptions) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAuthOptions + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAuthOptions instances for property testing - lazily instantiated by +// DataPlaneAuthOptionsGenerator() +var dataPlaneAuthOptionsGenerator gopter.Gen + +// DataPlaneAuthOptionsGenerator returns a generator of DataPlaneAuthOptions instances for property testing. +func DataPlaneAuthOptionsGenerator() gopter.Gen { + if dataPlaneAuthOptionsGenerator != nil { + return dataPlaneAuthOptionsGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForDataPlaneAuthOptions(generators) + dataPlaneAuthOptionsGenerator = gen.Struct(reflect.TypeOf(DataPlaneAuthOptions{}), generators) + + return dataPlaneAuthOptionsGenerator +} + +// AddRelatedPropertyGeneratorsForDataPlaneAuthOptions is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForDataPlaneAuthOptions(gens map[string]gopter.Gen) { + gens["AadOrApiKey"] = gen.PtrOf(DataPlaneAadOrApiKeyAuthOptionGenerator()) +} + func Test_DataPlaneAuthOptions_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -743,6 +806,67 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnection_STATUS(gens ma gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_SearchServiceOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SearchServiceOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSearchServiceOperatorSpec, SearchServiceOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSearchServiceOperatorSpec runs a test to see if a specific instance of SearchServiceOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForSearchServiceOperatorSpec(subject SearchServiceOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SearchServiceOperatorSpec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SearchServiceOperatorSpec instances for property testing - lazily instantiated by +// SearchServiceOperatorSpecGenerator() +var searchServiceOperatorSpecGenerator gopter.Gen + +// SearchServiceOperatorSpecGenerator returns a generator of SearchServiceOperatorSpec instances for property testing. +func SearchServiceOperatorSpecGenerator() gopter.Gen { + if searchServiceOperatorSpecGenerator != nil { + return searchServiceOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec(generators) + searchServiceOperatorSpecGenerator = gen.Struct(reflect.TypeOf(SearchServiceOperatorSpec{}), generators) + + return searchServiceOperatorSpecGenerator +} + +// AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForSearchServiceOperatorSpec(gens map[string]gopter.Gen) { + gens["Secrets"] = gen.PtrOf(SearchServiceOperatorSecretsGenerator()) +} + func Test_SharedPrivateLinkResource_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -924,6 +1048,67 @@ func AddIndependentPropertyGeneratorsForSku_STATUS(gens map[string]gopter.Gen) { gens["Name"] = gen.PtrOf(gen.AlphaString()) } +func Test_DataPlaneAadOrApiKeyAuthOption_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of DataPlaneAadOrApiKeyAuthOption via JSON returns original", + prop.ForAll(RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption, DataPlaneAadOrApiKeyAuthOptionGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption runs a test to see if a specific instance of DataPlaneAadOrApiKeyAuthOption round trips to JSON and back losslessly +func RunJSONSerializationTestForDataPlaneAadOrApiKeyAuthOption(subject DataPlaneAadOrApiKeyAuthOption) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual DataPlaneAadOrApiKeyAuthOption + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of DataPlaneAadOrApiKeyAuthOption instances for property testing - lazily instantiated by +// DataPlaneAadOrApiKeyAuthOptionGenerator() +var dataPlaneAadOrApiKeyAuthOptionGenerator gopter.Gen + +// DataPlaneAadOrApiKeyAuthOptionGenerator returns a generator of DataPlaneAadOrApiKeyAuthOption instances for property testing. +func DataPlaneAadOrApiKeyAuthOptionGenerator() gopter.Gen { + if dataPlaneAadOrApiKeyAuthOptionGenerator != nil { + return dataPlaneAadOrApiKeyAuthOptionGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption(generators) + dataPlaneAadOrApiKeyAuthOptionGenerator = gen.Struct(reflect.TypeOf(DataPlaneAadOrApiKeyAuthOption{}), generators) + + return dataPlaneAadOrApiKeyAuthOptionGenerator +} + +// AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForDataPlaneAadOrApiKeyAuthOption(gens map[string]gopter.Gen) { + gens["AadAuthFailureMode"] = gen.PtrOf(gen.AlphaString()) +} + func Test_DataPlaneAadOrApiKeyAuthOption_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -1104,3 +1289,58 @@ func IpRule_STATUSGenerator() gopter.Gen { func AddIndependentPropertyGeneratorsForIpRule_STATUS(gens map[string]gopter.Gen) { gens["Value"] = gen.PtrOf(gen.AlphaString()) } + +func Test_SearchServiceOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 100 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of SearchServiceOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForSearchServiceOperatorSecrets, SearchServiceOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForSearchServiceOperatorSecrets runs a test to see if a specific instance of SearchServiceOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForSearchServiceOperatorSecrets(subject SearchServiceOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual SearchServiceOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of SearchServiceOperatorSecrets instances for property testing - lazily instantiated by +// SearchServiceOperatorSecretsGenerator() +var searchServiceOperatorSecretsGenerator gopter.Gen + +// SearchServiceOperatorSecretsGenerator returns a generator of SearchServiceOperatorSecrets instances for property testing. +func SearchServiceOperatorSecretsGenerator() gopter.Gen { + if searchServiceOperatorSecretsGenerator != nil { + return searchServiceOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + searchServiceOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(SearchServiceOperatorSecrets{}), generators) + + return searchServiceOperatorSecretsGenerator +} diff --git a/v2/api/search/v1api20220901storage/structure.txt b/v2/api/search/v1api20220901storage/structure.txt index 909d520c1d2..30660645aaf 100644 --- a/v2/api/search/v1api20220901storage/structure.txt +++ b/v2/api/search/v1api20220901storage/structure.txt @@ -4,7 +4,12 @@ github.com/Azure/azure-service-operator/v2/api/search/v1api20220901storage │ └── "2022-09-01" └── SearchService: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/resources/v1apiv20191001.ResourceGroup - ├── Spec: Object (15 properties) + ├── Spec: Object (17 properties) + │ ├── AuthOptions: *Object (2 properties) + │ │ ├── AadOrApiKey: *Object (2 properties) + │ │ │ ├── AadAuthFailureMode: *string + │ │ │ └── PropertyBag: genruntime.PropertyBag + │ │ └── PropertyBag: genruntime.PropertyBag │ ├── AzureName: string │ ├── DisableLocalAuth: *bool │ ├── EncryptionWithCmk: *Object (2 properties) @@ -20,6 +25,13 @@ github.com/Azure/azure-service-operator/v2/api/search/v1api20220901storage │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Value: *string │ │ └── PropertyBag: genruntime.PropertyBag + │ ├── OperatorSpec: *Object (2 properties) + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── Secrets: *Object (4 properties) + │ │ ├── AdminPrimaryKey: *genruntime.SecretDestination + │ │ ├── AdminSecondaryKey: *genruntime.SecretDestination + │ │ ├── PropertyBag: genruntime.PropertyBag + │ │ └── QueryKey: *genruntime.SecretDestination │ ├── OriginalVersion: string │ ├── Owner: *genruntime.KnownResourceReference │ ├── PartitionCount: *int diff --git a/v2/api/search/v1api20220901storage/zz_generated.deepcopy.go b/v2/api/search/v1api20220901storage/zz_generated.deepcopy.go index 25b7d48f7a4..be22e8c46f5 100644 --- a/v2/api/search/v1api20220901storage/zz_generated.deepcopy.go +++ b/v2/api/search/v1api20220901storage/zz_generated.deepcopy.go @@ -17,6 +17,33 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAadOrApiKeyAuthOption) DeepCopyInto(out *DataPlaneAadOrApiKeyAuthOption) { + *out = *in + if in.AadAuthFailureMode != nil { + in, out := &in.AadAuthFailureMode, &out.AadAuthFailureMode + *out = new(string) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAadOrApiKeyAuthOption. +func (in *DataPlaneAadOrApiKeyAuthOption) DeepCopy() *DataPlaneAadOrApiKeyAuthOption { + if in == nil { + return nil + } + out := new(DataPlaneAadOrApiKeyAuthOption) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataPlaneAadOrApiKeyAuthOption_STATUS) DeepCopyInto(out *DataPlaneAadOrApiKeyAuthOption_STATUS) { *out = *in @@ -44,6 +71,33 @@ func (in *DataPlaneAadOrApiKeyAuthOption_STATUS) DeepCopy() *DataPlaneAadOrApiKe return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataPlaneAuthOptions) DeepCopyInto(out *DataPlaneAuthOptions) { + *out = *in + if in.AadOrApiKey != nil { + in, out := &in.AadOrApiKey, &out.AadOrApiKey + *out = new(DataPlaneAadOrApiKeyAuthOption) + (*in).DeepCopyInto(*out) + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataPlaneAuthOptions. +func (in *DataPlaneAuthOptions) DeepCopy() *DataPlaneAuthOptions { + if in == nil { + return nil + } + out := new(DataPlaneAuthOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DataPlaneAuthOptions_STATUS) DeepCopyInto(out *DataPlaneAuthOptions_STATUS) { *out = *in @@ -399,6 +453,70 @@ func (in *SearchServiceList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SearchServiceOperatorSecrets) DeepCopyInto(out *SearchServiceOperatorSecrets) { + *out = *in + if in.AdminPrimaryKey != nil { + in, out := &in.AdminPrimaryKey, &out.AdminPrimaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.AdminSecondaryKey != nil { + in, out := &in.AdminSecondaryKey, &out.AdminSecondaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.QueryKey != nil { + in, out := &in.QueryKey, &out.QueryKey + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchServiceOperatorSecrets. +func (in *SearchServiceOperatorSecrets) DeepCopy() *SearchServiceOperatorSecrets { + if in == nil { + return nil + } + out := new(SearchServiceOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SearchServiceOperatorSpec) DeepCopyInto(out *SearchServiceOperatorSpec) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(SearchServiceOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SearchServiceOperatorSpec. +func (in *SearchServiceOperatorSpec) DeepCopy() *SearchServiceOperatorSpec { + if in == nil { + return nil + } + out := new(SearchServiceOperatorSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SearchService_STATUS) DeepCopyInto(out *SearchService_STATUS) { *out = *in @@ -537,6 +655,11 @@ func (in *SearchService_STATUS) DeepCopy() *SearchService_STATUS { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SearchService_Spec) DeepCopyInto(out *SearchService_Spec) { *out = *in + if in.AuthOptions != nil { + in, out := &in.AuthOptions, &out.AuthOptions + *out = new(DataPlaneAuthOptions) + (*in).DeepCopyInto(*out) + } if in.DisableLocalAuth != nil { in, out := &in.DisableLocalAuth, &out.DisableLocalAuth *out = new(bool) @@ -567,6 +690,11 @@ func (in *SearchService_Spec) DeepCopyInto(out *SearchService_Spec) { *out = new(NetworkRuleSet) (*in).DeepCopyInto(*out) } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(SearchServiceOperatorSpec) + (*in).DeepCopyInto(*out) + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) diff --git a/v2/api/search/versions_matrix.md b/v2/api/search/versions_matrix.md index 47f951b613d..1f2bc8eca3b 100644 --- a/v2/api/search/versions_matrix.md +++ b/v2/api/search/versions_matrix.md @@ -1,8 +1,11 @@ | Type Definitions in package "search" | v1api20220901 | |----------------------------------------------------------|---------------| | APIVersion | v1api20220901 | +| DataPlaneAadOrApiKeyAuthOption | v1api20220901 | +| DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode | v1api20220901 | | DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS | v1api20220901 | | DataPlaneAadOrApiKeyAuthOption_STATUS | v1api20220901 | +| DataPlaneAuthOptions | v1api20220901 | | DataPlaneAuthOptions_STATUS | v1api20220901 | | EncryptionWithCmk | v1api20220901 | | EncryptionWithCmk_EncryptionComplianceStatus_STATUS | v1api20220901 | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index e27e8482314..686cb44bdde 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -277,8 +277,8 @@ typeTransformers: because: These properties should be marked readonly - group: search - name: SearchServiceProperties - property: AuthOptions + name: DataPlaneAuthOptions + property: ApiKeyOnly remove: true because: We need a better handling for JSON # Discussion: https://github.com/Azure/azure-service-operator/pull/2916/files/93b06daa9549a91ac626e3241c5987b23b4087ac#r1179803300 @@ -1557,6 +1557,10 @@ objectModelConfiguration: SearchService: $export: true $supportedFrom: v2.1.0 + $azureGeneratedSecrets: + - AdminPrimaryKey + - AdminSecondaryKey + - QueryKey servicebus: 2021-01-01-preview: Namespace: diff --git a/v2/cmd/asoctl/go.mod b/v2/cmd/asoctl/go.mod index ee2d95ecfc9..10665d8d77d 100644 --- a/v2/cmd/asoctl/go.mod +++ b/v2/cmd/asoctl/go.mod @@ -35,6 +35,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription v1.0.0 // indirect diff --git a/v2/cmd/asoctl/go.sum b/v2/cmd/asoctl/go.sum index 29a141d44b2..6957359407f 100644 --- a/v2/cmd/asoctl/go.sum +++ b/v2/cmd/asoctl/go.sum @@ -43,7 +43,7 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontai github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice v1.0.0/go.mod h1:TmlMW4W5OvXOmOyKNnor8nlMMiO1ctIyzmHme/VHsrA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0 h1:Fv8iibGn1eSw0lt2V3cTsuokBEnOP+M//n8OiMcCgTM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0/go.mod h1:Qpe/qN9d5IQ7WPtTXMRCd6+BWTnhi3sxXVys6oJ5Vho= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0 h1:lMW1lD/17LUA5z1XTURo7LcVG2ICBPlyMHjIUrcFZNQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 h1:Dh8SxVXcSyQN76LI4IseKyrnqyTUsx336Axg8zDYSMs= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1/go.mod h1:fqmmortNEICbosf7BfNVO3wWs6Cz/pkxYfExJC97Vy8= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 h1:KWvCVjnOTKCZAlqED5KPNoN9AfcK2BhUeveLdiwy33Q= @@ -51,6 +51,8 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachine github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 h1:nmpTBgRg1HynngFYICRhceC7s5dmbKN9fJ/XQz/UQ2I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0/go.mod h1:3yjiOtnkVociBTlF7UZrwAGfJrGaOCsvtVS4HzNajxQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0 h1:SCO2mlFZrUMU8MmA5Y6EszSm2OGumuPBXFQXEvkESvk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0/go.mod h1:0W36ZU3i/Y81U7D1udQyD8qA3SD4tV7ayADNymIdHBo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1 h1:h+ZMdUM0/8oVqHjY9+1rupIvT0craBLapKhuzWui9lo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1/go.mod h1:Ad79PTMmXBLbmMbRJkfefudJNxzFHfszKYadXA8SDSw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.0.0 h1:TMEyRFKh1zaSPmoQh3kxK+xRAYVq8guCI/7SMO0F3KY= diff --git a/v2/go.mod b/v2/go.mod index 55a384852e8..1745174bd85 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -11,6 +11,8 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.0.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/subscription/armsubscription v1.0.0 github.com/benbjohnson/clock v1.1.0 @@ -44,7 +46,6 @@ require ( require ( cloud.google.com/go v0.97.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect diff --git a/v2/go.sum b/v2/go.sum index 7de3014d92d..70ac08e971d 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -56,15 +56,16 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontai github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice v1.0.0/go.mod h1:TmlMW4W5OvXOmOyKNnor8nlMMiO1ctIyzmHme/VHsrA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0 h1:Fv8iibGn1eSw0lt2V3cTsuokBEnOP+M//n8OiMcCgTM= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/cosmos/armcosmos v1.0.0/go.mod h1:Qpe/qN9d5IQ7WPtTXMRCd6+BWTnhi3sxXVys6oJ5Vho= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0 h1:lMW1lD/17LUA5z1XTURo7LcVG2ICBPlyMHjIUrcFZNQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1 h1:Dh8SxVXcSyQN76LI4IseKyrnqyTUsx336Axg8zDYSMs= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iothub/armiothub v1.1.1/go.mod h1:fqmmortNEICbosf7BfNVO3wWs6Cz/pkxYfExJC97Vy8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0 h1:KWvCVjnOTKCZAlqED5KPNoN9AfcK2BhUeveLdiwy33Q= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning v1.0.0/go.mod h1:qNN4I5AKYbXMLriS9XKebBw8EVIQkX6tJzrdtjOoJ4I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0 h1:nmpTBgRg1HynngFYICRhceC7s5dmbKN9fJ/XQz/UQ2I= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v1.0.0/go.mod h1:3yjiOtnkVociBTlF7UZrwAGfJrGaOCsvtVS4HzNajxQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0 h1:SCO2mlFZrUMU8MmA5Y6EszSm2OGumuPBXFQXEvkESvk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/search/armsearch v1.1.0/go.mod h1:0W36ZU3i/Y81U7D1udQyD8qA3SD4tV7ayADNymIdHBo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1 h1:h+ZMdUM0/8oVqHjY9+1rupIvT0craBLapKhuzWui9lo= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicebus/armservicebus v1.1.1/go.mod h1:Ad79PTMmXBLbmMbRJkfefudJNxzFHfszKYadXA8SDSw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.0.0 h1:TMEyRFKh1zaSPmoQh3kxK+xRAYVq8guCI/7SMO0F3KY= diff --git a/v2/internal/controllers/crd_search_searchservice_test.go b/v2/internal/controllers/crd_search_searchservice_test.go index fb8122cfde9..b4af8a6cc35 100644 --- a/v2/internal/controllers/crd_search_searchservice_test.go +++ b/v2/internal/controllers/crd_search_searchservice_test.go @@ -13,6 +13,7 @@ import ( search "github.com/Azure/azure-service-operator/v2/api/search/v1api20220901" "github.com/Azure/azure-service-operator/v2/internal/testcommon" "github.com/Azure/azure-service-operator/v2/internal/util/to" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) func Test_Search_SearchService_CRUD(t *testing.T) { @@ -44,6 +45,14 @@ func Test_Search_SearchService_CRUD(t *testing.T) { tc.Expect(service.Status.Id).ToNot(BeNil()) armId := *service.Status.Id + tc.RunSubtests( + testcommon.Subtest{ + Name: "WriteSearchServiceSecrets", + Test: func(tc *testcommon.KubePerTestContext) { + SearchService_WriteSecrets(tc, service) + }, + }) + old := service.DeepCopy() key := "foo" service.Spec.Tags = map[string]string{key: "bar"} @@ -59,3 +68,22 @@ func Test_Search_SearchService_CRUD(t *testing.T) { tc.Expect(retryAfter).To(BeZero()) tc.Expect(exists).To(BeFalse()) } + +func SearchService_WriteSecrets(tc *testcommon.KubePerTestContext, service *search.SearchService) { + old := service.DeepCopy() + searchKeysSecret := "searchkeyssecret" + service.Spec.OperatorSpec = &search.SearchServiceOperatorSpec{ + Secrets: &search.SearchServiceOperatorSecrets{ + AdminPrimaryKey: &genruntime.SecretDestination{Name: searchKeysSecret, Key: "adminPrimaryKey"}, + AdminSecondaryKey: &genruntime.SecretDestination{Name: searchKeysSecret, Key: "adminSecondaryKey"}, + QueryKey: &genruntime.SecretDestination{Name: searchKeysSecret, Key: "queryKey"}, + }, + } + + tc.PatchResourceAndWait(old, service) + tc.ExpectSecretHasKeys( + searchKeysSecret, + "adminPrimaryKey", + "adminSecondaryKey", + "queryKey") +} diff --git a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Search_v1api_CreationAndDeletion.yaml b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Search_v1api_CreationAndDeletion.yaml index 2a62e644de7..7fa59a886fc 100644 --- a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Search_v1api_CreationAndDeletion.yaml +++ b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Search_v1api_CreationAndDeletion.yaml @@ -66,34 +66,39 @@ interactions: code: 200 duration: "" - request: - body: '{"location":"westcentralus","name":"aso-sample-userassignedidentity"}' + body: '{"identity":{"type":"SystemAssigned"},"location":"westus2","name":"asotestqctlbg","properties":{"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}},"encryptionWithCmk":{"enforcement":"Disabled"},"hostingMode":"default","partitionCount":1,"publicNetworkAccess":"disabled","replicaCount":1},"sku":{"name":"standard"}}' form: {} headers: Accept: - application/json Content-Length: - - "69" + - "326" Content-Type: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity?api-version=2018-11-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: PUT response: - body: '{"location":"westcentralus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity","name":"aso-sample-userassignedidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ba5cef4c-e59e-4851-b6a6-f25ed31f7f1f","clientId":"592bbac0-e841-43c9-b6b5-19d649f53249"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Length: - - "488" + - "876" Content-Type: - application/json; charset=utf-8 + Elapsed-Time: + - "5483" + Etag: + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" - Location: - - /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity Pragma: - no-cache + Request-Id: + - 14d572a7-ee92-4f4d-b17d-909ad80ad1c2 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -102,34 +107,35 @@ interactions: code: 201 duration: "" - request: - body: '{"location":"westcentralus","name":"aso-sample-userassignedidentity"}' + body: "" form: {} headers: - Accept: - - application/json - Content-Length: - - "69" - Content-Type: - - application/json Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity?api-version=2018-11-30 - method: PUT + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 + method: GET response: - body: '{"location":"westcentralus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity","name":"aso-sample-userassignedidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ba5cef4c-e59e-4851-b6a6-f25ed31f7f1f","clientId":"592bbac0-e841-43c9-b6b5-19d649f53249"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 + Elapsed-Time: + - "744" + Etag: + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache + Request-Id: + - 0405f6c3-d536-4f25-bde4-efbf75b7d6fc Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - - Accept-Encoding + - Accept-Encoding,Accept-Encoding X-Content-Type-Options: - nosniff status: 200 OK @@ -139,99 +145,98 @@ interactions: body: "" form: {} headers: - Accept: - - application/json Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity?api-version=2018-11-30 + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: - body: '{"location":"westcentralus","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity","name":"aso-sample-userassignedidentity","type":"Microsoft.ManagedIdentity/userAssignedIdentities","properties":{"tenantId":"00000000-0000-0000-0000-000000000000","principalId":"ba5cef4c-e59e-4851-b6a6-f25ed31f7f1f","clientId":"592bbac0-e841-43c9-b6b5-19d649f53249"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 + Elapsed-Time: + - "1556" + Etag: + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache + Request-Id: + - ea3ece1a-d466-4254-9c6b-e67d8d898340 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - - Accept-Encoding + - Accept-Encoding,Accept-Encoding X-Content-Type-Options: - nosniff status: 200 OK code: 200 duration: "" - request: - body: '{"identity":{"type":"SystemAssigned"},"location":"westus2","name":"asotestqctlbg","properties":{"encryptionWithCmk":{"enforcement":"Disabled"},"hostingMode":"default","partitionCount":1,"publicNetworkAccess":"disabled","replicaCount":1},"sku":{"name":"standard"}}' + body: "" form: {} headers: - Accept: - - application/json - Content-Length: - - "263" - Content-Type: - - application/json Test-Request-Attempt: - - "0" + - "2" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 - method: PUT + method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache - Content-Length: - - "845" Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "4101" + - "610" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 9914e370-87cd-489c-9f4a-a2c9509d72e5 + - 54cc633e-5626-43a3-aac2-6155829aa42c Strict-Transport-Security: - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding X-Content-Type-Options: - nosniff - status: 201 Created - code: 201 + status: 200 OK + code: 200 duration: "" - request: body: "" form: {} headers: Test-Request-Attempt: - - "0" + - "3" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "155" + - "400" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 32cf5d4c-1eaf-4b24-8f3b-f5dff64aeec9 + - 9721bfce-77f2-4085-8c2c-bfbbaf6b151a Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -246,27 +251,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" + - "4" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "316" + - "222" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 4822eb95-31e3-4dd9-ad75-2f13955a394e + - 37705b77-6256-4e74-b12c-42fef43bff13 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -281,27 +286,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" + - "5" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "161" + - "342" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 0a87fcf9-41b9-46cf-9342-adafab088d90 + - 347da2bb-3c45-49b4-8087-cd511a8e1728 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -316,27 +321,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" + - "6" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "214" + - "1132" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - efd23a5e-50c7-4403-9de6-123164e1edaf + - ff1f6778-44b5-4a4f-8b7c-fea7785b370a Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -351,27 +356,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "4" + - "7" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "223" + - "516" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - e6bd443d-a323-43f1-a744-4c5ea7b2e781 + - 64df9f62-8633-4b0f-8018-ca046da263de Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -386,27 +391,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "5" + - "8" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "183" + - "251" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 0eda1956-0d95-455d-8070-c53a8c95074e + - d24903c6-36ae-4348-8a63-75fa5de3e685 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -421,27 +426,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "6" + - "9" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "222" + - "173" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 7b5dd83b-6c87-4467-b10d-db5d53e340b6 + - e61255de-9334-4f90-8d6e-253afc01b1e2 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -456,27 +461,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "7" + - "10" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "149" + - "185" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 27f0439d-9a27-4675-80ea-8f6b28829c14 + - 19d61069-bebf-4387-b772-af577ea9d3b4 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -491,27 +496,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "8" + - "11" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "200" + - "563" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - eeea049a-15ac-46ee-be90-3918fafe31f6 + - a57b0a8e-d5d3-447c-bf80-9e82a01cf1a5 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -526,27 +531,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "9" + - "12" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "303" + - "780" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 50258e60-0297-47d7-8787-8dce2d6594e3 + - 721fbcd4-0e13-45fd-a24c-7db89c0bfae8 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -561,27 +566,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "10" + - "13" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "201" + - "525" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 7d935e50-2610-4ccf-b4b3-310b1cca11d3 + - e9ab8953-ff47-40b7-b28e-b82a37075219 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -596,27 +601,27 @@ interactions: form: {} headers: Test-Request-Attempt: - - "11" + - "14" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "162" + - "539" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 7ce4d0d7-60f1-45cc-9cb8-00c8e416d646 + - c3060947-ac24-4cca-adb5-026d4a254137 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -630,28 +635,30 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "12" + - "15" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"aadOrApiKey":{"aadAuthFailureMode":"http403"}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"2f793422-989d-40d8-aa8c-975ab718237e","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "169" + - "196" Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - W/"datetime'2023-06-13T01%3A32%3A41.3765674Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - a35d664d-0ff0-430d-98dd-f2ccff8a3c7f + - e9da9e6e-78f4-46b9-a722-927ace454630 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -665,28 +672,27 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "13" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 - method: GET + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg/listQueryKeys?api-version=2020-08-01 + method: POST response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + body: '{"value":[{"name":null,"key":"{KEY}"}],"nextLink":null}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "224" - Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - "327" Expires: - "-1" Pragma: - no-cache Request-Id: - - 3943736b-77be-49d1-b8b2-65241f9d763a + - 3938868a-eb52-4122-805b-570f0b5f8816 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -700,28 +706,27 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "14" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 - method: GET + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg/listAdminKeys?api-version=2020-08-01 + method: POST response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + body: '{"primaryKey":"{KEY}","secondaryKey":"{KEY}"}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "215" - Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + - "315" Expires: - "-1" Pragma: - no-cache Request-Id: - - f3179139-4b8f-43cf-b643-ece912fcd2a1 + - 22e5634c-c27b-417e-ada0-12f073771713 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -738,46 +743,39 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "15" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 - method: GET + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa?api-version=2020-06-01 + method: DELETE response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg","name":"asotestqctlbg","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"4bbe01d0-5fd8-41e5-a717-47dd6868e534","tenantId":"00000000-0000-0000-0000-000000000000"}}' + body: "" headers: Cache-Control: - no-cache - Content-Type: - - application/json; charset=utf-8 - Elapsed-Time: - - "151" - Etag: - - W/"datetime'2023-04-27T00%3A54%3A21.9079743Z'" + Content-Length: + - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 Pragma: - no-cache - Request-Id: - - 6cae7388-1148-4009-908f-56bdd7688632 + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding,Accept-Encoding X-Content-Type-Options: - nosniff - status: 200 OK - code: 200 + status: 202 Accepted + code: 202 duration: "" - request: body: "" form: {} headers: - Accept: - - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa?api-version=2020-06-01 - method: DELETE + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET response: body: "" headers: @@ -805,7 +803,37 @@ interactions: form: {} headers: Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -835,7 +863,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" + - "3" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -865,7 +893,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" + - "4" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -895,7 +923,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" + - "5" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -925,7 +953,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "4" + - "6" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -937,35 +965,64 @@ interactions: - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 Pragma: - no-cache + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: - nosniff - status: 200 OK - code: 200 + status: 202 Accepted + code: 202 duration: "" - request: body: "" form: {} headers: - Accept: - - application/json Test-Request-Attempt: + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 - method: DELETE + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "8" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaS0xBQUEtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET response: - body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-zklaaa'' - could not be found."}}' + body: "" headers: Cache-Control: - no-cache Content-Length: - - "109" - Content-Type: - - application/json; charset=utf-8 + - "0" Expires: - "-1" Pragma: @@ -974,10 +1031,8 @@ interactions: - max-age=31536000; includeSubDomains X-Content-Type-Options: - nosniff - X-Ms-Failure-Cause: - - gateway - status: 404 Not Found - code: 404 + status: 200 OK + code: 200 duration: "" - request: body: "" @@ -987,7 +1042,7 @@ interactions: - application/json Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.ManagedIdentity/userAssignedIdentities/aso-sample-userassignedidentity?api-version=2018-11-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zklaaa/providers/Microsoft.Search/searchServices/asotestqctlbg?api-version=2022-09-01 method: DELETE response: body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-zklaaa'' diff --git a/v2/internal/controllers/recordings/Test_Search_SearchService_CRUD.yaml b/v2/internal/controllers/recordings/Test_Search_SearchService_CRUD.yaml index 1d544a5cf99..5c4be77edfb 100644 --- a/v2/internal/controllers/recordings/Test_Search_SearchService_CRUD.yaml +++ b/v2/internal/controllers/recordings/Test_Search_SearchService_CRUD.yaml @@ -81,24 +81,24 @@ interactions: method: PUT response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Length: - - "861" + - "882" Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "4091" + - "4734" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - f6362065-8cd8-4ce0-a510-8def84c5b603 + - b7238eb9-2b41-483d-8fc0-7e09e5586c52 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -116,22 +116,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "240" + - "157" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - a7b59af0-4bb7-457d-b22b-3ab55b5df217 + - 904f57af-7d2d-4b89-9106-3b25cfc8be3a Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -151,22 +151,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "214" + - "164" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - e2eac3ea-6f10-48de-a0b1-46853aa7b7d8 + - 32c5ece8-384f-4f80-bd80-2360dc1f0105 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -186,22 +186,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "156" + - "157" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 91e07391-3954-4919-8aa4-1309156a0efe + - 224d43fd-4dda-49ce-b4bc-1d9f50de80d4 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -221,22 +221,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "176" + - "223" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 360382aa-e6de-4e90-8497-534f45812adc + - 7a737626-e34f-463c-b8eb-5f2809002f70 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -256,22 +256,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "192" + - "186" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 358112e6-570f-4771-bffe-2277017d079a + - 02737e55-15f0-42cf-a64e-a089d08ba6d1 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -291,22 +291,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "148" + - "167" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - a7109be5-44e3-4552-b97f-f5a8545e0fc5 + - 3760c926-20d6-404a-b1b4-e4a50f3f325e Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -326,22 +326,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "160" + - "209" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 483f80b2-b565-43eb-be8e-c99fc7dd587b + - 6b55f612-a31a-4e9b-830f-6c7344dc9965 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -361,22 +361,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "141" + - "175" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 5af9e5cc-64bc-4906-bcb0-f9325d221732 + - e61651f9-6cf6-4f62-9bff-59a7a0e8fcb9 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -396,7 +396,7 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache @@ -405,13 +405,13 @@ interactions: Elapsed-Time: - "164" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - e6f1433d-229e-4123-a5f6-95501e6505d2 + - 79a45740-c144-423f-8eb0-4752d4386a5d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -431,22 +431,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "169" + - "177" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 7ee2a403-0df3-4bfc-aea8-adfe4b43d587 + - 8201979f-ccfe-4279-b835-756351193eaf Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -466,22 +466,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "303" + - "235" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 0514bf3c-d752-4a09-9e54-2f0ba7caf39f + - 3c5158b1-b79f-43c2-bde2-4c5b2b12cef3 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -501,22 +501,22 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "278" + - "737" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 99a5b12d-41b2-4d17-8eca-30a9e19b1ea0 + - 3220b327-4eb2-4822-96f3-b183fb7126d1 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -536,22 +536,92 @@ interactions: method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "202" + - "369" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 0d8c8c17-2fc2-424a-922f-70b3422520e9 + - cadac3a2-de8d-48c0-98c7-8e27ece9c6b2 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "13" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "192" + Etag: + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - df715b6c-c85a-44de-8069-cd28563234fa + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "14" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "342" + Etag: + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - e48d1764-2e07-4054-ac53-e8c47a9f84be Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -568,27 +638,173 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "13" + - "15" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "214" + Etag: + - W/"datetime'2023-06-11T23%3A28%3A01.1201231Z'" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - ffd6c6a0-2bf8-4473-9528-43fc3937d7ab + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"identity":{"type":"SystemAssigned"},"location":"westus2","name":"asotest-search-htqllr","properties":{"encryptionWithCmk":{"enforcement":"Disabled"},"hostingMode":"default","partitionCount":1,"publicNetworkAccess":"disabled","replicaCount":1},"sku":{"name":"standard"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "271" + Content-Type: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "347" + Etag: + - W/"datetime'2023-06-11T23%3A38%3A33.3007369Z'" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - 7e040c58-a77a-4346-a481-2f1808c52083 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "16" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "139" + - "172" Etag: - - W/"datetime'2023-04-27T00%3A40%3A37.1886571Z'" + - W/"datetime'2023-06-11T23%3A38%3A33.3007369Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 467b847a-83a0-44c2-8cee-23aa184ff434 + - f267677f-fb08-4b84-93fa-caafeefdecfe + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr/listQueryKeys?api-version=2020-08-01 + method: POST + response: + body: '{"value":[{"name":null,"key":"{KEY}"}],"nextLink":null}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "117" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - 891bbd82-121f-468b-ad68-3270e0bcc350 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr/listAdminKeys?api-version=2020-08-01 + method: POST + response: + body: '{"primaryKey":"{KEY}","secondaryKey":"{KEY}"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "174" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - b114625c-9e43-4722-a4b4-e2beb38e02b7 Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -609,27 +825,27 @@ interactions: Content-Type: - application/json Test-Request-Attempt: - - "1" + - "2" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 method: PUT response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "325" + - "466" Etag: - - W/"datetime'2023-04-27T00%3A49%3A04.3301487Z'" + - W/"datetime'2023-06-11T23%3A38%3A42.73936Z'" Expires: - "-1" Pragma: - no-cache Request-Id: - - 53446d2f-f18d-4714-ba54-ce0413ba8ade + - 35ff1a28-9f42-4f76-8bcf-c66ac782089d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -646,27 +862,95 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "14" + - "17" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 method: GET response: body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr","name":"asotest-search-htqllr","type":"Microsoft.Search/searchServices","location":"West - US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"9a89a9d3-08d1-46f5-b6c8-dde4a2474e4f","tenantId":"00000000-0000-0000-0000-000000000000"}}' + US 2","tags":{"foo":"bar"},"properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Disabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"encryptionWithCmk":{"enforcement":"Disabled","encryptionComplianceStatus":"Compliant"},"disableLocalAuth":false,"authOptions":{"apiKeyOnly":{}}},"sku":{"name":"standard"},"identity":{"type":"SystemAssigned","principalId":"6815d354-4975-4ed8-a973-666e2a9d1e8f","tenantId":"00000000-0000-0000-0000-000000000000"}}' headers: Cache-Control: - no-cache Content-Type: - application/json; charset=utf-8 Elapsed-Time: - - "191" + - "563" Etag: - - W/"datetime'2023-04-27T00%3A49%3A04.3301487Z'" + - W/"datetime'2023-06-11T23%3A38%3A42.73936Z'" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - b612d9bd-4259-4c97-9a4b-bc1d2f770a18 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr/listQueryKeys?api-version=2020-08-01 + method: POST + response: + body: '{"value":[{"name":null,"key":"{KEY}"}],"nextLink":null}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "94" + Expires: + - "-1" + Pragma: + - no-cache + Request-Id: + - 856e8407-2c7c-470f-bc21-d27d94bf284e + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr/listAdminKeys?api-version=2020-08-01 + method: POST + response: + body: '{"primaryKey":"{KEY}","secondaryKey":"{KEY}"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Elapsed-Time: + - "112" Expires: - "-1" Pragma: - no-cache Request-Id: - - 1c9d9212-158d-4a3b-8d85-af34faad6fc2 + - ec11ad59-b21b-4618-81de-0a1be21532ca Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: @@ -694,13 +978,13 @@ interactions: Content-Length: - "0" Elapsed-Time: - - "3562" + - "3220" Expires: - "-1" Pragma: - no-cache Request-Id: - - 9376a559-8a4b-4e4f-ba99-2fd0a9802c52 + - f16e27ae-2fa9-4218-843c-b8b2ab82de02 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -715,7 +999,7 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "15" + - "18" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zadzmw/providers/Microsoft.Search/searchServices/asotest-search-htqllr?api-version=2022-09-01 method: GET response: diff --git a/v2/internal/testcommon/test_context.go b/v2/internal/testcommon/test_context.go index 6c8d6e8b9f5..3969a04fac0 100644 --- a/v2/internal/testcommon/test_context.go +++ b/v2/internal/testcommon/test_context.go @@ -392,6 +392,10 @@ var ( // baseURLMatcher matches the base part of a URL baseURLMatcher = regexp.MustCompile(`^https://[^/]+/`) + + // customKeyMatcher is used to match 'key' or 'Key' followed by the base64 patterns without '=' padding. + customKeyMatcher = regexp.MustCompile(`"([a-z]+)?[K-k]ey":"[a-zA-Z0-9+/]+"`) + customKeyReplacer = regexp.MustCompile(`"(?:[A-Za-z0-9+/]{4}){10,}(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/])"`) ) // hideDates replaces all ISO8601 datetimes with a fixed value @@ -422,12 +426,19 @@ func hideBaseRequestURL(s string) string { return baseURLMatcher.ReplaceAllLiteralString(s, `https://management.azure.com/`) } +func hideCustomKeys(s string) string { + return customKeyMatcher.ReplaceAllStringFunc(s, func(matched string) string { + return customKeyReplacer.ReplaceAllString(matched, `"{KEY}"`) + }) +} + func hideRecordingData(s string) string { result := hideDates(s) result = hideSSHKeys(result) result = hidePasswords(result) result = hideKubeConfigs(result) result = hideKeys(result) + result = hideCustomKeys(result) return result } diff --git a/v2/samples/search/v1api/refs/v1api20181130_userassignedidentity.yaml b/v2/samples/search/v1api/refs/v1api20181130_userassignedidentity.yaml deleted file mode 100644 index 935bf2f2160..00000000000 --- a/v2/samples/search/v1api/refs/v1api20181130_userassignedidentity.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: managedidentity.azure.com/v1api20181130 -kind: UserAssignedIdentity -metadata: - name: aso-sample-userassignedidentity - namespace: default -spec: - location: westcentralus - owner: - name: aso-sample-rg diff --git a/v2/samples/search/v1api/v1api20220901_searchservice.yaml b/v2/samples/search/v1api/v1api20220901_searchservice.yaml index 3178fe75311..adb634e6eba 100644 --- a/v2/samples/search/v1api/v1api20220901_searchservice.yaml +++ b/v2/samples/search/v1api/v1api20220901_searchservice.yaml @@ -17,3 +17,17 @@ spec: replicaCount: 1 sku: name: standard + authOptions: + aadOrApiKey: + aadAuthFailureMode: http403 + operatorSpec: + secrets: + adminPrimaryKey: + key: adminPrimaryKey + name: searchservicekeyssecret + adminSecondaryKey: + key: adminSecondaryKey + name: searchservicekeyssecret + queryKey: + key: queryKey + name: searchservicekeyssecret