diff --git a/.github/workflows/live-validation.yml b/.github/workflows/live-validation.yml index 3a35f65938..ed66f7c158 100644 --- a/.github/workflows/live-validation.yml +++ b/.github/workflows/live-validation.yml @@ -1,14 +1,15 @@ name: Live Azure Validation on: schedule: - # 13:00 UTC is a time when both US and NZ are asleep (or headed in that direction) - - cron: "0 13 * * *" + # 5:35 pm every Sunday (UTC) + # to ensure the live validation runs weekly + - cron: "35 17 * * 0" workflow_dispatch: jobs: test-generator: concurrency: live-resources # only permit one run at a time - runs-on: ubuntu-latest + runs-on: [self-hosted, 1ES.Pool=aso-1es-pool] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/visualize-repo.yml b/.github/workflows/visualize-repo.yml index 23cb04aaa2..6b60e8c2e1 100644 --- a/.github/workflows/visualize-repo.yml +++ b/.github/workflows/visualize-repo.yml @@ -31,7 +31,7 @@ jobs: - name: Update ASO v1 diagram uses: githubocto/repo-visualizer@main with: - excluded_paths: "ignore,.github,v2" + excluded_paths: "ignore,.github,v2,docs,hack,scripts/v2" output_file: "docs/hugo/content/contributing/aso-v1-structure.svg" commit_message: "Updating visualization for ASO v1" should_push: false diff --git a/Taskfile.yml b/Taskfile.yml index c5e6031989..6f09214a85 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -538,7 +538,6 @@ tasks: dir: "{{.CONTROLLER_ROOT}}" deps: - controller:test-integration-envtest-live - - controller:ci-integration-tests controller:generate-types: desc: Run {{.GENERATOR_APP}} to generate input files for controller-gen for {{.CONTROLLER_APP}}. diff --git a/docs/hugo/content/contributing/aso-codegen-structure.svg b/docs/hugo/content/contributing/aso-codegen-structure.svg index cdb78e81d4..e530b31cb7 100644 --- a/docs/hugo/content/contributing/aso-codegen-structure.svg +++ b/docs/hugo/content/contributing/aso-codegen-structure.svg @@ -1 +1 @@ -pkgpkginternalinternaltestcasestestcasestesttestreportingreportingjsonastjsonastfunctionsfunctionsconversionsconversionsconfigconfigcodegencodegenastmodelastmodelastbuilderastbuildertestdatatestdatatestdatatestdatatestdatatestdatatestdatatestdatapipelinepipelinetestdatatestdatastoragestoragetestdatatestdataArmResourceArmResourceAllOfAllOf.go.json.md.mod.yamleach dot sized by file size \ No newline at end of file +pkgpkginternalinternaltestcasestestcasestesttestreportingreportingjsonastjsonastfunctionsfunctionsconversionsconversionsconfigconfigcodegencodegenastmodelastmodelastbuilderastbuildertestdatatestdatatestdatatestdatatestdatatestdatatestdatatestdatapipelinepipelinetestdatatestdatastoragestoragetestdatatestdataArmResourceArmResourceAllOfAllOf.go.json.md.mod.yamleach dot sized by file size \ No newline at end of file diff --git a/docs/hugo/content/contributing/aso-v1-structure.svg b/docs/hugo/content/contributing/aso-v1-structure.svg index a401662929..6f4e348b2f 100644 --- a/docs/hugo/content/contributing/aso-v1-structure.svg +++ b/docs/hugo/content/contributing/aso-v1-structure.svg @@ -1 +1 @@ -scriptsscriptspkgpkghack/crossplanehack/crossplanedocsdocsdevopsdevopscontrollerscontrollersconfigconfigchartschartsapiapiv2v2secretssecretsresourcemanagerresourcemanagerapisapisv2v2v1v1hugohugosamplessamplescrdcrdazure-service-operatorazure-service-operatorv1alpha1v1alpha1storagesstoragesrediscachesrediscachespsqlpsqlmysqlmysqlcosmosdbcosmosdbazuresqlazuresqlapimapimsqlsqlcachecacheservicesserviceshowtohowtostaticstaticcontentcontentpatchespatchescrdscrdstemplatestemplatesreferencereferenceguideguidedesigndesignnetworknetworkinsightsinsightscomputecomputecachecacheversioningversioningcase-studiescase-studies.bicep.dot.gitignore.go.json.md.mod.mysql.py.scss.sh.sql.svg.toml.tpl.txt.yaml.ymleach dot sized by file size \ No newline at end of file +scriptsscriptspkgpkgdevopsdevopscontrollerscontrollersconfigconfigchartschartsapiapisecretssecretsresourcemanagerresourcemanagerhelpershelperserrhelperrhelpsamplessamplesrbacrbacdefaultdefaultcrdcrdazure-service-operatorazure-service-operatorv1beta1v1beta1v1alpha2v1alpha2v1alpha1v1alpha1kubekubekeyvaultkeyvaultvnetvnetvmssvmssvmextvmextvmvmstoragesstoragesrediscachesrediscachespsqlpsqlpippipnicnicmysqlmysqlkeyvaultskeyvaultseventhubseventhubscosmosdbcosmosdbconfigconfigazuresqlazuresqlappinsightsappinsightsapimapimpatchespatchescrdscrdstemplatestemplatesredisredisvnetrulevnetruleserverserverpsqluserpsqluserdatabasedatabasevnetrulevnetruleserverservermysqlusermysqluserdatabasedatabasesqldatabasesqldatabaseaccountaccountazuresqldbazuresqldbapimgmtapimgmtgeneratedgenerated.gitignore.go.json.md.mod.mysql.sh.yaml.ymleach dot sized by file size \ No newline at end of file diff --git a/docs/hugo/content/contributing/aso-v2-structure.svg b/docs/hugo/content/contributing/aso-v2-structure.svg index c1595930c3..dee3f5b50d 100644 --- a/docs/hugo/content/contributing/aso-v2-structure.svg +++ b/docs/hugo/content/contributing/aso-v2-structure.svg @@ -1 +1 @@ -samplessamplespkgpkginternalinternalconfigconfigchartschartsapiapistoragestoragenetworknetworkeventhubeventhubeventgrideventgriddocumentdbdocumentdbcomputecomputecachecachegenruntimegenruntimeutilutilcontrollerscontrollerswebwebsynapsesynapsesubscriptionsubscriptionstoragestoragesqlsqlsignalrservicesignalrserviceservicebusservicebussearchsearchresourcesresourcesnetworknetworkmanagedidentitymanagedidentitykeyvaultkeyvaultinsightsinsightseventhubeventhubeventgrideventgriddocumentdbdocumentdbdevicesdevicesdbforpostgresqldbforpostgresqldbformysqldbformysqldbformariadbdbformariadbdatafactorydatafactorycontainerservicecontainerservicecontainerinstancecontainerinstancecomputecomputecdncdncachecachebatchbatchauthorizationauthorizationappconfigurationappconfigurationmongodbmongodbrecordingsrecordingsv1api20211101v1api20211101.gitignore.go.md.mod.mysql.sql.txt.yamleach dot sized by file size \ No newline at end of file +samplessamplespkgpkginternalinternalconfigconfigchartschartsapiapistoragestoragenetworknetworkeventgrideventgriddocumentdbdocumentdbcomputecomputecachecachegenruntimegenruntimeutilutilcontrollerscontrollerswebwebsynapsesynapsesubscriptionsubscriptionstoragestoragesqlsqlsignalrservicesignalrserviceservicebusservicebussearchsearchresourcesresourcesnetworknetworkmanagedidentitymanagedidentitykeyvaultkeyvaultinsightsinsightseventhubeventhubeventgrideventgriddocumentdbdocumentdbdevicesdevicesdbforpostgresqldbforpostgresqldbformysqldbformysqldbformariadbdbformariadbdataprotectiondataprotectiondatafactorydatafactorycontainerservicecontainerservicecomputecomputecdncdncachecachebatchbatchauthorizationauthorizationmongodbmongodbrecordingsrecordingsv1api20211101v1api20211101.gitignore.go.md.mod.mysql.sql.txt.yamleach dot sized by file size \ No newline at end of file diff --git a/docs/hugo/content/guide/upgrading.md b/docs/hugo/content/guide/upgrading.md index 2a62224435..42ca2a0f20 100644 --- a/docs/hugo/content/guide/upgrading.md +++ b/docs/hugo/content/guide/upgrading.md @@ -35,20 +35,13 @@ We recommend that you upgrade ASO using the same tool you installed it with. **Note:** The instructions below all assume you're upgrading from the previous version (N-1) to the latest version (vN). Please follow the [Recommended upgrade pattern](#recommended-upgrade-pattern) for upgrading multiple versions. -### kubectl apply - -The operator can be upgraded simply by running the same command you used to install it: - -```bash -kubectl apply --server-side=true -f https://github.com/Azure/azure-service-operator/releases/download/v2.0.0/azureserviceoperator_v2.0.0.yaml -``` - -### Helm +{{< tabpane text=true left=true >}} +{{% tab header="Helm" %}} ```bash helm repo add aso2 https://raw.githubusercontent.com/Azure/azure-service-operator/main/v2/charts helm repo update -helm upgrade --devel --version v2.0.0 aso2 aso2/azure-service-operator \ +helm upgrade --version v2.0.0 aso2 aso2/azure-service-operator \ --namespace=azureserviceoperator-system \ --set azureSubscriptionID=$AZURE_SUBSCRIPTION_ID \ --set azureTenantID=$AZURE_TENANT_ID \ @@ -56,6 +49,23 @@ helm upgrade --devel --version v2.0.0 aso2 aso2/azure-service-operator \ --set azureClientSecret=$AZURE_CLIENT_SECRET ``` +Add `--crdPattern` if you want to install any of the new resources included in the new release. + +{{% /tab %}} +{{% tab header="YAML" %}} + +The operator can be upgraded simply by running the same command you used to install it: + +```bash +kubectl apply --server-side=true -f https://github.com/Azure/azure-service-operator/releases/download/v2.0.0/azureserviceoperator_v2.0.0.yaml +``` + +Don't skip the `--server-side=true` flag, as it's required for the upgrade to work correctly. + +{{% /tab %}} +{{< /tabpane >}} + + ## Supported Versions We provide best effort support via GitHub for ASO, focusing on the latest version and the previous version. If you're running an older version, we may ask you to upgrade to the latest release before we can help you. diff --git a/docs/hugo/content/reference/_index.md b/docs/hugo/content/reference/_index.md index b6bafe2fed..f248d06766 100644 --- a/docs/hugo/content/reference/_index.md +++ b/docs/hugo/content/reference/_index.md @@ -195,6 +195,15 @@ These resource versions are deprecated and will be removed in an upcoming ASO re ## ContainerService +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [TrustedAccessRoleBinding](https://azure.github.io/azure-service-operator/reference/containerservice/v1api20230202preview/#containerservice.azure.com/v1api20230202preview.TrustedAccessRoleBinding) | 2023-02-02-preview | v1api20230202preview | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/containerservice/v1api20230202preview/v1api20230202preview_trustedaccessrolebinding.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. @@ -236,10 +245,10 @@ These resource(s) are available for use in the current release of ASO. Different Development of these new resources is complete and they will be available in the next release of ASO. -| Resource | ARM Version | CRD Version | Supported From | Sample | -|--------------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| BackupVault | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvault.yaml) | -| BackupVaultsBackupPolicy | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvaultsbackuppolicy.yaml) | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| [BackupVault](https://azure.github.io/azure-service-operator/reference/dataprotection/v1api20230101/#dataprotection.azure.com/v1api20230101.BackupVault) | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvault.yaml) | +| [BackupVaultsBackupPolicy](https://azure.github.io/azure-service-operator/reference/dataprotection/v1api20230101/#dataprotection.azure.com/v1api20230101.BackupVaultsBackupPolicy) | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvaultsbackuppolicy.yaml) | ## DBforMariaDB diff --git a/docs/hugo/content/reference/containerservice/_index.md b/docs/hugo/content/reference/containerservice/_index.md index 48d54bcd4e..d92c820a08 100644 --- a/docs/hugo/content/reference/containerservice/_index.md +++ b/docs/hugo/content/reference/containerservice/_index.md @@ -3,6 +3,15 @@ title: ContainerService Supported Resources linktitle: ContainerService no_list: true --- +### Next Release + +Development of these new resources is complete and they will be available in the next release of ASO. + + +| Resource | ARM Version | CRD Version | Supported From | Sample | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|----------------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [TrustedAccessRoleBinding](https://azure.github.io/azure-service-operator/reference/containerservice/v1api20230202preview/#containerservice.azure.com/v1api20230202preview.TrustedAccessRoleBinding) | 2023-02-02-preview | v1api20230202preview | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/containerservice/v1api20230202preview/v1api20230202preview_trustedaccessrolebinding.yaml) | + ### Released These resource(s) are available for use in the current release of ASO. Different versions of a given resource reflect different versions of the Azure ARM API. diff --git a/docs/hugo/content/reference/containerservice/v1api20230202preview.md b/docs/hugo/content/reference/containerservice/v1api20230202preview.md index ca8919cf7a..0eda0e2762 100644 --- a/docs/hugo/content/reference/containerservice/v1api20230202preview.md +++ b/docs/hugo/content/reference/containerservice/v1api20230202preview.md @@ -23643,6 +23643,299 @@ ManagedClusterAgentPoolProfileProperties_ARM +

ManagedClusters_TrustedAccessRoleBinding_STATUS +

+

+(Appears on:TrustedAccessRoleBinding) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +[]genruntime/conditions.Condition + + +
+

Conditions: The observed state of the resource

+
+id
+ +string + +
+

Id: Fully qualified resource ID for the resource. Ex - +/​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​{resourceProviderNamespace}/​{resourceType}/​{resourceName} +

+name
+ +string + +
+

Name: The name of the resource

+
+provisioningState
+ + +TrustedAccessRoleBindingProperties_ProvisioningState_STATUS + + +
+

ProvisioningState: The current provisioning state of trusted access role binding.

+
+roles
+ +[]string + +
+

Roles: A list of roles to bind, each item is a resource type qualified role name. For example: +‘Microsoft.MachineLearningServices/workspaces/reader’.

+
+sourceResourceId
+ +string + +
+

SourceResourceId: The ARM resource ID of source resource that trusted access is configured for.

+
+systemData
+ + +SystemData_STATUS + + +
+

SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information.

+
+type
+ +string + +
+

Type: The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”

+
+

ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+id
+ +string + +
+

Id: Fully qualified resource ID for the resource. Ex - +/​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​{resourceProviderNamespace}/​{resourceType}/​{resourceName} +

+name
+ +string + +
+

Name: The name of the resource

+
+properties
+ + +TrustedAccessRoleBindingProperties_STATUS_ARM + + +
+

Properties: Properties for trusted access role binding

+
+systemData
+ + +SystemData_STATUS_ARM + + +
+

SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information.

+
+type
+ +string + +
+

Type: The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”

+
+

ManagedClusters_TrustedAccessRoleBinding_Spec +

+

+(Appears on:TrustedAccessRoleBinding) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+azureName
+ +string + +
+

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.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a containerservice.azure.com/ManagedCluster resource

+
+roles
+ +[]string + +
+

Roles: A list of roles to bind, each item is a resource type qualified role name. For example: +‘Microsoft.MachineLearningServices/workspaces/reader’.

+
+sourceResourceReference
+ + +genruntime.ResourceReference + + +
+

SourceResourceReference: The ARM resource ID of source resource that trusted access is configured for.

+
+

ManagedClusters_TrustedAccessRoleBinding_Spec_ARM +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+properties
+ + +TrustedAccessRoleBindingProperties_ARM + + +
+

Properties: Properties for trusted access role binding

+

NetworkDataplane (string alias)

@@ -26558,7 +26851,7 @@ int

SystemData_STATUS

-(Appears on:ManagedCluster_STATUS) +(Appears on:ManagedCluster_STATUS, ManagedClusters_TrustedAccessRoleBinding_STATUS)

Metadata pertaining to creation and last modification of the resource.

@@ -26646,7 +26939,7 @@ SystemData_LastModifiedByType_STATUS

SystemData_STATUS_ARM

-(Appears on:ManagedCluster_STATUS_ARM) +(Appears on:ManagedCluster_STATUS_ARM, ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM)

Metadata pertaining to creation and last modification of the resource.

@@ -26731,6 +27024,237 @@ SystemData_LastModifiedByType_STATUS +

TrustedAccessRoleBinding +

+
+

Generator information: +- Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-02-02-preview/managedClusters.json +- ARM URI: /​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​Microsoft.ContainerService/​managedClusters/​{resourceName}/​trustedAccessRoleBindings/​{trustedAccessRoleBindingName} +

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +ManagedClusters_TrustedAccessRoleBinding_Spec + + +
+
+
+ + + + + + + + + + + + + + + + + +
+azureName
+ +string + +
+

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.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a containerservice.azure.com/ManagedCluster resource

+
+roles
+ +[]string + +
+

Roles: A list of roles to bind, each item is a resource type qualified role name. For example: +‘Microsoft.MachineLearningServices/workspaces/reader’.

+
+sourceResourceReference
+ + +genruntime.ResourceReference + + +
+

SourceResourceReference: The ARM resource ID of source resource that trusted access is configured for.

+
+
+status
+ + +ManagedClusters_TrustedAccessRoleBinding_STATUS + + +
+
+

TrustedAccessRoleBindingProperties_ARM +

+

+(Appears on:ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) +

+
+

Properties for trusted access role binding

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+roles
+ +[]string + +
+

Roles: A list of roles to bind, each item is a resource type qualified role name. For example: +‘Microsoft.MachineLearningServices/workspaces/reader’.

+
+sourceResourceId
+ +string + +
+
+

TrustedAccessRoleBindingProperties_ProvisioningState_STATUS +(string alias)

+

+(Appears on:ManagedClusters_TrustedAccessRoleBinding_STATUS, TrustedAccessRoleBindingProperties_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"Canceled"

"Deleting"

"Failed"

"Succeeded"

"Updating"

+

TrustedAccessRoleBindingProperties_STATUS_ARM +

+

+(Appears on:ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) +

+
+

Properties for trusted access role binding

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+provisioningState
+ + +TrustedAccessRoleBindingProperties_ProvisioningState_STATUS + + +
+

ProvisioningState: The current provisioning state of trusted access role binding.

+
+roles
+ +[]string + +
+

Roles: A list of roles to bind, each item is a resource type qualified role name. For example: +‘Microsoft.MachineLearningServices/workspaces/reader’.

+
+sourceResourceId
+ +string + +
+

SourceResourceId: The ARM resource ID of source resource that trusted access is configured for.

+

UpgradeOverrideSettings

diff --git a/docs/hugo/content/reference/dataprotection/_index.md b/docs/hugo/content/reference/dataprotection/_index.md index 61be6f2ffd..6cc0375b3e 100644 --- a/docs/hugo/content/reference/dataprotection/_index.md +++ b/docs/hugo/content/reference/dataprotection/_index.md @@ -8,8 +8,8 @@ no_list: true Development of these new resources is complete and they will be available in the next release of ASO. -| Resource | ARM Version | CRD Version | Supported From | Sample | -|--------------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------| -| BackupVault | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvault.yaml) | -| BackupVaultsBackupPolicy | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvaultsbackuppolicy.yaml) | +| Resource | ARM Version | CRD Version | Supported From | Sample | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|---------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| [BackupVault](https://azure.github.io/azure-service-operator/reference/dataprotection/v1api20230101/#dataprotection.azure.com/v1api20230101.BackupVault) | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvault.yaml) | +| [BackupVaultsBackupPolicy](https://azure.github.io/azure-service-operator/reference/dataprotection/v1api20230101/#dataprotection.azure.com/v1api20230101.BackupVaultsBackupPolicy) | 2023-01-01 | v1api20230101 | v2.2.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/dataprotection/v1api/v1api20230101_backupvaultsbackuppolicy.yaml) | diff --git a/docs/hugo/content/reference/dataprotection/v1api20230101.md b/docs/hugo/content/reference/dataprotection/v1api20230101.md new file mode 100644 index 0000000000..f5398ce1a1 --- /dev/null +++ b/docs/hugo/content/reference/dataprotection/v1api20230101.md @@ -0,0 +1,8784 @@ +--- +title: dataprotection.azure.com/v1api20230101 +--- +

dataprotection.azure.com/v1api20230101

+
+

Package v1api20230101 contains API Schema definitions for the dataprotection v1api20230101 API group

+
+Resource Types: + +

APIVersion +(string alias)

+
+
+ + + + + + + + + + +
ValueDescription

"2023-01-01"

+

AbsoluteDeleteOption +

+

+(Appears on:DeleteOption) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Duration of deletion after given timespan

+
+objectType
+ + +AbsoluteDeleteOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AbsoluteDeleteOption_ARM +

+

+(Appears on:DeleteOption_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Duration of deletion after given timespan

+
+objectType
+ + +AbsoluteDeleteOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AbsoluteDeleteOption_ObjectType +(string alias)

+

+(Appears on:AbsoluteDeleteOption, AbsoluteDeleteOption_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AbsoluteDeleteOption"

+

AbsoluteDeleteOption_ObjectType_STATUS +(string alias)

+

+(Appears on:AbsoluteDeleteOption_STATUS, AbsoluteDeleteOption_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AbsoluteDeleteOption"

+

AbsoluteDeleteOption_STATUS +

+

+(Appears on:DeleteOption_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Duration of deletion after given timespan

+
+objectType
+ + +AbsoluteDeleteOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AbsoluteDeleteOption_STATUS_ARM +

+

+(Appears on:DeleteOption_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Duration of deletion after given timespan

+
+objectType
+ + +AbsoluteDeleteOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AdhocBasedTaggingCriteria +

+

+(Appears on:AdhocBasedTriggerContext) +

+
+

Adhoc backup tagging criteria

+
+ + + + + + + + + + + + + +
FieldDescription
+tagInfo
+ + +RetentionTag + + +
+

TagInfo: Retention tag information

+
+

AdhocBasedTaggingCriteria_ARM +

+

+(Appears on:AdhocBasedTriggerContext_ARM) +

+
+

Adhoc backup tagging criteria

+
+ + + + + + + + + + + + + +
FieldDescription
+tagInfo
+ + +RetentionTag_ARM + + +
+

TagInfo: Retention tag information

+
+

AdhocBasedTaggingCriteria_STATUS +

+

+(Appears on:AdhocBasedTriggerContext_STATUS) +

+
+

Adhoc backup tagging criteria

+
+ + + + + + + + + + + + + +
FieldDescription
+tagInfo
+ + +RetentionTag_STATUS + + +
+

TagInfo: Retention tag information

+
+

AdhocBasedTaggingCriteria_STATUS_ARM +

+

+(Appears on:AdhocBasedTriggerContext_STATUS_ARM) +

+
+

Adhoc backup tagging criteria

+
+ + + + + + + + + + + + + +
FieldDescription
+tagInfo
+ + +RetentionTag_STATUS_ARM + + +
+

TagInfo: Retention tag information

+
+

AdhocBasedTriggerContext +

+

+(Appears on:TriggerContext) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +AdhocBasedTriggerContext_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+taggingCriteria
+ + +AdhocBasedTaggingCriteria + + +
+

TaggingCriteria: Tagging Criteria containing retention tag for adhoc backup.

+
+

AdhocBasedTriggerContext_ARM +

+

+(Appears on:TriggerContext_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +AdhocBasedTriggerContext_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+taggingCriteria
+ + +AdhocBasedTaggingCriteria_ARM + + +
+

TaggingCriteria: Tagging Criteria containing retention tag for adhoc backup.

+
+

AdhocBasedTriggerContext_ObjectType +(string alias)

+

+(Appears on:AdhocBasedTriggerContext, AdhocBasedTriggerContext_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AdhocBasedTriggerContext"

+

AdhocBasedTriggerContext_ObjectType_STATUS +(string alias)

+

+(Appears on:AdhocBasedTriggerContext_STATUS, AdhocBasedTriggerContext_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AdhocBasedTriggerContext"

+

AdhocBasedTriggerContext_STATUS +

+

+(Appears on:TriggerContext_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +AdhocBasedTriggerContext_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+taggingCriteria
+ + +AdhocBasedTaggingCriteria_STATUS + + +
+

TaggingCriteria: Tagging Criteria containing retention tag for adhoc backup.

+
+

AdhocBasedTriggerContext_STATUS_ARM +

+

+(Appears on:TriggerContext_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +AdhocBasedTriggerContext_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+taggingCriteria
+ + +AdhocBasedTaggingCriteria_STATUS_ARM + + +
+

TaggingCriteria: Tagging Criteria containing retention tag for adhoc backup.

+
+

AzureBackupParams +

+

+(Appears on:BackupParameters) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+backupType
+ +string + +
+

BackupType: BackupType ; Full/Incremental etc

+
+objectType
+ + +AzureBackupParams_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AzureBackupParams_ARM +

+

+(Appears on:BackupParameters_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+backupType
+ +string + +
+

BackupType: BackupType ; Full/Incremental etc

+
+objectType
+ + +AzureBackupParams_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AzureBackupParams_ObjectType +(string alias)

+

+(Appears on:AzureBackupParams, AzureBackupParams_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureBackupParams"

+

AzureBackupParams_ObjectType_STATUS +(string alias)

+

+(Appears on:AzureBackupParams_STATUS, AzureBackupParams_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureBackupParams"

+

AzureBackupParams_STATUS +

+

+(Appears on:BackupParameters_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+backupType
+ +string + +
+

BackupType: BackupType ; Full/Incremental etc

+
+objectType
+ + +AzureBackupParams_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AzureBackupParams_STATUS_ARM +

+

+(Appears on:BackupParameters_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+backupType
+ +string + +
+

BackupType: BackupType ; Full/Incremental etc

+
+objectType
+ + +AzureBackupParams_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

AzureBackupRule +

+

+(Appears on:BasePolicyRule) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupParameters
+ + +BackupParameters + + +
+
+dataStore
+ + +DataStoreInfoBase + + +
+

DataStore: DataStoreInfo base

+
+name
+ +string + +
+
+objectType
+ + +AzureBackupRule_ObjectType + + +
+
+trigger
+ + +TriggerContext + + +
+
+

AzureBackupRule_ARM +

+

+(Appears on:BasePolicyRule_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupParameters
+ + +BackupParameters_ARM + + +
+
+dataStore
+ + +DataStoreInfoBase_ARM + + +
+

DataStore: DataStoreInfo base

+
+name
+ +string + +
+
+objectType
+ + +AzureBackupRule_ObjectType + + +
+
+trigger
+ + +TriggerContext_ARM + + +
+
+

AzureBackupRule_ObjectType +(string alias)

+

+(Appears on:AzureBackupRule, AzureBackupRule_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureBackupRule"

+

AzureBackupRule_ObjectType_STATUS +(string alias)

+

+(Appears on:AzureBackupRule_STATUS, AzureBackupRule_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureBackupRule"

+

AzureBackupRule_STATUS +

+

+(Appears on:BasePolicyRule_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupParameters
+ + +BackupParameters_STATUS + + +
+
+dataStore
+ + +DataStoreInfoBase_STATUS + + +
+

DataStore: DataStoreInfo base

+
+name
+ +string + +
+
+objectType
+ + +AzureBackupRule_ObjectType_STATUS + + +
+
+trigger
+ + +TriggerContext_STATUS + + +
+
+

AzureBackupRule_STATUS_ARM +

+

+(Appears on:BasePolicyRule_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupParameters
+ + +BackupParameters_STATUS_ARM + + +
+
+dataStore
+ + +DataStoreInfoBase_STATUS_ARM + + +
+

DataStore: DataStoreInfo base

+
+name
+ +string + +
+
+objectType
+ + +AzureBackupRule_ObjectType_STATUS + + +
+
+trigger
+ + +TriggerContext_STATUS_ARM + + +
+
+

AzureMonitorAlertSettings +

+

+(Appears on:MonitoringSettings) +

+
+

Settings for Azure Monitor based alerts

+
+ + + + + + + + + + + + + +
FieldDescription
+alertsForAllJobFailures
+ + +AzureMonitorAlertSettings_AlertsForAllJobFailures + + +
+
+

AzureMonitorAlertSettings_ARM +

+

+(Appears on:MonitoringSettings_ARM) +

+
+

Settings for Azure Monitor based alerts

+
+ + + + + + + + + + + + + +
FieldDescription
+alertsForAllJobFailures
+ + +AzureMonitorAlertSettings_AlertsForAllJobFailures + + +
+
+

AzureMonitorAlertSettings_AlertsForAllJobFailures +(string alias)

+

+(Appears on:AzureMonitorAlertSettings, AzureMonitorAlertSettings_ARM) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"Disabled"

"Enabled"

+

AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS +(string alias)

+

+(Appears on:AzureMonitorAlertSettings_STATUS, AzureMonitorAlertSettings_STATUS_ARM) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"Disabled"

"Enabled"

+

AzureMonitorAlertSettings_STATUS +

+

+(Appears on:MonitoringSettings_STATUS) +

+
+

Settings for Azure Monitor based alerts

+
+ + + + + + + + + + + + + +
FieldDescription
+alertsForAllJobFailures
+ + +AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS + + +
+
+

AzureMonitorAlertSettings_STATUS_ARM +

+

+(Appears on:MonitoringSettings_STATUS_ARM) +

+
+

Settings for Azure Monitor based alerts

+
+ + + + + + + + + + + + + +
FieldDescription
+alertsForAllJobFailures
+ + +AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS + + +
+
+

AzureRetentionRule +

+

+(Appears on:BasePolicyRule) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+isDefault
+ +bool + +
+
+lifecycles
+ + +[]SourceLifeCycle + + +
+
+name
+ +string + +
+
+objectType
+ + +AzureRetentionRule_ObjectType + + +
+
+

AzureRetentionRule_ARM +

+

+(Appears on:BasePolicyRule_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+isDefault
+ +bool + +
+
+lifecycles
+ + +[]SourceLifeCycle_ARM + + +
+
+name
+ +string + +
+
+objectType
+ + +AzureRetentionRule_ObjectType + + +
+
+

AzureRetentionRule_ObjectType +(string alias)

+

+(Appears on:AzureRetentionRule, AzureRetentionRule_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureRetentionRule"

+

AzureRetentionRule_ObjectType_STATUS +(string alias)

+

+(Appears on:AzureRetentionRule_STATUS, AzureRetentionRule_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"AzureRetentionRule"

+

AzureRetentionRule_STATUS +

+

+(Appears on:BasePolicyRule_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+isDefault
+ +bool + +
+
+lifecycles
+ + +[]SourceLifeCycle_STATUS + + +
+
+name
+ +string + +
+
+objectType
+ + +AzureRetentionRule_ObjectType_STATUS + + +
+
+

AzureRetentionRule_STATUS_ARM +

+

+(Appears on:BasePolicyRule_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+isDefault
+ +bool + +
+
+lifecycles
+ + +[]SourceLifeCycle_STATUS_ARM + + +
+
+name
+ +string + +
+
+objectType
+ + +AzureRetentionRule_ObjectType_STATUS + + +
+
+

BackupCriteria +

+

+(Appears on:TaggingCriteria) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+scheduleBasedBackupCriteria
+ + +ScheduleBasedBackupCriteria + + +
+

ScheduleBasedBackupCriteria: Mutually exclusive with all other properties

+
+

BackupCriteria_ARM +

+

+(Appears on:TaggingCriteria_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+scheduleBasedBackupCriteria
+ + +ScheduleBasedBackupCriteria_ARM + + +
+

ScheduleBasedBackupCriteria: Mutually exclusive with all other properties

+
+

BackupCriteria_STATUS +

+

+(Appears on:TaggingCriteria_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+scheduleBasedBackupCriteria
+ + +ScheduleBasedBackupCriteria_STATUS + + +
+

ScheduleBasedBackupCriteria: Mutually exclusive with all other properties

+
+

BackupCriteria_STATUS_ARM +

+

+(Appears on:TaggingCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+scheduleBasedBackupCriteria
+ + +ScheduleBasedBackupCriteria_STATUS_ARM + + +
+

ScheduleBasedBackupCriteria: Mutually exclusive with all other properties

+
+

BackupParameters +

+

+(Appears on:AzureBackupRule) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+azureBackupParams
+ + +AzureBackupParams + + +
+

AzureBackupParams: Mutually exclusive with all other properties

+
+

BackupParameters_ARM +

+

+(Appears on:AzureBackupRule_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+azureBackupParams
+ + +AzureBackupParams_ARM + + +
+

AzureBackupParams: Mutually exclusive with all other properties

+
+

BackupParameters_STATUS +

+

+(Appears on:AzureBackupRule_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+azureBackupParams
+ + +AzureBackupParams_STATUS + + +
+

AzureBackupParams: Mutually exclusive with all other properties

+
+

BackupParameters_STATUS_ARM +

+

+(Appears on:AzureBackupRule_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+azureBackupParams
+ + +AzureBackupParams_STATUS_ARM + + +
+

AzureBackupParams: Mutually exclusive with all other properties

+
+

BackupPolicy +

+

+(Appears on:BaseBackupPolicy) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+datasourceTypes
+ +[]string + +
+

DatasourceTypes: Type of datasource for the backup management

+
+objectType
+ + +BackupPolicy_ObjectType + + +
+
+policyRules
+ + +[]BasePolicyRule + + +
+

PolicyRules: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc

+
+

BackupPolicy_ARM +

+

+(Appears on:BaseBackupPolicy_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+datasourceTypes
+ +[]string + +
+

DatasourceTypes: Type of datasource for the backup management

+
+objectType
+ + +BackupPolicy_ObjectType + + +
+
+policyRules
+ + +[]BasePolicyRule_ARM + + +
+

PolicyRules: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc

+
+

BackupPolicy_ObjectType +(string alias)

+

+(Appears on:BackupPolicy, BackupPolicy_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"BackupPolicy"

+

BackupPolicy_ObjectType_STATUS +(string alias)

+

+(Appears on:BackupPolicy_STATUS, BackupPolicy_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"BackupPolicy"

+

BackupPolicy_STATUS +

+

+(Appears on:BaseBackupPolicy_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+datasourceTypes
+ +[]string + +
+

DatasourceTypes: Type of datasource for the backup management

+
+objectType
+ + +BackupPolicy_ObjectType_STATUS + + +
+
+policyRules
+ + +[]BasePolicyRule_STATUS + + +
+

PolicyRules: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc

+
+

BackupPolicy_STATUS_ARM +

+

+(Appears on:BaseBackupPolicy_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+datasourceTypes
+ +[]string + +
+

DatasourceTypes: Type of datasource for the backup management

+
+objectType
+ + +BackupPolicy_ObjectType_STATUS + + +
+
+policyRules
+ + +[]BasePolicyRule_STATUS_ARM + + +
+

PolicyRules: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc

+
+

BackupSchedule +

+

+(Appears on:ScheduleBasedTriggerContext) +

+
+

Schedule for backup

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+repeatingTimeIntervals
+ +[]string + +
+

RepeatingTimeIntervals: ISO 8601 repeating time interval format

+
+timeZone
+ +string + +
+

TimeZone: Time zone for a schedule. Example: Pacific Standard Time

+
+

BackupSchedule_ARM +

+

+(Appears on:ScheduleBasedTriggerContext_ARM) +

+
+

Schedule for backup

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+repeatingTimeIntervals
+ +[]string + +
+

RepeatingTimeIntervals: ISO 8601 repeating time interval format

+
+timeZone
+ +string + +
+

TimeZone: Time zone for a schedule. Example: Pacific Standard Time

+
+

BackupSchedule_STATUS +

+

+(Appears on:ScheduleBasedTriggerContext_STATUS) +

+
+

Schedule for backup

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+repeatingTimeIntervals
+ +[]string + +
+

RepeatingTimeIntervals: ISO 8601 repeating time interval format

+
+timeZone
+ +string + +
+

TimeZone: Time zone for a schedule. Example: Pacific Standard Time

+
+

BackupSchedule_STATUS_ARM +

+

+(Appears on:ScheduleBasedTriggerContext_STATUS_ARM) +

+
+

Schedule for backup

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+repeatingTimeIntervals
+ +[]string + +
+

RepeatingTimeIntervals: ISO 8601 repeating time interval format

+
+timeZone
+ +string + +
+

TimeZone: Time zone for a schedule. Example: Pacific Standard Time

+
+

BackupVault +

+
+

Generator information: +- Generated from: /dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json +- ARM URI: /​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​Microsoft.DataProtection/​backupVaults/​{vaultName} +

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BackupVault_Spec + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+azureName
+ +string + +
+

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.

+
+identity
+ + +DppIdentityDetails + + +
+

Identity: Input Managed Identity Details

+
+location
+ +string + +
+

Location: Resource location.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a resources.azure.com/ResourceGroup resource

+
+properties
+ + +BackupVaultSpec + + +
+

Properties: BackupVaultResource properties

+
+tags
+ +map[string]string + +
+

Tags: Resource tags.

+
+
+status
+ + +BackupVaultResource_STATUS + + +
+
+

BackupVaultResource_STATUS +

+

+(Appears on:BackupVault) +

+
+

Backup Vault Resource

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +[]genruntime/conditions.Condition + + +
+

Conditions: The observed state of the resource

+
+eTag
+ +string + +
+

ETag: Optional ETag.

+
+id
+ +string + +
+

Id: Resource Id represents the complete path to the resource.

+
+identity
+ + +DppIdentityDetails_STATUS + + +
+

Identity: Input Managed Identity Details

+
+location
+ +string + +
+

Location: Resource location.

+
+name
+ +string + +
+

Name: Resource name associated with the resource.

+
+properties
+ + +BackupVault_STATUS + + +
+

Properties: BackupVaultResource properties

+
+systemData
+ + +SystemData_STATUS + + +
+

SystemData: Metadata pertaining to creation and last modification of the resource.

+
+tags
+ +map[string]string + +
+

Tags: Resource tags.

+
+type
+ +string + +
+

Type: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…

+
+

BackupVaultResource_STATUS_ARM +

+
+

Backup Vault Resource

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+eTag
+ +string + +
+

ETag: Optional ETag.

+
+id
+ +string + +
+

Id: Resource Id represents the complete path to the resource.

+
+identity
+ + +DppIdentityDetails_STATUS_ARM + + +
+

Identity: Input Managed Identity Details

+
+location
+ +string + +
+

Location: Resource location.

+
+name
+ +string + +
+

Name: Resource name associated with the resource.

+
+properties
+ + +BackupVault_STATUS_ARM + + +
+

Properties: BackupVaultResource properties

+
+systemData
+ + +SystemData_STATUS_ARM + + +
+

SystemData: Metadata pertaining to creation and last modification of the resource.

+
+tags
+ +map[string]string + +
+

Tags: Resource tags.

+
+type
+ +string + +
+

Type: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…

+
+

BackupVaultSpec +

+

+(Appears on:BackupVault_Spec) +

+
+

Backup Vault

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+featureSettings
+ + +FeatureSettings + + +
+

FeatureSettings: Feature Settings

+
+monitoringSettings
+ + +MonitoringSettings + + +
+

MonitoringSettings: Monitoring Settings

+
+securitySettings
+ + +SecuritySettings + + +
+

SecuritySettings: Security Settings

+
+storageSettings
+ + +[]StorageSetting + + +
+

StorageSettings: Storage Settings

+
+

BackupVaultSpec_ARM +

+

+(Appears on:BackupVault_Spec_ARM) +

+
+

Backup Vault

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+featureSettings
+ + +FeatureSettings_ARM + + +
+

FeatureSettings: Feature Settings

+
+monitoringSettings
+ + +MonitoringSettings_ARM + + +
+

MonitoringSettings: Monitoring Settings

+
+securitySettings
+ + +SecuritySettings_ARM + + +
+

SecuritySettings: Security Settings

+
+storageSettings
+ + +[]StorageSetting_ARM + + +
+

StorageSettings: Storage Settings

+
+

BackupVault_ProvisioningState_STATUS +(string alias)

+

+(Appears on:BackupVault_STATUS, BackupVault_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"Failed"

"Provisioning"

"Succeeded"

"Unknown"

"Updating"

+

BackupVault_ResourceMoveState_STATUS +(string alias)

+

+(Appears on:BackupVault_STATUS, BackupVault_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"CommitFailed"

"CommitTimedout"

"CriticalFailure"

"Failed"

"InProgress"

"MoveSucceeded"

"PartialSuccess"

"PrepareFailed"

"PrepareTimedout"

"Unknown"

+

BackupVault_STATUS +

+

+(Appears on:BackupVaultResource_STATUS) +

+
+

Backup Vault

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+featureSettings
+ + +FeatureSettings_STATUS + + +
+

FeatureSettings: Feature Settings

+
+isVaultProtectedByResourceGuard
+ +bool + +
+

IsVaultProtectedByResourceGuard: Is vault protected by resource guard

+
+monitoringSettings
+ + +MonitoringSettings_STATUS + + +
+

MonitoringSettings: Monitoring Settings

+
+provisioningState
+ + +BackupVault_ProvisioningState_STATUS + + +
+

ProvisioningState: Provisioning state of the BackupVault resource

+
+resourceMoveDetails
+ + +ResourceMoveDetails_STATUS + + +
+

ResourceMoveDetails: Resource move details for backup vault

+
+resourceMoveState
+ + +BackupVault_ResourceMoveState_STATUS + + +
+

ResourceMoveState: Resource move state for backup vault

+
+securitySettings
+ + +SecuritySettings_STATUS + + +
+

SecuritySettings: Security Settings

+
+storageSettings
+ + +[]StorageSetting_STATUS + + +
+

StorageSettings: Storage Settings

+
+

BackupVault_STATUS_ARM +

+

+(Appears on:BackupVaultResource_STATUS_ARM) +

+
+

Backup Vault

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+featureSettings
+ + +FeatureSettings_STATUS_ARM + + +
+

FeatureSettings: Feature Settings

+
+isVaultProtectedByResourceGuard
+ +bool + +
+

IsVaultProtectedByResourceGuard: Is vault protected by resource guard

+
+monitoringSettings
+ + +MonitoringSettings_STATUS_ARM + + +
+

MonitoringSettings: Monitoring Settings

+
+provisioningState
+ + +BackupVault_ProvisioningState_STATUS + + +
+

ProvisioningState: Provisioning state of the BackupVault resource

+
+resourceMoveDetails
+ + +ResourceMoveDetails_STATUS_ARM + + +
+

ResourceMoveDetails: Resource move details for backup vault

+
+resourceMoveState
+ + +BackupVault_ResourceMoveState_STATUS + + +
+

ResourceMoveState: Resource move state for backup vault

+
+securitySettings
+ + +SecuritySettings_STATUS_ARM + + +
+

SecuritySettings: Security Settings

+
+storageSettings
+ + +[]StorageSetting_STATUS_ARM + + +
+

StorageSettings: Storage Settings

+
+

BackupVault_Spec +

+

+(Appears on:BackupVault) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+azureName
+ +string + +
+

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.

+
+identity
+ + +DppIdentityDetails + + +
+

Identity: Input Managed Identity Details

+
+location
+ +string + +
+

Location: Resource location.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a resources.azure.com/ResourceGroup resource

+
+properties
+ + +BackupVaultSpec + + +
+

Properties: BackupVaultResource properties

+
+tags
+ +map[string]string + +
+

Tags: Resource tags.

+
+

BackupVault_Spec_ARM +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+identity
+ + +DppIdentityDetails_ARM + + +
+

Identity: Input Managed Identity Details

+
+location
+ +string + +
+

Location: Resource location.

+
+name
+ +string + +
+
+properties
+ + +BackupVaultSpec_ARM + + +
+

Properties: BackupVaultResource properties

+
+tags
+ +map[string]string + +
+

Tags: Resource tags.

+
+

BackupVaultsBackupPolicy +

+
+

Generator information: +- Generated from: /dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json +- ARM URI: /​subscriptions/​{subscriptionId}/​resourceGroups/​{resourceGroupName}/​providers/​Microsoft.DataProtection/​backupVaults/​{vaultName}/​backupPolicies/​{backupPolicyName} +

+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +BackupVaults_BackupPolicy_Spec + + +
+
+
+ + + + + + + + + + + + + +
+azureName
+ +string + +
+

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.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a dataprotection.azure.com/BackupVault resource

+
+properties
+ + +BaseBackupPolicy + + +
+

Properties: BaseBackupPolicyResource properties

+
+
+status
+ + +BackupVaults_BackupPolicy_STATUS + + +
+
+

BackupVaults_BackupPolicy_STATUS +

+

+(Appears on:BackupVaultsBackupPolicy) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+conditions
+ + +[]genruntime/conditions.Condition + + +
+

Conditions: The observed state of the resource

+
+id
+ +string + +
+

Id: Resource Id represents the complete path to the resource.

+
+name
+ +string + +
+

Name: Resource name associated with the resource.

+
+properties
+ + +BaseBackupPolicy_STATUS + + +
+

Properties: BaseBackupPolicyResource properties

+
+systemData
+ + +SystemData_STATUS + + +
+

SystemData: Metadata pertaining to creation and last modification of the resource.

+
+type
+ +string + +
+

Type: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…

+
+

BackupVaults_BackupPolicy_STATUS_ARM +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+id
+ +string + +
+

Id: Resource Id represents the complete path to the resource.

+
+name
+ +string + +
+

Name: Resource name associated with the resource.

+
+properties
+ + +BaseBackupPolicy_STATUS_ARM + + +
+

Properties: BaseBackupPolicyResource properties

+
+systemData
+ + +SystemData_STATUS_ARM + + +
+

SystemData: Metadata pertaining to creation and last modification of the resource.

+
+type
+ +string + +
+

Type: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…

+
+

BackupVaults_BackupPolicy_Spec +

+

+(Appears on:BackupVaultsBackupPolicy) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+azureName
+ +string + +
+

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.

+
+owner
+ + +genruntime.KnownResourceReference + + +
+

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 +reference to a dataprotection.azure.com/BackupVault resource

+
+properties
+ + +BaseBackupPolicy + + +
+

Properties: BaseBackupPolicyResource properties

+
+

BackupVaults_BackupPolicy_Spec_ARM +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+properties
+ + +BaseBackupPolicy_ARM + + +
+

Properties: BaseBackupPolicyResource properties

+
+

BaseBackupPolicy +

+

+(Appears on:BackupVaults_BackupPolicy_Spec) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+backupPolicy
+ + +BackupPolicy + + +
+

BackupPolicy: Mutually exclusive with all other properties

+
+

BaseBackupPolicy_ARM +

+

+(Appears on:BackupVaults_BackupPolicy_Spec_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+backupPolicy
+ + +BackupPolicy_ARM + + +
+

BackupPolicy: Mutually exclusive with all other properties

+
+

BaseBackupPolicy_STATUS +

+

+(Appears on:BackupVaults_BackupPolicy_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+backupPolicy
+ + +BackupPolicy_STATUS + + +
+

BackupPolicy: Mutually exclusive with all other properties

+
+

BaseBackupPolicy_STATUS_ARM +

+

+(Appears on:BackupVaults_BackupPolicy_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+backupPolicy
+ + +BackupPolicy_STATUS_ARM + + +
+

BackupPolicy: Mutually exclusive with all other properties

+
+

BasePolicyRule +

+

+(Appears on:BackupPolicy) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+azureBackupRule
+ + +AzureBackupRule + + +
+

AzureBackup: Mutually exclusive with all other properties

+
+azureRetentionRule
+ + +AzureRetentionRule + + +
+

AzureRetention: Mutually exclusive with all other properties

+
+

BasePolicyRule_ARM +

+

+(Appears on:BackupPolicy_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+azureBackupRule
+ + +AzureBackupRule_ARM + + +
+

AzureBackup: Mutually exclusive with all other properties

+
+azureRetentionRule
+ + +AzureRetentionRule_ARM + + +
+

AzureRetention: Mutually exclusive with all other properties

+
+

BasePolicyRule_STATUS +

+

+(Appears on:BackupPolicy_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+azureBackupRule
+ + +AzureBackupRule_STATUS + + +
+

AzureBackup: Mutually exclusive with all other properties

+
+azureRetentionRule
+ + +AzureRetentionRule_STATUS + + +
+

AzureRetention: Mutually exclusive with all other properties

+
+

BasePolicyRule_STATUS_ARM +

+

+(Appears on:BackupPolicy_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+azureBackupRule
+ + +AzureBackupRule_STATUS_ARM + + +
+

AzureBackup: Mutually exclusive with all other properties

+
+azureRetentionRule
+ + +AzureRetentionRule_STATUS_ARM + + +
+

AzureRetention: Mutually exclusive with all other properties

+
+

CopyOnExpiryOption +

+

+(Appears on:CopyOption) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +CopyOnExpiryOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CopyOnExpiryOption_ARM +

+

+(Appears on:CopyOption_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +CopyOnExpiryOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CopyOnExpiryOption_ObjectType +(string alias)

+

+(Appears on:CopyOnExpiryOption, CopyOnExpiryOption_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"CopyOnExpiryOption"

+

CopyOnExpiryOption_ObjectType_STATUS +(string alias)

+

+(Appears on:CopyOnExpiryOption_STATUS, CopyOnExpiryOption_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"CopyOnExpiryOption"

+

CopyOnExpiryOption_STATUS +

+

+(Appears on:CopyOption_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +CopyOnExpiryOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CopyOnExpiryOption_STATUS_ARM +

+

+(Appears on:CopyOption_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +CopyOnExpiryOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CopyOption +

+

+(Appears on:TargetCopySetting) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+copyOnExpiryOption
+ + +CopyOnExpiryOption + + +
+

CopyOnExpiry: Mutually exclusive with all other properties

+
+customCopyOption
+ + +CustomCopyOption + + +
+

CustomCopy: Mutually exclusive with all other properties

+
+immediateCopyOption
+ + +ImmediateCopyOption + + +
+

ImmediateCopy: Mutually exclusive with all other properties

+
+

CopyOption_ARM +

+

+(Appears on:TargetCopySetting_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+copyOnExpiryOption
+ + +CopyOnExpiryOption_ARM + + +
+

CopyOnExpiry: Mutually exclusive with all other properties

+
+customCopyOption
+ + +CustomCopyOption_ARM + + +
+

CustomCopy: Mutually exclusive with all other properties

+
+immediateCopyOption
+ + +ImmediateCopyOption_ARM + + +
+

ImmediateCopy: Mutually exclusive with all other properties

+
+

CopyOption_STATUS +

+

+(Appears on:TargetCopySetting_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+copyOnExpiryOption
+ + +CopyOnExpiryOption_STATUS + + +
+

CopyOnExpiry: Mutually exclusive with all other properties

+
+customCopyOption
+ + +CustomCopyOption_STATUS + + +
+

CustomCopy: Mutually exclusive with all other properties

+
+immediateCopyOption
+ + +ImmediateCopyOption_STATUS + + +
+

ImmediateCopy: Mutually exclusive with all other properties

+
+

CopyOption_STATUS_ARM +

+

+(Appears on:TargetCopySetting_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+copyOnExpiryOption
+ + +CopyOnExpiryOption_STATUS_ARM + + +
+

CopyOnExpiry: Mutually exclusive with all other properties

+
+customCopyOption
+ + +CustomCopyOption_STATUS_ARM + + +
+

CustomCopy: Mutually exclusive with all other properties

+
+immediateCopyOption
+ + +ImmediateCopyOption_STATUS_ARM + + +
+

ImmediateCopy: Mutually exclusive with all other properties

+
+

CrossSubscriptionRestoreSettings +

+

+(Appears on:FeatureSettings) +

+
+

CrossSubscriptionRestore Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +CrossSubscriptionRestoreSettings_State + + +
+

State: CrossSubscriptionRestore state

+
+

CrossSubscriptionRestoreSettings_ARM +

+

+(Appears on:FeatureSettings_ARM) +

+
+

CrossSubscriptionRestore Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +CrossSubscriptionRestoreSettings_State + + +
+

State: CrossSubscriptionRestore state

+
+

CrossSubscriptionRestoreSettings_STATUS +

+

+(Appears on:FeatureSettings_STATUS) +

+
+

CrossSubscriptionRestore Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +CrossSubscriptionRestoreSettings_State_STATUS + + +
+

State: CrossSubscriptionRestore state

+
+

CrossSubscriptionRestoreSettings_STATUS_ARM +

+

+(Appears on:FeatureSettings_STATUS_ARM) +

+
+

CrossSubscriptionRestore Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +CrossSubscriptionRestoreSettings_State_STATUS + + +
+

State: CrossSubscriptionRestore state

+
+

CrossSubscriptionRestoreSettings_State +(string alias)

+

+(Appears on:CrossSubscriptionRestoreSettings, CrossSubscriptionRestoreSettings_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"Disabled"

"Enabled"

"PermanentlyDisabled"

+

CrossSubscriptionRestoreSettings_State_STATUS +(string alias)

+

+(Appears on:CrossSubscriptionRestoreSettings_STATUS, CrossSubscriptionRestoreSettings_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"Disabled"

"Enabled"

"PermanentlyDisabled"

+

CustomCopyOption +

+

+(Appears on:CopyOption) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Data copied after given timespan

+
+objectType
+ + +CustomCopyOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CustomCopyOption_ARM +

+

+(Appears on:CopyOption_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Data copied after given timespan

+
+objectType
+ + +CustomCopyOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CustomCopyOption_ObjectType +(string alias)

+

+(Appears on:CustomCopyOption, CustomCopyOption_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"CustomCopyOption"

+

CustomCopyOption_ObjectType_STATUS +(string alias)

+

+(Appears on:CustomCopyOption_STATUS, CustomCopyOption_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"CustomCopyOption"

+

CustomCopyOption_STATUS +

+

+(Appears on:CopyOption_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Data copied after given timespan

+
+objectType
+ + +CustomCopyOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

CustomCopyOption_STATUS_ARM +

+

+(Appears on:CopyOption_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+duration
+ +string + +
+

Duration: Data copied after given timespan

+
+objectType
+ + +CustomCopyOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

DataStoreInfoBase +

+

+(Appears on:AzureBackupRule, SourceLifeCycle, TargetCopySetting) +

+
+

DataStoreInfo base

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+dataStoreType
+ + +DataStoreInfoBase_DataStoreType + + +
+

DataStoreType: type of datastore; Operational/Vault/Archive

+
+objectType
+ +string + +
+

ObjectType: Type of Datasource object, used to initialize the right inherited type

+
+

DataStoreInfoBase_ARM +

+

+(Appears on:AzureBackupRule_ARM, SourceLifeCycle_ARM, TargetCopySetting_ARM) +

+
+

DataStoreInfo base

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+dataStoreType
+ + +DataStoreInfoBase_DataStoreType + + +
+

DataStoreType: type of datastore; Operational/Vault/Archive

+
+objectType
+ +string + +
+

ObjectType: Type of Datasource object, used to initialize the right inherited type

+
+

DataStoreInfoBase_DataStoreType +(string alias)

+

+(Appears on:DataStoreInfoBase, DataStoreInfoBase_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"ArchiveStore"

"OperationalStore"

"VaultStore"

+

DataStoreInfoBase_DataStoreType_STATUS +(string alias)

+

+(Appears on:DataStoreInfoBase_STATUS, DataStoreInfoBase_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"ArchiveStore"

"OperationalStore"

"VaultStore"

+

DataStoreInfoBase_STATUS +

+

+(Appears on:AzureBackupRule_STATUS, SourceLifeCycle_STATUS, TargetCopySetting_STATUS) +

+
+

DataStoreInfo base

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+dataStoreType
+ + +DataStoreInfoBase_DataStoreType_STATUS + + +
+

DataStoreType: type of datastore; Operational/Vault/Archive

+
+objectType
+ +string + +
+

ObjectType: Type of Datasource object, used to initialize the right inherited type

+
+

DataStoreInfoBase_STATUS_ARM +

+

+(Appears on:AzureBackupRule_STATUS_ARM, SourceLifeCycle_STATUS_ARM, TargetCopySetting_STATUS_ARM) +

+
+

DataStoreInfo base

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+dataStoreType
+ + +DataStoreInfoBase_DataStoreType_STATUS + + +
+

DataStoreType: type of datastore; Operational/Vault/Archive

+
+objectType
+ +string + +
+

ObjectType: Type of Datasource object, used to initialize the right inherited type

+
+

Day +

+

+(Appears on:ScheduleBasedBackupCriteria) +

+
+

Day of the week

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+date
+ +int + +
+

Date: Date of the month

+
+isLast
+ +bool + +
+

IsLast: Whether Date is last date of month

+
+

Day_ARM +

+

+(Appears on:ScheduleBasedBackupCriteria_ARM) +

+
+

Day of the week

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+date
+ +int + +
+

Date: Date of the month

+
+isLast
+ +bool + +
+

IsLast: Whether Date is last date of month

+
+

Day_STATUS +

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS) +

+
+

Day of the week

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+date
+ +int + +
+

Date: Date of the month

+
+isLast
+ +bool + +
+

IsLast: Whether Date is last date of month

+
+

Day_STATUS_ARM +

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+

Day of the week

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+date
+ +int + +
+

Date: Date of the month

+
+isLast
+ +bool + +
+

IsLast: Whether Date is last date of month

+
+

DeleteOption +

+

+(Appears on:SourceLifeCycle) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+absoluteDeleteOption
+ + +AbsoluteDeleteOption + + +
+

AbsoluteDeleteOption: Mutually exclusive with all other properties

+
+

DeleteOption_ARM +

+

+(Appears on:SourceLifeCycle_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+absoluteDeleteOption
+ + +AbsoluteDeleteOption_ARM + + +
+

AbsoluteDeleteOption: Mutually exclusive with all other properties

+
+

DeleteOption_STATUS +

+

+(Appears on:SourceLifeCycle_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+absoluteDeleteOption
+ + +AbsoluteDeleteOption_STATUS + + +
+

AbsoluteDeleteOption: Mutually exclusive with all other properties

+
+

DeleteOption_STATUS_ARM +

+

+(Appears on:SourceLifeCycle_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+absoluteDeleteOption
+ + +AbsoluteDeleteOption_STATUS_ARM + + +
+

AbsoluteDeleteOption: Mutually exclusive with all other properties

+
+

DppIdentityDetails +

+

+(Appears on:BackupVault_Spec) +

+
+

Identity details

+
+ + + + + + + + + + + + + +
FieldDescription
+type
+ +string + +
+

Type: The identityType which can be either SystemAssigned or None

+
+

DppIdentityDetails_ARM +

+

+(Appears on:BackupVault_Spec_ARM) +

+
+

Identity details

+
+ + + + + + + + + + + + + +
FieldDescription
+type
+ +string + +
+

Type: The identityType which can be either SystemAssigned or None

+
+

DppIdentityDetails_STATUS +

+

+(Appears on:BackupVaultResource_STATUS) +

+
+

Identity details

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+principalId
+ +string + +
+

PrincipalId: The object ID of the service principal object for the managed identity that is used to grant role-based +access to an Azure resource.

+
+tenantId
+ +string + +
+

TenantId: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member.

+
+type
+ +string + +
+

Type: The identityType which can be either SystemAssigned or None

+
+

DppIdentityDetails_STATUS_ARM +

+

+(Appears on:BackupVaultResource_STATUS_ARM) +

+
+

Identity details

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+principalId
+ +string + +
+

PrincipalId: The object ID of the service principal object for the managed identity that is used to grant role-based +access to an Azure resource.

+
+tenantId
+ +string + +
+

TenantId: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where the resource is now a member.

+
+type
+ +string + +
+

Type: The identityType which can be either SystemAssigned or None

+
+

FeatureSettings +

+

+(Appears on:BackupVaultSpec) +

+
+

Class containing feature settings of vault

+
+ + + + + + + + + + + + + +
FieldDescription
+crossSubscriptionRestoreSettings
+ + +CrossSubscriptionRestoreSettings + + +
+

CrossSubscriptionRestoreSettings: CrossSubscriptionRestore Settings

+
+

FeatureSettings_ARM +

+

+(Appears on:BackupVaultSpec_ARM) +

+
+

Class containing feature settings of vault

+
+ + + + + + + + + + + + + +
FieldDescription
+crossSubscriptionRestoreSettings
+ + +CrossSubscriptionRestoreSettings_ARM + + +
+

CrossSubscriptionRestoreSettings: CrossSubscriptionRestore Settings

+
+

FeatureSettings_STATUS +

+

+(Appears on:BackupVault_STATUS) +

+
+

Class containing feature settings of vault

+
+ + + + + + + + + + + + + +
FieldDescription
+crossSubscriptionRestoreSettings
+ + +CrossSubscriptionRestoreSettings_STATUS + + +
+

CrossSubscriptionRestoreSettings: CrossSubscriptionRestore Settings

+
+

FeatureSettings_STATUS_ARM +

+

+(Appears on:BackupVault_STATUS_ARM) +

+
+

Class containing feature settings of vault

+
+ + + + + + + + + + + + + +
FieldDescription
+crossSubscriptionRestoreSettings
+ + +CrossSubscriptionRestoreSettings_STATUS_ARM + + +
+

CrossSubscriptionRestoreSettings: CrossSubscriptionRestore Settings

+
+

ImmediateCopyOption +

+

+(Appears on:CopyOption) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ImmediateCopyOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

ImmediateCopyOption_ARM +

+

+(Appears on:CopyOption_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ImmediateCopyOption_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

ImmediateCopyOption_ObjectType +(string alias)

+

+(Appears on:ImmediateCopyOption, ImmediateCopyOption_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ImmediateCopyOption"

+

ImmediateCopyOption_ObjectType_STATUS +(string alias)

+

+(Appears on:ImmediateCopyOption_STATUS, ImmediateCopyOption_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ImmediateCopyOption"

+

ImmediateCopyOption_STATUS +

+

+(Appears on:CopyOption_STATUS) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ImmediateCopyOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

ImmediateCopyOption_STATUS_ARM +

+

+(Appears on:CopyOption_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ImmediateCopyOption_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+

ImmutabilitySettings +

+

+(Appears on:SecuritySettings) +

+
+

Immutability Settings at vault level

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +ImmutabilitySettings_State + + +
+

State: Immutability state

+
+

ImmutabilitySettings_ARM +

+

+(Appears on:SecuritySettings_ARM) +

+
+

Immutability Settings at vault level

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +ImmutabilitySettings_State + + +
+

State: Immutability state

+
+

ImmutabilitySettings_STATUS +

+

+(Appears on:SecuritySettings_STATUS) +

+
+

Immutability Settings at vault level

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +ImmutabilitySettings_State_STATUS + + +
+

State: Immutability state

+
+

ImmutabilitySettings_STATUS_ARM +

+

+(Appears on:SecuritySettings_STATUS_ARM) +

+
+

Immutability Settings at vault level

+
+ + + + + + + + + + + + + +
FieldDescription
+state
+ + +ImmutabilitySettings_State_STATUS + + +
+

State: Immutability state

+
+

ImmutabilitySettings_State +(string alias)

+

+(Appears on:ImmutabilitySettings, ImmutabilitySettings_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"Disabled"

"Locked"

"Unlocked"

+

ImmutabilitySettings_State_STATUS +(string alias)

+

+(Appears on:ImmutabilitySettings_STATUS, ImmutabilitySettings_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"Disabled"

"Locked"

"Unlocked"

+

MonitoringSettings +

+

+(Appears on:BackupVaultSpec) +

+
+

Monitoring Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+azureMonitorAlertSettings
+ + +AzureMonitorAlertSettings + + +
+

AzureMonitorAlertSettings: Settings for Azure Monitor based alerts

+
+

MonitoringSettings_ARM +

+

+(Appears on:BackupVaultSpec_ARM) +

+
+

Monitoring Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+azureMonitorAlertSettings
+ + +AzureMonitorAlertSettings_ARM + + +
+

AzureMonitorAlertSettings: Settings for Azure Monitor based alerts

+
+

MonitoringSettings_STATUS +

+

+(Appears on:BackupVault_STATUS) +

+
+

Monitoring Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+azureMonitorAlertSettings
+ + +AzureMonitorAlertSettings_STATUS + + +
+

AzureMonitorAlertSettings: Settings for Azure Monitor based alerts

+
+

MonitoringSettings_STATUS_ARM +

+

+(Appears on:BackupVault_STATUS_ARM) +

+
+

Monitoring Settings

+
+ + + + + + + + + + + + + +
FieldDescription
+azureMonitorAlertSettings
+ + +AzureMonitorAlertSettings_STATUS_ARM + + +
+

AzureMonitorAlertSettings: Settings for Azure Monitor based alerts

+
+

ResourceMoveDetails_STATUS +

+

+(Appears on:BackupVault_STATUS) +

+
+

ResourceMoveDetails will be returned in response to GetResource call from ARM

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+completionTimeUtc
+ +string + +
+

CompletionTimeUtc: Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format.

+
+operationId
+ +string + +
+

OperationId: CorrelationId of latest ResourceMove operation attempted

+
+sourceResourcePath
+ +string + +
+

SourceResourcePath: ARM resource path of source resource

+
+startTimeUtc
+ +string + +
+

StartTimeUtc: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format.

+
+targetResourcePath
+ +string + +
+

TargetResourcePath: ARM resource path of target resource used in latest ResourceMove operation

+
+

ResourceMoveDetails_STATUS_ARM +

+

+(Appears on:BackupVault_STATUS_ARM) +

+
+

ResourceMoveDetails will be returned in response to GetResource call from ARM

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+completionTimeUtc
+ +string + +
+

CompletionTimeUtc: Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format.

+
+operationId
+ +string + +
+

OperationId: CorrelationId of latest ResourceMove operation attempted

+
+sourceResourcePath
+ +string + +
+

SourceResourcePath: ARM resource path of source resource

+
+startTimeUtc
+ +string + +
+

StartTimeUtc: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format.

+
+targetResourcePath
+ +string + +
+

TargetResourcePath: ARM resource path of target resource used in latest ResourceMove operation

+
+

RetentionTag +

+

+(Appears on:AdhocBasedTaggingCriteria, TaggingCriteria) +

+
+

Retention tag

+
+ + + + + + + + + + + + + +
FieldDescription
+tagName
+ +string + +
+

TagName: Retention Tag Name to relate it to retention rule.

+
+

RetentionTag_ARM +

+

+(Appears on:AdhocBasedTaggingCriteria_ARM, TaggingCriteria_ARM) +

+
+

Retention tag

+
+ + + + + + + + + + + + + +
FieldDescription
+tagName
+ +string + +
+

TagName: Retention Tag Name to relate it to retention rule.

+
+

RetentionTag_STATUS +

+

+(Appears on:AdhocBasedTaggingCriteria_STATUS, TaggingCriteria_STATUS) +

+
+

Retention tag

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+eTag
+ +string + +
+

ETag: Retention Tag version.

+
+id
+ +string + +
+

Id: Retention Tag version.

+
+tagName
+ +string + +
+

TagName: Retention Tag Name to relate it to retention rule.

+
+

RetentionTag_STATUS_ARM +

+

+(Appears on:AdhocBasedTaggingCriteria_STATUS_ARM, TaggingCriteria_STATUS_ARM) +

+
+

Retention tag

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+eTag
+ +string + +
+

ETag: Retention Tag version.

+
+id
+ +string + +
+

Id: Retention Tag version.

+
+tagName
+ +string + +
+

TagName: Retention Tag Name to relate it to retention rule.

+
+

ScheduleBasedBackupCriteria +

+

+(Appears on:BackupCriteria) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+absoluteCriteria
+ + +[]ScheduleBasedBackupCriteria_AbsoluteCriteria + + +
+

AbsoluteCriteria: it contains absolute values like “AllBackup” / “FirstOfDay” / “FirstOfWeek” / “FirstOfMonth” +and should be part of AbsoluteMarker enum

+
+daysOfMonth
+ + +[]Day + + +
+

DaysOfMonth: This is day of the month from 1 to 28 other wise last of month

+
+daysOfTheWeek
+ + +[]ScheduleBasedBackupCriteria_DaysOfTheWeek + + +
+

DaysOfTheWeek: It should be Sunday/Monday/T…./Saturday

+
+monthsOfYear
+ + +[]ScheduleBasedBackupCriteria_MonthsOfYear + + +
+

MonthsOfYear: It should be January/February/……/December

+
+objectType
+ + +ScheduleBasedBackupCriteria_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+scheduleTimes
+ +[]string + +
+

ScheduleTimes: List of schedule times for backup

+
+weeksOfTheMonth
+ + +[]ScheduleBasedBackupCriteria_WeeksOfTheMonth + + +
+

WeeksOfTheMonth: It should be First/Second/Third/Fourth/Last

+
+

ScheduleBasedBackupCriteria_ARM +

+

+(Appears on:BackupCriteria_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+absoluteCriteria
+ + +[]ScheduleBasedBackupCriteria_AbsoluteCriteria + + +
+

AbsoluteCriteria: it contains absolute values like “AllBackup” / “FirstOfDay” / “FirstOfWeek” / “FirstOfMonth” +and should be part of AbsoluteMarker enum

+
+daysOfMonth
+ + +[]Day_ARM + + +
+

DaysOfMonth: This is day of the month from 1 to 28 other wise last of month

+
+daysOfTheWeek
+ + +[]ScheduleBasedBackupCriteria_DaysOfTheWeek + + +
+

DaysOfTheWeek: It should be Sunday/Monday/T…./Saturday

+
+monthsOfYear
+ + +[]ScheduleBasedBackupCriteria_MonthsOfYear + + +
+

MonthsOfYear: It should be January/February/……/December

+
+objectType
+ + +ScheduleBasedBackupCriteria_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+scheduleTimes
+ +[]string + +
+

ScheduleTimes: List of schedule times for backup

+
+weeksOfTheMonth
+ + +[]ScheduleBasedBackupCriteria_WeeksOfTheMonth + + +
+

WeeksOfTheMonth: It should be First/Second/Third/Fourth/Last

+
+

ScheduleBasedBackupCriteria_AbsoluteCriteria +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria, ScheduleBasedBackupCriteria_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"AllBackup"

"FirstOfDay"

"FirstOfMonth"

"FirstOfWeek"

"FirstOfYear"

+

ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS, ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"AllBackup"

"FirstOfDay"

"FirstOfMonth"

"FirstOfWeek"

"FirstOfYear"

+

ScheduleBasedBackupCriteria_DaysOfTheWeek +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria, ScheduleBasedBackupCriteria_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"Friday"

"Monday"

"Saturday"

"Sunday"

"Thursday"

"Tuesday"

"Wednesday"

+

ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS, ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"Friday"

"Monday"

"Saturday"

"Sunday"

"Thursday"

"Tuesday"

"Wednesday"

+

ScheduleBasedBackupCriteria_MonthsOfYear +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria, ScheduleBasedBackupCriteria_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"April"

"August"

"December"

"February"

"January"

"July"

"June"

"March"

"May"

"November"

"October"

"September"

+

ScheduleBasedBackupCriteria_MonthsOfYear_STATUS +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS, ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription

"April"

"August"

"December"

"February"

"January"

"July"

"June"

"March"

"May"

"November"

"October"

"September"

+

ScheduleBasedBackupCriteria_ObjectType +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria, ScheduleBasedBackupCriteria_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ScheduleBasedBackupCriteria"

+

ScheduleBasedBackupCriteria_ObjectType_STATUS +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS, ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ScheduleBasedBackupCriteria"

+

ScheduleBasedBackupCriteria_STATUS +

+

+(Appears on:BackupCriteria_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+absoluteCriteria
+ + +[]ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS + + +
+

AbsoluteCriteria: it contains absolute values like “AllBackup” / “FirstOfDay” / “FirstOfWeek” / “FirstOfMonth” +and should be part of AbsoluteMarker enum

+
+daysOfMonth
+ + +[]Day_STATUS + + +
+

DaysOfMonth: This is day of the month from 1 to 28 other wise last of month

+
+daysOfTheWeek
+ + +[]ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS + + +
+

DaysOfTheWeek: It should be Sunday/Monday/T…./Saturday

+
+monthsOfYear
+ + +[]ScheduleBasedBackupCriteria_MonthsOfYear_STATUS + + +
+

MonthsOfYear: It should be January/February/……/December

+
+objectType
+ + +ScheduleBasedBackupCriteria_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+scheduleTimes
+ +[]string + +
+

ScheduleTimes: List of schedule times for backup

+
+weeksOfTheMonth
+ + +[]ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS + + +
+

WeeksOfTheMonth: It should be First/Second/Third/Fourth/Last

+
+

ScheduleBasedBackupCriteria_STATUS_ARM +

+

+(Appears on:BackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+absoluteCriteria
+ + +[]ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS + + +
+

AbsoluteCriteria: it contains absolute values like “AllBackup” / “FirstOfDay” / “FirstOfWeek” / “FirstOfMonth” +and should be part of AbsoluteMarker enum

+
+daysOfMonth
+ + +[]Day_STATUS_ARM + + +
+

DaysOfMonth: This is day of the month from 1 to 28 other wise last of month

+
+daysOfTheWeek
+ + +[]ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS + + +
+

DaysOfTheWeek: It should be Sunday/Monday/T…./Saturday

+
+monthsOfYear
+ + +[]ScheduleBasedBackupCriteria_MonthsOfYear_STATUS + + +
+

MonthsOfYear: It should be January/February/……/December

+
+objectType
+ + +ScheduleBasedBackupCriteria_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+scheduleTimes
+ +[]string + +
+

ScheduleTimes: List of schedule times for backup

+
+weeksOfTheMonth
+ + +[]ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS + + +
+

WeeksOfTheMonth: It should be First/Second/Third/Fourth/Last

+
+

ScheduleBasedBackupCriteria_WeeksOfTheMonth +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria, ScheduleBasedBackupCriteria_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"First"

"Fourth"

"Last"

"Second"

"Third"

+

ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS +(string alias)

+

+(Appears on:ScheduleBasedBackupCriteria_STATUS, ScheduleBasedBackupCriteria_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"First"

"Fourth"

"Last"

"Second"

"Third"

+

ScheduleBasedTriggerContext +

+

+(Appears on:TriggerContext) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ScheduleBasedTriggerContext_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+schedule
+ + +BackupSchedule + + +
+

Schedule: Schedule for this backup

+
+taggingCriteria
+ + +[]TaggingCriteria + + +
+

TaggingCriteria: List of tags that can be applicable for given schedule.

+
+

ScheduleBasedTriggerContext_ARM +

+

+(Appears on:TriggerContext_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ScheduleBasedTriggerContext_ObjectType + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+schedule
+ + +BackupSchedule_ARM + + +
+

Schedule: Schedule for this backup

+
+taggingCriteria
+ + +[]TaggingCriteria_ARM + + +
+

TaggingCriteria: List of tags that can be applicable for given schedule.

+
+

ScheduleBasedTriggerContext_ObjectType +(string alias)

+

+(Appears on:ScheduleBasedTriggerContext, ScheduleBasedTriggerContext_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ScheduleBasedTriggerContext"

+

ScheduleBasedTriggerContext_ObjectType_STATUS +(string alias)

+

+(Appears on:ScheduleBasedTriggerContext_STATUS, ScheduleBasedTriggerContext_STATUS_ARM) +

+
+
+ + + + + + + + + + +
ValueDescription

"ScheduleBasedTriggerContext"

+

ScheduleBasedTriggerContext_STATUS +

+

+(Appears on:TriggerContext_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ScheduleBasedTriggerContext_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+schedule
+ + +BackupSchedule_STATUS + + +
+

Schedule: Schedule for this backup

+
+taggingCriteria
+ + +[]TaggingCriteria_STATUS + + +
+

TaggingCriteria: List of tags that can be applicable for given schedule.

+
+

ScheduleBasedTriggerContext_STATUS_ARM +

+

+(Appears on:TriggerContext_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+objectType
+ + +ScheduleBasedTriggerContext_ObjectType_STATUS + + +
+

ObjectType: Type of the specific object - used for deserializing

+
+schedule
+ + +BackupSchedule_STATUS_ARM + + +
+

Schedule: Schedule for this backup

+
+taggingCriteria
+ + +[]TaggingCriteria_STATUS_ARM + + +
+

TaggingCriteria: List of tags that can be applicable for given schedule.

+
+

SecuritySettings +

+

+(Appears on:BackupVaultSpec) +

+
+

Class containing security settings of vault

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+immutabilitySettings
+ + +ImmutabilitySettings + + +
+

ImmutabilitySettings: Immutability Settings at vault level

+
+softDeleteSettings
+ + +SoftDeleteSettings + + +
+

SoftDeleteSettings: Soft delete related settings

+
+

SecuritySettings_ARM +

+

+(Appears on:BackupVaultSpec_ARM) +

+
+

Class containing security settings of vault

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+immutabilitySettings
+ + +ImmutabilitySettings_ARM + + +
+

ImmutabilitySettings: Immutability Settings at vault level

+
+softDeleteSettings
+ + +SoftDeleteSettings_ARM + + +
+

SoftDeleteSettings: Soft delete related settings

+
+

SecuritySettings_STATUS +

+

+(Appears on:BackupVault_STATUS) +

+
+

Class containing security settings of vault

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+immutabilitySettings
+ + +ImmutabilitySettings_STATUS + + +
+

ImmutabilitySettings: Immutability Settings at vault level

+
+softDeleteSettings
+ + +SoftDeleteSettings_STATUS + + +
+

SoftDeleteSettings: Soft delete related settings

+
+

SecuritySettings_STATUS_ARM +

+

+(Appears on:BackupVault_STATUS_ARM) +

+
+

Class containing security settings of vault

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+immutabilitySettings
+ + +ImmutabilitySettings_STATUS_ARM + + +
+

ImmutabilitySettings: Immutability Settings at vault level

+
+softDeleteSettings
+ + +SoftDeleteSettings_STATUS_ARM + + +
+

SoftDeleteSettings: Soft delete related settings

+
+

SoftDeleteSettings +

+

+(Appears on:SecuritySettings) +

+
+

Soft delete related settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+retentionDurationInDays
+ +float64 + +
+

RetentionDurationInDays: Soft delete retention duration

+
+state
+ + +SoftDeleteSettings_State + + +
+

State: State of soft delete

+
+

SoftDeleteSettings_ARM +

+

+(Appears on:SecuritySettings_ARM) +

+
+

Soft delete related settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+retentionDurationInDays
+ +float64 + +
+

RetentionDurationInDays: Soft delete retention duration

+
+state
+ + +SoftDeleteSettings_State + + +
+

State: State of soft delete

+
+

SoftDeleteSettings_STATUS +

+

+(Appears on:SecuritySettings_STATUS) +

+
+

Soft delete related settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+retentionDurationInDays
+ +float64 + +
+

RetentionDurationInDays: Soft delete retention duration

+
+state
+ + +SoftDeleteSettings_State_STATUS + + +
+

State: State of soft delete

+
+

SoftDeleteSettings_STATUS_ARM +

+

+(Appears on:SecuritySettings_STATUS_ARM) +

+
+

Soft delete related settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+retentionDurationInDays
+ +float64 + +
+

RetentionDurationInDays: Soft delete retention duration

+
+state
+ + +SoftDeleteSettings_State_STATUS + + +
+

State: State of soft delete

+
+

SoftDeleteSettings_State +(string alias)

+

+(Appears on:SoftDeleteSettings, SoftDeleteSettings_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"AlwaysOn"

"Off"

"On"

+

SoftDeleteSettings_State_STATUS +(string alias)

+

+(Appears on:SoftDeleteSettings_STATUS, SoftDeleteSettings_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"AlwaysOn"

"Off"

"On"

+

SourceLifeCycle +

+

+(Appears on:AzureRetentionRule) +

+
+

Source LifeCycle

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+deleteAfter
+ + +DeleteOption + + +
+
+sourceDataStore
+ + +DataStoreInfoBase + + +
+

SourceDataStore: DataStoreInfo base

+
+targetDataStoreCopySettings
+ + +[]TargetCopySetting + + +
+
+

SourceLifeCycle_ARM +

+

+(Appears on:AzureRetentionRule_ARM) +

+
+

Source LifeCycle

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+deleteAfter
+ + +DeleteOption_ARM + + +
+
+sourceDataStore
+ + +DataStoreInfoBase_ARM + + +
+

SourceDataStore: DataStoreInfo base

+
+targetDataStoreCopySettings
+ + +[]TargetCopySetting_ARM + + +
+
+

SourceLifeCycle_STATUS +

+

+(Appears on:AzureRetentionRule_STATUS) +

+
+

Source LifeCycle

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+deleteAfter
+ + +DeleteOption_STATUS + + +
+
+sourceDataStore
+ + +DataStoreInfoBase_STATUS + + +
+

SourceDataStore: DataStoreInfo base

+
+targetDataStoreCopySettings
+ + +[]TargetCopySetting_STATUS + + +
+
+

SourceLifeCycle_STATUS_ARM +

+

+(Appears on:AzureRetentionRule_STATUS_ARM) +

+
+

Source LifeCycle

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+deleteAfter
+ + +DeleteOption_STATUS_ARM + + +
+
+sourceDataStore
+ + +DataStoreInfoBase_STATUS_ARM + + +
+

SourceDataStore: DataStoreInfo base

+
+targetDataStoreCopySettings
+ + +[]TargetCopySetting_STATUS_ARM + + +
+
+

StorageSetting +

+

+(Appears on:BackupVaultSpec) +

+
+

Storage setting

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+datastoreType
+ + +StorageSetting_DatastoreType + + +
+

DatastoreType: Gets or sets the type of the datastore.

+
+type
+ + +StorageSetting_Type + + +
+

Type: Gets or sets the type.

+
+

StorageSetting_ARM +

+

+(Appears on:BackupVaultSpec_ARM) +

+
+

Storage setting

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+datastoreType
+ + +StorageSetting_DatastoreType + + +
+

DatastoreType: Gets or sets the type of the datastore.

+
+type
+ + +StorageSetting_Type + + +
+

Type: Gets or sets the type.

+
+

StorageSetting_DatastoreType +(string alias)

+

+(Appears on:StorageSetting, StorageSetting_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"ArchiveStore"

"OperationalStore"

"VaultStore"

+

StorageSetting_DatastoreType_STATUS +(string alias)

+

+(Appears on:StorageSetting_STATUS, StorageSetting_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"ArchiveStore"

"OperationalStore"

"VaultStore"

+

StorageSetting_STATUS +

+

+(Appears on:BackupVault_STATUS) +

+
+

Storage setting

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+datastoreType
+ + +StorageSetting_DatastoreType_STATUS + + +
+

DatastoreType: Gets or sets the type of the datastore.

+
+type
+ + +StorageSetting_Type_STATUS + + +
+

Type: Gets or sets the type.

+
+

StorageSetting_STATUS_ARM +

+

+(Appears on:BackupVault_STATUS_ARM) +

+
+

Storage setting

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+datastoreType
+ + +StorageSetting_DatastoreType_STATUS + + +
+

DatastoreType: Gets or sets the type of the datastore.

+
+type
+ + +StorageSetting_Type_STATUS + + +
+

Type: Gets or sets the type.

+
+

StorageSetting_Type +(string alias)

+

+(Appears on:StorageSetting, StorageSetting_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"GeoRedundant"

"LocallyRedundant"

"ZoneRedundant"

+

StorageSetting_Type_STATUS +(string alias)

+

+(Appears on:StorageSetting_STATUS, StorageSetting_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"GeoRedundant"

"LocallyRedundant"

"ZoneRedundant"

+

SystemData_CreatedByType_STATUS +(string alias)

+

+(Appears on:SystemData_STATUS, SystemData_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Application"

"Key"

"ManagedIdentity"

"User"

+

SystemData_LastModifiedByType_STATUS +(string alias)

+

+(Appears on:SystemData_STATUS, SystemData_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Application"

"Key"

"ManagedIdentity"

"User"

+

SystemData_STATUS +

+

+(Appears on:BackupVaultResource_STATUS, BackupVaults_BackupPolicy_STATUS) +

+
+

Metadata pertaining to creation and last modification of the resource.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+createdAt
+ +string + +
+

CreatedAt: The timestamp of resource creation (UTC).

+
+createdBy
+ +string + +
+

CreatedBy: The identity that created the resource.

+
+createdByType
+ + +SystemData_CreatedByType_STATUS + + +
+

CreatedByType: The type of identity that created the resource.

+
+lastModifiedAt
+ +string + +
+

LastModifiedAt: The timestamp of resource last modification (UTC)

+
+lastModifiedBy
+ +string + +
+

LastModifiedBy: The identity that last modified the resource.

+
+lastModifiedByType
+ + +SystemData_LastModifiedByType_STATUS + + +
+

LastModifiedByType: The type of identity that last modified the resource.

+
+

SystemData_STATUS_ARM +

+

+(Appears on:BackupVaultResource_STATUS_ARM, BackupVaults_BackupPolicy_STATUS_ARM) +

+
+

Metadata pertaining to creation and last modification of the resource.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+createdAt
+ +string + +
+

CreatedAt: The timestamp of resource creation (UTC).

+
+createdBy
+ +string + +
+

CreatedBy: The identity that created the resource.

+
+createdByType
+ + +SystemData_CreatedByType_STATUS + + +
+

CreatedByType: The type of identity that created the resource.

+
+lastModifiedAt
+ +string + +
+

LastModifiedAt: The timestamp of resource last modification (UTC)

+
+lastModifiedBy
+ +string + +
+

LastModifiedBy: The identity that last modified the resource.

+
+lastModifiedByType
+ + +SystemData_LastModifiedByType_STATUS + + +
+

LastModifiedByType: The type of identity that last modified the resource.

+
+

TaggingCriteria +

+

+(Appears on:ScheduleBasedTriggerContext) +

+
+

Tagging criteria

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+criteria
+ + +[]BackupCriteria + + +
+

Criteria: Criteria which decides whether the tag can be applied to a triggered backup.

+
+isDefault
+ +bool + +
+

IsDefault: Specifies if tag is default.

+
+tagInfo
+ + +RetentionTag + + +
+

TagInfo: Retention tag information

+
+taggingPriority
+ +int + +
+

TaggingPriority: Retention Tag priority.

+
+

TaggingCriteria_ARM +

+

+(Appears on:ScheduleBasedTriggerContext_ARM) +

+
+

Tagging criteria

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+criteria
+ + +[]BackupCriteria_ARM + + +
+

Criteria: Criteria which decides whether the tag can be applied to a triggered backup.

+
+isDefault
+ +bool + +
+

IsDefault: Specifies if tag is default.

+
+tagInfo
+ + +RetentionTag_ARM + + +
+

TagInfo: Retention tag information

+
+taggingPriority
+ +int + +
+

TaggingPriority: Retention Tag priority.

+
+

TaggingCriteria_STATUS +

+

+(Appears on:ScheduleBasedTriggerContext_STATUS) +

+
+

Tagging criteria

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+criteria
+ + +[]BackupCriteria_STATUS + + +
+

Criteria: Criteria which decides whether the tag can be applied to a triggered backup.

+
+isDefault
+ +bool + +
+

IsDefault: Specifies if tag is default.

+
+tagInfo
+ + +RetentionTag_STATUS + + +
+

TagInfo: Retention tag information

+
+taggingPriority
+ +int + +
+

TaggingPriority: Retention Tag priority.

+
+

TaggingCriteria_STATUS_ARM +

+

+(Appears on:ScheduleBasedTriggerContext_STATUS_ARM) +

+
+

Tagging criteria

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+criteria
+ + +[]BackupCriteria_STATUS_ARM + + +
+

Criteria: Criteria which decides whether the tag can be applied to a triggered backup.

+
+isDefault
+ +bool + +
+

IsDefault: Specifies if tag is default.

+
+tagInfo
+ + +RetentionTag_STATUS_ARM + + +
+

TagInfo: Retention tag information

+
+taggingPriority
+ +int + +
+

TaggingPriority: Retention Tag priority.

+
+

TargetCopySetting +

+

+(Appears on:SourceLifeCycle) +

+
+

Target copy settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+copyAfter
+ + +CopyOption + + +
+

CopyAfter: It can be CustomCopyOption or ImmediateCopyOption.

+
+dataStore
+ + +DataStoreInfoBase + + +
+

DataStore: Info of target datastore

+
+

TargetCopySetting_ARM +

+

+(Appears on:SourceLifeCycle_ARM) +

+
+

Target copy settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+copyAfter
+ + +CopyOption_ARM + + +
+

CopyAfter: It can be CustomCopyOption or ImmediateCopyOption.

+
+dataStore
+ + +DataStoreInfoBase_ARM + + +
+

DataStore: Info of target datastore

+
+

TargetCopySetting_STATUS +

+

+(Appears on:SourceLifeCycle_STATUS) +

+
+

Target copy settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+copyAfter
+ + +CopyOption_STATUS + + +
+

CopyAfter: It can be CustomCopyOption or ImmediateCopyOption.

+
+dataStore
+ + +DataStoreInfoBase_STATUS + + +
+

DataStore: Info of target datastore

+
+

TargetCopySetting_STATUS_ARM +

+

+(Appears on:SourceLifeCycle_STATUS_ARM) +

+
+

Target copy settings

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+copyAfter
+ + +CopyOption_STATUS_ARM + + +
+

CopyAfter: It can be CustomCopyOption or ImmediateCopyOption.

+
+dataStore
+ + +DataStoreInfoBase_STATUS_ARM + + +
+

DataStore: Info of target datastore

+
+

TriggerContext +

+

+(Appears on:AzureBackupRule) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+adhocBasedTriggerContext
+ + +AdhocBasedTriggerContext + + +
+

Adhoc: Mutually exclusive with all other properties

+
+scheduleBasedTriggerContext
+ + +ScheduleBasedTriggerContext + + +
+

Schedule: Mutually exclusive with all other properties

+
+

TriggerContext_ARM +

+

+(Appears on:AzureBackupRule_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+adhocBasedTriggerContext
+ + +AdhocBasedTriggerContext_ARM + + +
+

Adhoc: Mutually exclusive with all other properties

+
+scheduleBasedTriggerContext
+ + +ScheduleBasedTriggerContext_ARM + + +
+

Schedule: Mutually exclusive with all other properties

+
+

TriggerContext_STATUS +

+

+(Appears on:AzureBackupRule_STATUS) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+adhocBasedTriggerContext
+ + +AdhocBasedTriggerContext_STATUS + + +
+

Adhoc: Mutually exclusive with all other properties

+
+scheduleBasedTriggerContext
+ + +ScheduleBasedTriggerContext_STATUS + + +
+

Schedule: Mutually exclusive with all other properties

+
+

TriggerContext_STATUS_ARM +

+

+(Appears on:AzureBackupRule_STATUS_ARM) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+adhocBasedTriggerContext
+ + +AdhocBasedTriggerContext_STATUS_ARM + + +
+

Adhoc: Mutually exclusive with all other properties

+
+scheduleBasedTriggerContext
+ + +ScheduleBasedTriggerContext_STATUS_ARM + + +
+

Schedule: Mutually exclusive with all other properties

+
+
diff --git a/docs/hugo/content/reference/keyvault/v1api20210401preview.md b/docs/hugo/content/reference/keyvault/v1api20210401preview.md index 07cbae6b7c..f4570f356f 100644 --- a/docs/hugo/content/reference/keyvault/v1api20210401preview.md +++ b/docs/hugo/content/reference/keyvault/v1api20210401preview.md @@ -2631,6 +2631,20 @@ string +tenantIdFromConfig
+ + +genruntime.ConfigMapReference + + + + +

TenantIdFromConfig: The Azure Active Directory tenant ID that should be used for authenticating requests to the key +vault.

+ + + + vaultUri
string diff --git a/docs/hugo/content/reference/keyvault/v1beta20210401preview.md b/docs/hugo/content/reference/keyvault/v1beta20210401preview.md index 513b129e15..48c4716bad 100644 --- a/docs/hugo/content/reference/keyvault/v1beta20210401preview.md +++ b/docs/hugo/content/reference/keyvault/v1beta20210401preview.md @@ -2505,6 +2505,18 @@ string +tenantIdFromConfig
+ + +genruntime.ConfigMapReference + + + + + + + + vaultUri
string diff --git a/docs/hugo/content/reference/managedidentity/v1api20220131preview.md b/docs/hugo/content/reference/managedidentity/v1api20220131preview.md index b1ea13037e..167524d5a8 100644 --- a/docs/hugo/content/reference/managedidentity/v1api20220131preview.md +++ b/docs/hugo/content/reference/managedidentity/v1api20220131preview.md @@ -100,6 +100,19 @@ string +issuerFromConfig
+ + +genruntime.ConfigMapReference + + + + +

IssuerFromConfig: The URL of the issuer to be trusted.

+ + + + owner
@@ -124,6 +137,19 @@ string

Subject: The identifier of the external identity.

+ + +subjectFromConfig
+ +
+genruntime.ConfigMapReference + + + + +

SubjectFromConfig: The identifier of the external identity.

+ + @@ -452,6 +478,19 @@ string +issuerFromConfig
+ + +genruntime.ConfigMapReference + + + + +

IssuerFromConfig: The URL of the issuer to be trusted.

+ + + + owner
@@ -476,6 +515,19 @@ string

Subject: The identifier of the external identity.

+ + +subjectFromConfig
+ +
+genruntime.ConfigMapReference + + + + +

SubjectFromConfig: The identifier of the external identity.

+ +

UserAssignedIdentities_FederatedIdentityCredential_Spec_ARM diff --git a/docs/hugo/content/reference/managedidentity/v1beta20220131preview.md b/docs/hugo/content/reference/managedidentity/v1beta20220131preview.md index 124faf0f13..ee9ad71653 100644 --- a/docs/hugo/content/reference/managedidentity/v1beta20220131preview.md +++ b/docs/hugo/content/reference/managedidentity/v1beta20220131preview.md @@ -97,6 +97,18 @@ string +issuerFromConfig
+ + +genruntime.ConfigMapReference + + + + + + + + owner
@@ -120,6 +132,18 @@ string + + +subjectFromConfig
+ +
+genruntime.ConfigMapReference + + + + + + @@ -430,6 +454,18 @@ string +issuerFromConfig
+ + +genruntime.ConfigMapReference + + + + + + + + owner
@@ -453,6 +489,18 @@ string + + +subjectFromConfig
+ +
+genruntime.ConfigMapReference + + + + + +

UserAssignedIdentities_FederatedIdentityCredential_Spec_ARM diff --git a/docs/hugo/content/tools/asoctl.md b/docs/hugo/content/tools/asoctl.md index 990b896d29..5c78661483 100644 --- a/docs/hugo/content/tools/asoctl.md +++ b/docs/hugo/content/tools/asoctl.md @@ -28,45 +28,66 @@ Available Commands: {{< tabpane text=true left=true >}} {{% tab header="**OS**:" disabled=true /%}} -{{% tab header="Linux" %}} +{{% tab header="Linux (incl WSL)" %}} -AMD64: +Download for AMD64: -`curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-linux-amd64 -o asoctl` +``` bash +$ curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-linux-amd64.gz -o asoctl.gz +$ gunzip asoctl.gz +``` -ARM64: +Download for ARM64: -`curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-linux-arm64 -o asoctl` +``` bash +$ curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-linux-arm64.gz -o asoctl.gz +$ gunzip asoctl.gz +``` Install: -`sudo install -o root -g root -m 0755 asoctl /usr/local/bin/asoctl` +``` bash +$ sudo install -o root -g root -m 0755 asoctl /usr/local/bin/asoctl` +``` {{% /tab %}} {{% tab header="macOS" %}} -AMD64: +Download for AMD64: -`curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-darwin-amd64 -o asoctl` +``` bash +$ curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-darwin-amd64.gz -o asoctl.gz +$ gunzip asoctl.gz +``` -ARM64: +Download for ARM64: -`curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-darwin-arm64 -o asoctl` +``` bash +$ curl -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-darwin-arm64.gz -o asoctl.gz +$ gunzip asoctl.gz +``` Make the binary executable: -`chmod +x ./asoctl` +``` bash +$ chmod +x ./asoctl +``` Move the binary to your PATH: -`sudo mv ./asoctl /usr/local/bin/asoctl` +``` bash +$ sudo mv ./asoctl /usr/local/bin/asoctl +``` {{% /tab %}} {{% tab header="Windows" %}} -Download the latest release to your current directory: +Using a PowerShell command prompt, download the latest release to your current directory: -`curl.exe -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-windows-amd64.exe -o asoctl.exe` +``` Powershell +$ curl.exe -L https://github.com/Azure/azure-service-operator/releases/latest/download/asoctl-windows-amd64.zip -o asoctl.zip +$ Expand-Archive asoctl.zip . -Force +``` Append that directory to your `PATH` if desired. diff --git a/v2/README.md b/v2/README.md index 15dcb3e7dc..2dd4bc5944 100644 --- a/v2/README.md +++ b/v2/README.md @@ -82,14 +82,14 @@ ASO supports more than 150 different Azure resources, with more added every rele AZURE_CLIENT_SECRET= # This is the password from the service principal we created. ``` -3. Install [the latest **v2+** Helm chart](https://github.com/Azure/azure-service-operator/tree/main/charts): +3. Install [the latest **v2+** Helm chart](https://github.com/Azure/azure-service-operator/tree/main/v2/charts): ``` helm repo add aso2 https://raw.githubusercontent.com/Azure/azure-service-operator/main/v2/charts ``` ``` - helm upgrade --install --devel aso2 aso2/azure-service-operator \ + helm upgrade --install aso2 aso2/azure-service-operator \ --create-namespace \ --namespace=azureserviceoperator-system \ --set azureSubscriptionID=$AZURE_SUBSCRIPTION_ID \ diff --git a/v2/api/containerservice/customizations/managed_cluster_extensions.go b/v2/api/containerservice/customizations/managed_cluster_extensions.go index 748b1fb05c..f99932fb98 100644 --- a/v2/api/containerservice/customizations/managed_cluster_extensions.go +++ b/v2/api/containerservice/customizations/managed_cluster_extensions.go @@ -18,10 +18,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" containerservice "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201storage" - "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/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/internal/set" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" @@ -142,7 +143,7 @@ func (ext *ManagedClusterExtension) PreReconcileCheck( _ context.Context, obj genruntime.MetaObject, _ genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PreReconcileCheckFunc, diff --git a/v2/api/containerservice/customizations/managed_clusters_agent_pool_extensions.go b/v2/api/containerservice/customizations/managed_clusters_agent_pool_extensions.go index 281e61afa3..5e9303a520 100644 --- a/v2/api/containerservice/customizations/managed_clusters_agent_pool_extensions.go +++ b/v2/api/containerservice/customizations/managed_clusters_agent_pool_extensions.go @@ -15,9 +15,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" containerservice "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/internal/set" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" ) @@ -38,7 +39,7 @@ func (ext *ManagedClustersAgentPoolExtension) PreReconcileCheck( _ context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PreReconcileCheckFunc, diff --git a/v2/api/containerservice/customizations/structure.txt b/v2/api/containerservice/customizations/structure.txt index df2ae99ba2..4172f2b81a 100644 --- a/v2/api/containerservice/customizations/structure.txt +++ b/v2/api/containerservice/customizations/structure.txt @@ -1,4 +1,5 @@ // Code generated by azure-service-operator-codegen. DO NOT EDIT. github.com/Azure/azure-service-operator/v2/api/containerservice/customizations ├── ManagedClusterExtension: Object (0 properties) -└── ManagedClustersAgentPoolExtension: Object (0 properties) +├── ManagedClustersAgentPoolExtension: Object (0 properties) +└── TrustedAccessRoleBindingExtension: Object (0 properties) diff --git a/v2/api/containerservice/customizations/trusted_access_role_binding_extension_types_gen.go b/v2/api/containerservice/customizations/trusted_access_role_binding_extension_types_gen.go new file mode 100644 index 0000000000..e6c71d9ef0 --- /dev/null +++ b/v2/api/containerservice/customizations/trusted_access_role_binding_extension_types_gen.go @@ -0,0 +1,20 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package customizations + +import ( + v1api20230202p "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202preview" + v1api20230202ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202previewstorage" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type TrustedAccessRoleBindingExtension struct { +} + +// GetExtendedResources Returns the KubernetesResource slice for Resource versions +func (extension *TrustedAccessRoleBindingExtension) GetExtendedResources() []genruntime.KubernetesResource { + return []genruntime.KubernetesResource{ + &v1api20230202p.TrustedAccessRoleBinding{}, + &v1api20230202ps.TrustedAccessRoleBinding{}} +} diff --git a/v2/api/containerservice/v1api20210501storage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20210501storage/managed_cluster_types_gen.go index 81ca40350d..0c700cbbb2 100644 --- a/v2/api/containerservice/v1api20210501storage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20210501storage/managed_cluster_types_gen.go @@ -5320,6 +5320,13 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_From_ManagedCluster // Clone the existing property bag propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + // ConfigMaps + if source.ConfigMaps != nil { + propertyBag.Add("ConfigMaps", *source.ConfigMaps) + } else { + propertyBag.Remove("ConfigMaps") + } + // Secrets if source.Secrets != nil { var secret ManagedClusterOperatorSecrets @@ -5357,6 +5364,19 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_To_ManagedClusterOp // Clone the existing property bag propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) + // ConfigMaps + if propertyBag.Contains("ConfigMaps") { + var configMap v1api20230201s.ManagedClusterOperatorConfigMaps + err := propertyBag.Pull("ConfigMaps", &configMap) + if err != nil { + return errors.Wrap(err, "pulling 'ConfigMaps' from propertyBag") + } + + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + // Secrets if operator.Secrets != nil { var secret v1api20230201s.ManagedClusterOperatorSecrets diff --git a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go index f7cf5619c2..d63bac258c 100644 --- a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go @@ -4,16 +4,21 @@ package v1api20230201 import ( + "context" "fmt" v1api20230201s "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" kerrors "k8s.io/apimachinery/pkg/util/errors" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) @@ -102,6 +107,25 @@ func (cluster *ManagedCluster) InitializeSpec(status genruntime.ConvertibleStatu return fmt.Errorf("expected Status of type ManagedCluster_STATUS but received %T instead", status) } +var _ genruntime.KubernetesExporter = &ManagedCluster{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (cluster *ManagedCluster) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(cluster.Namespace) + if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil { + if cluster.Status.OidcIssuerProfile != nil { + if cluster.Status.OidcIssuerProfile.IssuerURL != nil { + collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, *cluster.Status.OidcIssuerProfile.IssuerURL) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + var _ genruntime.KubernetesResource = &ManagedCluster{} // AzureName returns the Azure name of the resource @@ -225,7 +249,7 @@ func (cluster *ManagedCluster) ValidateUpdate(old runtime.Object) error { // createValidations validates the creation of the resource func (cluster *ManagedCluster) createValidations() []func() error { - return []func() error{cluster.validateResourceReferences, cluster.validateSecretDestinations} + return []func() error{cluster.validateResourceReferences, cluster.validateSecretDestinations, cluster.validateConfigMapDestinations} } // deleteValidations validates the deletion of the resource @@ -243,7 +267,24 @@ func (cluster *ManagedCluster) updateValidations() []func(old runtime.Object) er func(old runtime.Object) error { return cluster.validateSecretDestinations() }, + func(old runtime.Object) error { + return cluster.validateConfigMapDestinations() + }, + } +} + +// validateConfigMapDestinations validates there are no colliding genruntime.ConfigMapDestinations's +func (cluster *ManagedCluster) validateConfigMapDestinations() error { + if cluster.Spec.OperatorSpec == nil { + return nil + } + if cluster.Spec.OperatorSpec.ConfigMaps == nil { + return nil + } + toValidate := []*genruntime.ConfigMapDestination{ + cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, } + return genruntime.ValidateConfigMapDestinations(toValidate) } // validateResourceReferences validates all resource references @@ -10223,6 +10264,9 @@ func (profile *ManagedClusterOIDCIssuerProfile_STATUS) AssignProperties_To_Manag // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ManagedClusterOperatorSpec struct { + // ConfigMaps: configures where to place operator written ConfigMaps. + ConfigMaps *ManagedClusterOperatorConfigMaps `json:"configMaps,omitempty"` + // Secrets: configures where to place Azure generated secrets. Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` } @@ -10230,6 +10274,18 @@ type ManagedClusterOperatorSpec struct { // AssignProperties_From_ManagedClusterOperatorSpec populates our ManagedClusterOperatorSpec from the provided source ManagedClusterOperatorSpec func (operator *ManagedClusterOperatorSpec) AssignProperties_From_ManagedClusterOperatorSpec(source *v1api20230201s.ManagedClusterOperatorSpec) error { + // ConfigMaps + if source.ConfigMaps != nil { + var configMap ManagedClusterOperatorConfigMaps + err := configMap.AssignProperties_From_ManagedClusterOperatorConfigMaps(source.ConfigMaps) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + operator.ConfigMaps = &configMap + } else { + operator.ConfigMaps = nil + } + // Secrets if source.Secrets != nil { var secret ManagedClusterOperatorSecrets @@ -10251,6 +10307,18 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_To_ManagedClusterOp // Create a new property bag propertyBag := genruntime.NewPropertyBag() + // ConfigMaps + if operator.ConfigMaps != nil { + var configMap v1api20230201s.ManagedClusterOperatorConfigMaps + err := operator.ConfigMaps.AssignProperties_To_ManagedClusterOperatorConfigMaps(&configMap) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + // Secrets if operator.Secrets != nil { var secret v1api20230201s.ManagedClusterOperatorSecrets @@ -16572,6 +16640,51 @@ func (profile *ManagedClusterNATGatewayProfile_STATUS) AssignProperties_To_Manag return nil } +type ManagedClusterOperatorConfigMaps struct { + // OIDCIssuerProfile: indicates where the OIDCIssuerProfile config map should be placed. If omitted, no config map will be + // created. + OIDCIssuerProfile *genruntime.ConfigMapDestination `json:"oidcIssuerProfile,omitempty"` +} + +// AssignProperties_From_ManagedClusterOperatorConfigMaps populates our ManagedClusterOperatorConfigMaps from the provided source ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_From_ManagedClusterOperatorConfigMaps(source *v1api20230201s.ManagedClusterOperatorConfigMaps) error { + + // OIDCIssuerProfile + if source.OIDCIssuerProfile != nil { + oidcIssuerProfile := source.OIDCIssuerProfile.Copy() + maps.OIDCIssuerProfile = &oidcIssuerProfile + } else { + maps.OIDCIssuerProfile = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagedClusterOperatorConfigMaps populates the provided destination ManagedClusterOperatorConfigMaps from our ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_To_ManagedClusterOperatorConfigMaps(destination *v1api20230201s.ManagedClusterOperatorConfigMaps) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // OIDCIssuerProfile + if maps.OIDCIssuerProfile != nil { + oidcIssuerProfile := maps.OIDCIssuerProfile.Copy() + destination.OIDCIssuerProfile = &oidcIssuerProfile + } else { + destination.OIDCIssuerProfile = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + type ManagedClusterOperatorSecrets struct { // AdminCredentials: indicates where the AdminCredentials secret should be placed. If omitted, the secret will not be // retrieved from Azure. diff --git a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen_test.go b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen_test.go index 0d4957fab1..3443c18647 100644 --- a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen_test.go +++ b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen_test.go @@ -3340,6 +3340,7 @@ func ManagedClusterOperatorSpecGenerator() gopter.Gen { // AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(ManagedClusterOperatorConfigMapsGenerator()) gens["Secrets"] = gen.PtrOf(ManagedClusterOperatorSecretsGenerator()) } @@ -6984,6 +6985,103 @@ func AddRelatedPropertyGeneratorsForManagedClusterNATGatewayProfile_STATUS(gens gens["ManagedOutboundIPProfile"] = gen.PtrOf(ManagedClusterManagedOutboundIPProfile_STATUSGenerator()) } +func Test_ManagedClusterOperatorConfigMaps_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagedClusterOperatorConfigMaps to ManagedClusterOperatorConfigMaps via AssignProperties_To_ManagedClusterOperatorConfigMaps & AssignProperties_From_ManagedClusterOperatorConfigMaps returns original", + prop.ForAll(RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps tests if a specific instance of ManagedClusterOperatorConfigMaps can be assigned to v1api20230201storage and back losslessly +func RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230201s.ManagedClusterOperatorConfigMaps + err := copied.AssignProperties_To_ManagedClusterOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagedClusterOperatorConfigMaps + err = actual.AssignProperties_From_ManagedClusterOperatorConfigMaps(&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_ManagedClusterOperatorConfigMaps_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 ManagedClusterOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusterOperatorConfigMaps runs a test to see if a specific instance of ManagedClusterOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusterOperatorConfigMaps + 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 ManagedClusterOperatorConfigMaps instances for property testing - lazily instantiated by +// ManagedClusterOperatorConfigMapsGenerator() +var managedClusterOperatorConfigMapsGenerator gopter.Gen + +// ManagedClusterOperatorConfigMapsGenerator returns a generator of ManagedClusterOperatorConfigMaps instances for property testing. +func ManagedClusterOperatorConfigMapsGenerator() gopter.Gen { + if managedClusterOperatorConfigMapsGenerator != nil { + return managedClusterOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + managedClusterOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(ManagedClusterOperatorConfigMaps{}), generators) + + return managedClusterOperatorConfigMapsGenerator +} + func Test_ManagedClusterOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/containerservice/v1api20230201/structure.txt b/v2/api/containerservice/v1api20230201/structure.txt index fc20d1f0f0..e45ac7877c 100644 --- a/v2/api/containerservice/v1api20230201/structure.txt +++ b/v2/api/containerservice/v1api20230201/structure.txt @@ -288,7 +288,9 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201 │ │ ├── NodeResourceGroup: *string │ │ ├── OidcIssuerProfile: *Object (1 property) │ │ │ └── Enabled: *bool -│ │ ├── OperatorSpec: *Object (1 property) +│ │ ├── OperatorSpec: *Object (2 properties) +│ │ │ ├── ConfigMaps: *Object (1 property) +│ │ │ │ └── OIDCIssuerProfile: *genruntime.ConfigMapDestination │ │ │ └── Secrets: *Object (2 properties) │ │ │ ├── AdminCredentials: *genruntime.SecretDestination │ │ │ └── UserCredentials: *genruntime.SecretDestination diff --git a/v2/api/containerservice/v1api20230201/zz_generated.deepcopy.go b/v2/api/containerservice/v1api20230201/zz_generated.deepcopy.go index b5c5017a8c..ff59db4d43 100644 --- a/v2/api/containerservice/v1api20230201/zz_generated.deepcopy.go +++ b/v2/api/containerservice/v1api20230201/zz_generated.deepcopy.go @@ -4798,6 +4798,26 @@ func (in *ManagedClusterOIDCIssuerProfile_STATUS_ARM) DeepCopy() *ManagedCluster return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusterOperatorConfigMaps) DeepCopyInto(out *ManagedClusterOperatorConfigMaps) { + *out = *in + if in.OIDCIssuerProfile != nil { + in, out := &in.OIDCIssuerProfile, &out.OIDCIssuerProfile + *out = new(genruntime.ConfigMapDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterOperatorConfigMaps. +func (in *ManagedClusterOperatorConfigMaps) DeepCopy() *ManagedClusterOperatorConfigMaps { + if in == nil { + return nil + } + out := new(ManagedClusterOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSecrets) DeepCopyInto(out *ManagedClusterOperatorSecrets) { *out = *in @@ -4826,6 +4846,11 @@ func (in *ManagedClusterOperatorSecrets) DeepCopy() *ManagedClusterOperatorSecre // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSpec) DeepCopyInto(out *ManagedClusterOperatorSpec) { *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(ManagedClusterOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = new(ManagedClusterOperatorSecrets) diff --git a/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen.go index 2466e8b476..4ef3cfeea2 100644 --- a/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen.go @@ -4,11 +4,16 @@ package v1api20230201storage import ( + "context" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" ) // +kubebuilder:rbac:groups=containerservice.azure.com,resources=managedclusters,verbs=get;list;watch;create;update;patch;delete @@ -44,6 +49,25 @@ func (cluster *ManagedCluster) SetConditions(conditions conditions.Conditions) { cluster.Status.Conditions = conditions } +var _ genruntime.KubernetesExporter = &ManagedCluster{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (cluster *ManagedCluster) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(cluster.Namespace) + if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil { + if cluster.Status.OidcIssuerProfile != nil { + if cluster.Status.OidcIssuerProfile.IssuerURL != nil { + collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, *cluster.Status.OidcIssuerProfile.IssuerURL) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + var _ genruntime.KubernetesResource = &ManagedCluster{} // AzureName returns the Azure name of the resource @@ -621,8 +645,9 @@ type ManagedClusterOIDCIssuerProfile_STATUS struct { // Storage version of v1api20230201.ManagedClusterOperatorSpec // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ManagedClusterOperatorSpec struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` + ConfigMaps *ManagedClusterOperatorConfigMaps `json:"configMaps,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` } // Storage version of v1api20230201.ManagedClusterPodIdentityProfile @@ -970,6 +995,12 @@ type ManagedClusterNATGatewayProfile_STATUS struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +// Storage version of v1api20230201.ManagedClusterOperatorConfigMaps +type ManagedClusterOperatorConfigMaps struct { + OIDCIssuerProfile *genruntime.ConfigMapDestination `json:"oidcIssuerProfile,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + // Storage version of v1api20230201.ManagedClusterOperatorSecrets type ManagedClusterOperatorSecrets struct { AdminCredentials *genruntime.SecretDestination `json:"adminCredentials,omitempty"` diff --git a/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen_test.go b/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen_test.go index 63843c1f11..e910940211 100644 --- a/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen_test.go +++ b/v2/api/containerservice/v1api20230201storage/managed_cluster_types_gen_test.go @@ -2083,6 +2083,7 @@ func ManagedClusterOperatorSpecGenerator() gopter.Gen { // AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(ManagedClusterOperatorConfigMapsGenerator()) gens["Secrets"] = gen.PtrOf(ManagedClusterOperatorSecretsGenerator()) } @@ -4325,6 +4326,61 @@ func AddRelatedPropertyGeneratorsForManagedClusterNATGatewayProfile_STATUS(gens gens["ManagedOutboundIPProfile"] = gen.PtrOf(ManagedClusterManagedOutboundIPProfile_STATUSGenerator()) } +func Test_ManagedClusterOperatorConfigMaps_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 ManagedClusterOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusterOperatorConfigMaps runs a test to see if a specific instance of ManagedClusterOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusterOperatorConfigMaps + 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 ManagedClusterOperatorConfigMaps instances for property testing - lazily instantiated by +// ManagedClusterOperatorConfigMapsGenerator() +var managedClusterOperatorConfigMapsGenerator gopter.Gen + +// ManagedClusterOperatorConfigMapsGenerator returns a generator of ManagedClusterOperatorConfigMaps instances for property testing. +func ManagedClusterOperatorConfigMapsGenerator() gopter.Gen { + if managedClusterOperatorConfigMapsGenerator != nil { + return managedClusterOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + managedClusterOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(ManagedClusterOperatorConfigMaps{}), generators) + + return managedClusterOperatorConfigMapsGenerator +} + func Test_ManagedClusterOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/containerservice/v1api20230201storage/structure.txt b/v2/api/containerservice/v1api20230201storage/structure.txt index 92b591fce2..85cff243f2 100644 --- a/v2/api/containerservice/v1api20230201storage/structure.txt +++ b/v2/api/containerservice/v1api20230201storage/structure.txt @@ -241,7 +241,10 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201sto │ │ ├── OidcIssuerProfile: *Object (2 properties) │ │ │ ├── Enabled: *bool │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── OperatorSpec: *Object (2 properties) +│ │ ├── OperatorSpec: *Object (3 properties) +│ │ │ ├── ConfigMaps: *Object (2 properties) +│ │ │ │ ├── OIDCIssuerProfile: *genruntime.ConfigMapDestination +│ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Secrets: *Object (3 properties) │ │ │ ├── AdminCredentials: *genruntime.SecretDestination diff --git a/v2/api/containerservice/v1api20230201storage/zz_generated.deepcopy.go b/v2/api/containerservice/v1api20230201storage/zz_generated.deepcopy.go index 7ba601fd3e..49621a4943 100644 --- a/v2/api/containerservice/v1api20230201storage/zz_generated.deepcopy.go +++ b/v2/api/containerservice/v1api20230201storage/zz_generated.deepcopy.go @@ -2606,6 +2606,33 @@ func (in *ManagedClusterOIDCIssuerProfile_STATUS) DeepCopy() *ManagedClusterOIDC return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusterOperatorConfigMaps) DeepCopyInto(out *ManagedClusterOperatorConfigMaps) { + *out = *in + if in.OIDCIssuerProfile != nil { + in, out := &in.OIDCIssuerProfile, &out.OIDCIssuerProfile + *out = new(genruntime.ConfigMapDestination) + **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 ManagedClusterOperatorConfigMaps. +func (in *ManagedClusterOperatorConfigMaps) DeepCopy() *ManagedClusterOperatorConfigMaps { + if in == nil { + return nil + } + out := new(ManagedClusterOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSecrets) DeepCopyInto(out *ManagedClusterOperatorSecrets) { *out = *in @@ -2641,6 +2668,11 @@ func (in *ManagedClusterOperatorSecrets) DeepCopy() *ManagedClusterOperatorSecre // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSpec) DeepCopyInto(out *ManagedClusterOperatorSpec) { *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(ManagedClusterOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } if in.PropertyBag != nil { in, out := &in.PropertyBag, &out.PropertyBag *out = make(genruntime.PropertyBag, len(*in)) diff --git a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go index 58f7fbd475..fa843bf05e 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go @@ -4,16 +4,21 @@ package v1api20230202preview import ( + "context" "fmt" v1api20230202ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202previewstorage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" kerrors "k8s.io/apimachinery/pkg/util/errors" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/conversion" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) @@ -105,6 +110,25 @@ func (cluster *ManagedCluster) defaultAzureName() { // defaultImpl applies the code generated defaults to the ManagedCluster resource func (cluster *ManagedCluster) defaultImpl() { cluster.defaultAzureName() } +var _ genruntime.KubernetesExporter = &ManagedCluster{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (cluster *ManagedCluster) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(cluster.Namespace) + if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil { + if cluster.Status.OidcIssuerProfile != nil { + if cluster.Status.OidcIssuerProfile.IssuerURL != nil { + collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, *cluster.Status.OidcIssuerProfile.IssuerURL) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + var _ genruntime.KubernetesResource = &ManagedCluster{} // AzureName returns the Azure name of the resource @@ -228,7 +252,7 @@ func (cluster *ManagedCluster) ValidateUpdate(old runtime.Object) error { // createValidations validates the creation of the resource func (cluster *ManagedCluster) createValidations() []func() error { - return []func() error{cluster.validateResourceReferences, cluster.validateSecretDestinations} + return []func() error{cluster.validateResourceReferences, cluster.validateSecretDestinations, cluster.validateConfigMapDestinations} } // deleteValidations validates the deletion of the resource @@ -246,7 +270,24 @@ func (cluster *ManagedCluster) updateValidations() []func(old runtime.Object) er func(old runtime.Object) error { return cluster.validateSecretDestinations() }, + func(old runtime.Object) error { + return cluster.validateConfigMapDestinations() + }, + } +} + +// validateConfigMapDestinations validates there are no colliding genruntime.ConfigMapDestinations's +func (cluster *ManagedCluster) validateConfigMapDestinations() error { + if cluster.Spec.OperatorSpec == nil { + return nil + } + if cluster.Spec.OperatorSpec.ConfigMaps == nil { + return nil + } + toValidate := []*genruntime.ConfigMapDestination{ + cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, } + return genruntime.ValidateConfigMapDestinations(toValidate) } // validateResourceReferences validates all resource references @@ -11326,6 +11367,9 @@ func (profile *ManagedClusterOIDCIssuerProfile_STATUS) AssignProperties_To_Manag // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ManagedClusterOperatorSpec struct { + // ConfigMaps: configures where to place operator written ConfigMaps. + ConfigMaps *ManagedClusterOperatorConfigMaps `json:"configMaps,omitempty"` + // Secrets: configures where to place Azure generated secrets. Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` } @@ -11333,6 +11377,18 @@ type ManagedClusterOperatorSpec struct { // AssignProperties_From_ManagedClusterOperatorSpec populates our ManagedClusterOperatorSpec from the provided source ManagedClusterOperatorSpec func (operator *ManagedClusterOperatorSpec) AssignProperties_From_ManagedClusterOperatorSpec(source *v1api20230202ps.ManagedClusterOperatorSpec) error { + // ConfigMaps + if source.ConfigMaps != nil { + var configMap ManagedClusterOperatorConfigMaps + err := configMap.AssignProperties_From_ManagedClusterOperatorConfigMaps(source.ConfigMaps) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + operator.ConfigMaps = &configMap + } else { + operator.ConfigMaps = nil + } + // Secrets if source.Secrets != nil { var secret ManagedClusterOperatorSecrets @@ -11354,6 +11410,18 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_To_ManagedClusterOp // Create a new property bag propertyBag := genruntime.NewPropertyBag() + // ConfigMaps + if operator.ConfigMaps != nil { + var configMap v1api20230202ps.ManagedClusterOperatorConfigMaps + err := operator.ConfigMaps.AssignProperties_To_ManagedClusterOperatorConfigMaps(&configMap) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + // Secrets if operator.Secrets != nil { var secret v1api20230202ps.ManagedClusterOperatorSecrets @@ -18281,6 +18349,51 @@ const ( ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Unrestricted = ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS("Unrestricted") ) +type ManagedClusterOperatorConfigMaps struct { + // OIDCIssuerProfile: indicates where the OIDCIssuerProfile config map should be placed. If omitted, no config map will be + // created. + OIDCIssuerProfile *genruntime.ConfigMapDestination `json:"oidcIssuerProfile,omitempty"` +} + +// AssignProperties_From_ManagedClusterOperatorConfigMaps populates our ManagedClusterOperatorConfigMaps from the provided source ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_From_ManagedClusterOperatorConfigMaps(source *v1api20230202ps.ManagedClusterOperatorConfigMaps) error { + + // OIDCIssuerProfile + if source.OIDCIssuerProfile != nil { + oidcIssuerProfile := source.OIDCIssuerProfile.Copy() + maps.OIDCIssuerProfile = &oidcIssuerProfile + } else { + maps.OIDCIssuerProfile = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagedClusterOperatorConfigMaps populates the provided destination ManagedClusterOperatorConfigMaps from our ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_To_ManagedClusterOperatorConfigMaps(destination *v1api20230202ps.ManagedClusterOperatorConfigMaps) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // OIDCIssuerProfile + if maps.OIDCIssuerProfile != nil { + oidcIssuerProfile := maps.OIDCIssuerProfile.Copy() + destination.OIDCIssuerProfile = &oidcIssuerProfile + } else { + destination.OIDCIssuerProfile = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + type ManagedClusterOperatorSecrets struct { // AdminCredentials: indicates where the AdminCredentials secret should be placed. If omitted, the secret will not be // retrieved from Azure. diff --git a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen_test.go b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen_test.go index 9667ceff65..c926911e0d 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen_test.go +++ b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen_test.go @@ -4377,6 +4377,7 @@ func ManagedClusterOperatorSpecGenerator() gopter.Gen { // AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(ManagedClusterOperatorConfigMapsGenerator()) gens["Secrets"] = gen.PtrOf(ManagedClusterOperatorSecretsGenerator()) } @@ -8952,6 +8953,103 @@ func AddRelatedPropertyGeneratorsForManagedClusterNATGatewayProfile_STATUS(gens gens["ManagedOutboundIPProfile"] = gen.PtrOf(ManagedClusterManagedOutboundIPProfile_STATUSGenerator()) } +func Test_ManagedClusterOperatorConfigMaps_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagedClusterOperatorConfigMaps to ManagedClusterOperatorConfigMaps via AssignProperties_To_ManagedClusterOperatorConfigMaps & AssignProperties_From_ManagedClusterOperatorConfigMaps returns original", + prop.ForAll(RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps tests if a specific instance of ManagedClusterOperatorConfigMaps can be assigned to v1api20230202previewstorage and back losslessly +func RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230202ps.ManagedClusterOperatorConfigMaps + err := copied.AssignProperties_To_ManagedClusterOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagedClusterOperatorConfigMaps + err = actual.AssignProperties_From_ManagedClusterOperatorConfigMaps(&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_ManagedClusterOperatorConfigMaps_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 ManagedClusterOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusterOperatorConfigMaps runs a test to see if a specific instance of ManagedClusterOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusterOperatorConfigMaps + 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 ManagedClusterOperatorConfigMaps instances for property testing - lazily instantiated by +// ManagedClusterOperatorConfigMapsGenerator() +var managedClusterOperatorConfigMapsGenerator gopter.Gen + +// ManagedClusterOperatorConfigMapsGenerator returns a generator of ManagedClusterOperatorConfigMaps instances for property testing. +func ManagedClusterOperatorConfigMapsGenerator() gopter.Gen { + if managedClusterOperatorConfigMapsGenerator != nil { + return managedClusterOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + managedClusterOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(ManagedClusterOperatorConfigMaps{}), generators) + + return managedClusterOperatorConfigMapsGenerator +} + func Test_ManagedClusterOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen.go new file mode 100644 index 0000000000..63f99c841e --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen.go @@ -0,0 +1,38 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type ManagedClusters_TrustedAccessRoleBinding_Spec_ARM struct { + Name string `json:"name,omitempty"` + + // Properties: Properties for trusted access role binding + Properties *TrustedAccessRoleBindingProperties_ARM `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &ManagedClusters_TrustedAccessRoleBinding_Spec_ARM{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-02-02-preview" +func (binding ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) GetName() string { + return binding.Name +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) GetType() string { + return "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +} + +// Properties for trusted access role binding +type TrustedAccessRoleBindingProperties_ARM struct { + // Roles: A list of roles to bind, each item is a resource type qualified role name. For example: + // 'Microsoft.MachineLearningServices/workspaces/reader'. + Roles []string `json:"roles,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen_test.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen_test.go new file mode 100644 index 0000000000..19c2419092 --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_spec_arm_types_gen_test.go @@ -0,0 +1,155 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_ManagedClusters_TrustedAccessRoleBinding_Spec_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_Spec_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec_ARM, ManagedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec_ARM runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_Spec_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(subject ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_Spec_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 ManagedClusters_TrustedAccessRoleBinding_Spec_ARM instances for property testing - lazily instantiated +// by ManagedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator() +var managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_Spec_ARM instances for property testing. +// We first initialize managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(generators) + managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_Spec_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(generators) + AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(generators) + managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_Spec_ARM{}), generators) + + return managedClusters_TrustedAccessRoleBinding_Spec_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(gens map[string]gopter.Gen) { + gens["Name"] = gen.AlphaString() +} + +// AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(TrustedAccessRoleBindingProperties_ARMGenerator()) +} + +func Test_TrustedAccessRoleBindingProperties_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 TrustedAccessRoleBindingProperties_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTrustedAccessRoleBindingProperties_ARM, TrustedAccessRoleBindingProperties_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTrustedAccessRoleBindingProperties_ARM runs a test to see if a specific instance of TrustedAccessRoleBindingProperties_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTrustedAccessRoleBindingProperties_ARM(subject TrustedAccessRoleBindingProperties_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TrustedAccessRoleBindingProperties_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 TrustedAccessRoleBindingProperties_ARM instances for property testing - lazily instantiated by +// TrustedAccessRoleBindingProperties_ARMGenerator() +var trustedAccessRoleBindingProperties_ARMGenerator gopter.Gen + +// TrustedAccessRoleBindingProperties_ARMGenerator returns a generator of TrustedAccessRoleBindingProperties_ARM instances for property testing. +func TrustedAccessRoleBindingProperties_ARMGenerator() gopter.Gen { + if trustedAccessRoleBindingProperties_ARMGenerator != nil { + return trustedAccessRoleBindingProperties_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_ARM(generators) + trustedAccessRoleBindingProperties_ARMGenerator = gen.Struct(reflect.TypeOf(TrustedAccessRoleBindingProperties_ARM{}), generators) + + return trustedAccessRoleBindingProperties_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_ARM(gens map[string]gopter.Gen) { + gens["Roles"] = gen.SliceOf(gen.AlphaString()) + gens["SourceResourceId"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go new file mode 100644 index 0000000000..0811232633 --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go @@ -0,0 +1,45 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +type ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM struct { + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // Properties: Properties for trusted access role binding + Properties *TrustedAccessRoleBindingProperties_STATUS_ARM `json:"properties,omitempty"` + + // SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData_STATUS_ARM `json:"systemData,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// Properties for trusted access role binding +type TrustedAccessRoleBindingProperties_STATUS_ARM struct { + // ProvisioningState: The current provisioning state of trusted access role binding. + ProvisioningState *TrustedAccessRoleBindingProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // Roles: A list of roles to bind, each item is a resource type qualified role name. For example: + // 'Microsoft.MachineLearningServices/workspaces/reader'. + Roles []string `json:"roles,omitempty"` + + // SourceResourceId: The ARM resource ID of source resource that trusted access is configured for. + SourceResourceId *string `json:"sourceResourceId,omitempty"` +} + +type TrustedAccessRoleBindingProperties_ProvisioningState_STATUS string + +const ( + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Canceled = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Canceled") + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Deleting = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Deleting") + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Failed = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Failed") + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Succeeded = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Succeeded") + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Updating = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Updating") +) diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen_test.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen_test.go new file mode 100644 index 0000000000..2493aee0b6 --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen_test.go @@ -0,0 +1,164 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM, ManagedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(subject ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_STATUS_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 ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM instances for property testing - lazily instantiated +// by ManagedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator() +var managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM instances for property testing. +// We first initialize managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(generators) + managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(generators) + AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(generators) + managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM{}), generators) + + return managedClusters_TrustedAccessRoleBinding_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS_ARM(gens map[string]gopter.Gen) { + gens["Properties"] = gen.PtrOf(TrustedAccessRoleBindingProperties_STATUS_ARMGenerator()) + gens["SystemData"] = gen.PtrOf(SystemData_STATUS_ARMGenerator()) +} + +func Test_TrustedAccessRoleBindingProperties_STATUS_ARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TrustedAccessRoleBindingProperties_STATUS_ARM via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTrustedAccessRoleBindingProperties_STATUS_ARM, TrustedAccessRoleBindingProperties_STATUS_ARMGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTrustedAccessRoleBindingProperties_STATUS_ARM runs a test to see if a specific instance of TrustedAccessRoleBindingProperties_STATUS_ARM round trips to JSON and back losslessly +func RunJSONSerializationTestForTrustedAccessRoleBindingProperties_STATUS_ARM(subject TrustedAccessRoleBindingProperties_STATUS_ARM) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TrustedAccessRoleBindingProperties_STATUS_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 TrustedAccessRoleBindingProperties_STATUS_ARM instances for property testing - lazily instantiated by +// TrustedAccessRoleBindingProperties_STATUS_ARMGenerator() +var trustedAccessRoleBindingProperties_STATUS_ARMGenerator gopter.Gen + +// TrustedAccessRoleBindingProperties_STATUS_ARMGenerator returns a generator of TrustedAccessRoleBindingProperties_STATUS_ARM instances for property testing. +func TrustedAccessRoleBindingProperties_STATUS_ARMGenerator() gopter.Gen { + if trustedAccessRoleBindingProperties_STATUS_ARMGenerator != nil { + return trustedAccessRoleBindingProperties_STATUS_ARMGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_STATUS_ARM(generators) + trustedAccessRoleBindingProperties_STATUS_ARMGenerator = gen.Struct(reflect.TypeOf(TrustedAccessRoleBindingProperties_STATUS_ARM{}), generators) + + return trustedAccessRoleBindingProperties_STATUS_ARMGenerator +} + +// AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_STATUS_ARM is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForTrustedAccessRoleBindingProperties_STATUS_ARM(gens map[string]gopter.Gen) { + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Canceled, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Deleting, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Failed, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Succeeded, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Updating)) + gens["Roles"] = gen.SliceOf(gen.AlphaString()) + gens["SourceResourceId"] = gen.PtrOf(gen.AlphaString()) +} diff --git a/v2/api/containerservice/v1api20230202preview/structure.txt b/v2/api/containerservice/v1api20230202preview/structure.txt index f92a3a39ca..a6dc790274 100644 --- a/v2/api/containerservice/v1api20230202preview/structure.txt +++ b/v2/api/containerservice/v1api20230202preview/structure.txt @@ -350,7 +350,9 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre │ │ │ └── "Unrestricted" │ │ ├── OidcIssuerProfile: *Object (1 property) │ │ │ └── Enabled: *bool -│ │ ├── OperatorSpec: *Object (1 property) +│ │ ├── OperatorSpec: *Object (2 properties) +│ │ │ ├── ConfigMaps: *Object (1 property) +│ │ │ │ └── OIDCIssuerProfile: *genruntime.ConfigMapDestination │ │ │ └── Secrets: *Object (2 properties) │ │ │ ├── AdminCredentials: *genruntime.SecretDestination │ │ │ └── UserCredentials: *genruntime.SecretDestination @@ -2280,139 +2282,210 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre │ │ ├── "OCIContainer" │ │ └── "WasmWasi" │ └── Type: *string -└── ManagedClusters_AgentPool_Spec_ARM: Object (2 properties) - ├── Name: string - └── Properties: *Object (43 properties) - ├── AvailabilityZones: string[] - ├── CapacityReservationGroupID: *string - ├── Count: *int - ├── CreationData: *Object (1 property) - │ └── SourceResourceId: *string - ├── EnableAutoScaling: *bool - ├── EnableCustomCATrust: *bool - ├── EnableEncryptionAtHost: *bool - ├── EnableFIPS: *bool - ├── EnableNodePublicIP: *bool - ├── EnableUltraSSD: *bool - ├── GpuInstanceProfile: *Enum (5 values) - │ ├── "MIG1g" - │ ├── "MIG2g" - │ ├── "MIG3g" - │ ├── "MIG4g" - │ └── "MIG7g" - ├── HostGroupID: *string - ├── KubeletConfig: *Object (11 properties) - │ ├── AllowedUnsafeSysctls: string[] - │ ├── ContainerLogMaxFiles: *int - │ ├── ContainerLogMaxSizeMB: *int - │ ├── CpuCfsQuota: *bool - │ ├── CpuCfsQuotaPeriod: *string - │ ├── CpuManagerPolicy: *string - │ ├── FailSwapOn: *bool - │ ├── ImageGcHighThreshold: *int - │ ├── ImageGcLowThreshold: *int - │ ├── PodMaxPids: *int - │ └── TopologyManagerPolicy: *string - ├── KubeletDiskType: *Enum (2 values) - │ ├── "OS" - │ └── "Temporary" - ├── LinuxOSConfig: *Object (4 properties) - │ ├── SwapFileSizeMB: *int - │ ├── Sysctls: *Object (28 properties) - │ │ ├── FsAioMaxNr: *int - │ │ ├── FsFileMax: *int - │ │ ├── FsInotifyMaxUserWatches: *int - │ │ ├── FsNrOpen: *int - │ │ ├── KernelThreadsMax: *int - │ │ ├── NetCoreNetdevMaxBacklog: *int - │ │ ├── NetCoreOptmemMax: *int - │ │ ├── NetCoreRmemDefault: *int - │ │ ├── NetCoreRmemMax: *int - │ │ ├── NetCoreSomaxconn: *int - │ │ ├── NetCoreWmemDefault: *int - │ │ ├── NetCoreWmemMax: *int - │ │ ├── NetIpv4IpLocalPortRange: *string - │ │ ├── NetIpv4NeighDefaultGcThresh1: *int - │ │ ├── NetIpv4NeighDefaultGcThresh2: *int - │ │ ├── NetIpv4NeighDefaultGcThresh3: *int - │ │ ├── NetIpv4TcpFinTimeout: *int - │ │ ├── NetIpv4TcpKeepaliveProbes: *int - │ │ ├── NetIpv4TcpKeepaliveTime: *int - │ │ ├── NetIpv4TcpMaxSynBacklog: *int - │ │ ├── NetIpv4TcpMaxTwBuckets: *int - │ │ ├── NetIpv4TcpTwReuse: *bool - │ │ ├── NetIpv4TcpkeepaliveIntvl: *int - │ │ ├── NetNetfilterNfConntrackBuckets: *int - │ │ ├── NetNetfilterNfConntrackMax: *int - │ │ ├── VmMaxMapCount: *int - │ │ ├── VmSwappiness: *int - │ │ └── VmVfsCachePressure: *int - │ ├── TransparentHugePageDefrag: *string - │ └── TransparentHugePageEnabled: *string - ├── MaxCount: *int - ├── MaxPods: *int - ├── MessageOfTheDay: *string - ├── MinCount: *int - ├── Mode: *Enum (2 values) - │ ├── "System" - │ └── "User" - ├── NetworkProfile: *Object (3 properties) - │ ├── AllowedHostPorts: Object (3 properties)[] - │ │ ├── PortEnd: *int - │ │ ├── PortStart: *int - │ │ └── Protocol: *Enum (2 values) - │ │ ├── "TCP" - │ │ └── "UDP" - │ ├── ApplicationSecurityGroups: string[] - │ └── NodePublicIPTags: Object (2 properties)[] - │ ├── IpTagType: *string - │ └── Tag: *string - ├── NodeLabels: map[string]string - ├── NodePublicIPPrefixID: *string - ├── NodeTaints: string[] - ├── OrchestratorVersion: *string - ├── OsDiskSizeGB: *Validated (2 rules) - │ ├── Rule 0: Maximum: 2048 - │ └── Rule 1: Minimum: 0 - ├── OsDiskType: *Enum (2 values) - │ ├── "Ephemeral" - │ └── "Managed" - ├── OsSKU: *Enum (5 values) - │ ├── "CBLMariner" - │ ├── "Mariner" - │ ├── "Ubuntu" - │ ├── "Windows2019" - │ └── "Windows2022" - ├── OsType: *Enum (2 values) - │ ├── "Linux" - │ └── "Windows" - ├── PodSubnetID: *string - ├── PowerState: *Object (1 property) - │ └── Code: *Enum (2 values) - │ ├── "Running" - │ └── "Stopped" - ├── ProximityPlacementGroupID: *string - ├── ScaleDownMode: *Enum (2 values) - │ ├── "Deallocate" - │ └── "Delete" - ├── ScaleSetEvictionPolicy: *Enum (2 values) - │ ├── "Deallocate" - │ └── "Delete" - ├── ScaleSetPriority: *Enum (2 values) - │ ├── "Regular" - │ └── "Spot" - ├── SpotMaxPrice: *float64 - ├── Tags: map[string]string - ├── Type: *Enum (2 values) - │ ├── "AvailabilitySet" - │ └── "VirtualMachineScaleSets" - ├── UpgradeSettings: *Object (1 property) - │ └── MaxSurge: *string - ├── VmSize: *string - ├── VnetSubnetID: *string - ├── WindowsProfile: *Object (1 property) - │ └── DisableOutboundNat: *bool - └── WorkloadRuntime: *Enum (3 values) - ├── "KataMshvVmIsolation" - ├── "OCIContainer" - └── "WasmWasi" +├── ManagedClusters_AgentPool_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (43 properties) +│ ├── AvailabilityZones: string[] +│ ├── CapacityReservationGroupID: *string +│ ├── Count: *int +│ ├── CreationData: *Object (1 property) +│ │ └── SourceResourceId: *string +│ ├── EnableAutoScaling: *bool +│ ├── EnableCustomCATrust: *bool +│ ├── EnableEncryptionAtHost: *bool +│ ├── EnableFIPS: *bool +│ ├── EnableNodePublicIP: *bool +│ ├── EnableUltraSSD: *bool +│ ├── GpuInstanceProfile: *Enum (5 values) +│ │ ├── "MIG1g" +│ │ ├── "MIG2g" +│ │ ├── "MIG3g" +│ │ ├── "MIG4g" +│ │ └── "MIG7g" +│ ├── HostGroupID: *string +│ ├── KubeletConfig: *Object (11 properties) +│ │ ├── AllowedUnsafeSysctls: string[] +│ │ ├── ContainerLogMaxFiles: *int +│ │ ├── ContainerLogMaxSizeMB: *int +│ │ ├── CpuCfsQuota: *bool +│ │ ├── CpuCfsQuotaPeriod: *string +│ │ ├── CpuManagerPolicy: *string +│ │ ├── FailSwapOn: *bool +│ │ ├── ImageGcHighThreshold: *int +│ │ ├── ImageGcLowThreshold: *int +│ │ ├── PodMaxPids: *int +│ │ └── TopologyManagerPolicy: *string +│ ├── KubeletDiskType: *Enum (2 values) +│ │ ├── "OS" +│ │ └── "Temporary" +│ ├── LinuxOSConfig: *Object (4 properties) +│ │ ├── SwapFileSizeMB: *int +│ │ ├── Sysctls: *Object (28 properties) +│ │ │ ├── FsAioMaxNr: *int +│ │ │ ├── FsFileMax: *int +│ │ │ ├── FsInotifyMaxUserWatches: *int +│ │ │ ├── FsNrOpen: *int +│ │ │ ├── KernelThreadsMax: *int +│ │ │ ├── NetCoreNetdevMaxBacklog: *int +│ │ │ ├── NetCoreOptmemMax: *int +│ │ │ ├── NetCoreRmemDefault: *int +│ │ │ ├── NetCoreRmemMax: *int +│ │ │ ├── NetCoreSomaxconn: *int +│ │ │ ├── NetCoreWmemDefault: *int +│ │ │ ├── NetCoreWmemMax: *int +│ │ │ ├── NetIpv4IpLocalPortRange: *string +│ │ │ ├── NetIpv4NeighDefaultGcThresh1: *int +│ │ │ ├── NetIpv4NeighDefaultGcThresh2: *int +│ │ │ ├── NetIpv4NeighDefaultGcThresh3: *int +│ │ │ ├── NetIpv4TcpFinTimeout: *int +│ │ │ ├── NetIpv4TcpKeepaliveProbes: *int +│ │ │ ├── NetIpv4TcpKeepaliveTime: *int +│ │ │ ├── NetIpv4TcpMaxSynBacklog: *int +│ │ │ ├── NetIpv4TcpMaxTwBuckets: *int +│ │ │ ├── NetIpv4TcpTwReuse: *bool +│ │ │ ├── NetIpv4TcpkeepaliveIntvl: *int +│ │ │ ├── NetNetfilterNfConntrackBuckets: *int +│ │ │ ├── NetNetfilterNfConntrackMax: *int +│ │ │ ├── VmMaxMapCount: *int +│ │ │ ├── VmSwappiness: *int +│ │ │ └── VmVfsCachePressure: *int +│ │ ├── TransparentHugePageDefrag: *string +│ │ └── TransparentHugePageEnabled: *string +│ ├── MaxCount: *int +│ ├── MaxPods: *int +│ ├── MessageOfTheDay: *string +│ ├── MinCount: *int +│ ├── Mode: *Enum (2 values) +│ │ ├── "System" +│ │ └── "User" +│ ├── NetworkProfile: *Object (3 properties) +│ │ ├── AllowedHostPorts: Object (3 properties)[] +│ │ │ ├── PortEnd: *int +│ │ │ ├── PortStart: *int +│ │ │ └── Protocol: *Enum (2 values) +│ │ │ ├── "TCP" +│ │ │ └── "UDP" +│ │ ├── ApplicationSecurityGroups: string[] +│ │ └── NodePublicIPTags: Object (2 properties)[] +│ │ ├── IpTagType: *string +│ │ └── Tag: *string +│ ├── NodeLabels: map[string]string +│ ├── NodePublicIPPrefixID: *string +│ ├── NodeTaints: string[] +│ ├── OrchestratorVersion: *string +│ ├── OsDiskSizeGB: *Validated (2 rules) +│ │ ├── Rule 0: Maximum: 2048 +│ │ └── Rule 1: Minimum: 0 +│ ├── OsDiskType: *Enum (2 values) +│ │ ├── "Ephemeral" +│ │ └── "Managed" +│ ├── OsSKU: *Enum (5 values) +│ │ ├── "CBLMariner" +│ │ ├── "Mariner" +│ │ ├── "Ubuntu" +│ │ ├── "Windows2019" +│ │ └── "Windows2022" +│ ├── OsType: *Enum (2 values) +│ │ ├── "Linux" +│ │ └── "Windows" +│ ├── PodSubnetID: *string +│ ├── PowerState: *Object (1 property) +│ │ └── Code: *Enum (2 values) +│ │ ├── "Running" +│ │ └── "Stopped" +│ ├── ProximityPlacementGroupID: *string +│ ├── ScaleDownMode: *Enum (2 values) +│ │ ├── "Deallocate" +│ │ └── "Delete" +│ ├── ScaleSetEvictionPolicy: *Enum (2 values) +│ │ ├── "Deallocate" +│ │ └── "Delete" +│ ├── ScaleSetPriority: *Enum (2 values) +│ │ ├── "Regular" +│ │ └── "Spot" +│ ├── SpotMaxPrice: *float64 +│ ├── Tags: map[string]string +│ ├── Type: *Enum (2 values) +│ │ ├── "AvailabilitySet" +│ │ └── "VirtualMachineScaleSets" +│ ├── UpgradeSettings: *Object (1 property) +│ │ └── MaxSurge: *string +│ ├── VmSize: *string +│ ├── VnetSubnetID: *string +│ ├── WindowsProfile: *Object (1 property) +│ │ └── DisableOutboundNat: *bool +│ └── WorkloadRuntime: *Enum (3 values) +│ ├── "KataMshvVmIsolation" +│ ├── "OCIContainer" +│ └── "WasmWasi" +├── ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM: Object (5 properties) +│ ├── Id: *string +│ ├── Name: *string +│ ├── Properties: *Object (3 properties) +│ │ ├── ProvisioningState: *Enum (5 values) +│ │ │ ├── "Canceled" +│ │ │ ├── "Deleting" +│ │ │ ├── "Failed" +│ │ │ ├── "Succeeded" +│ │ │ └── "Updating" +│ │ ├── Roles: string[] +│ │ └── SourceResourceId: *string +│ ├── SystemData: *Object (6 properties) +│ │ ├── CreatedAt: *string +│ │ ├── CreatedBy: *string +│ │ ├── CreatedByType: *Enum (4 values) +│ │ │ ├── "Application" +│ │ │ ├── "Key" +│ │ │ ├── "ManagedIdentity" +│ │ │ └── "User" +│ │ ├── LastModifiedAt: *string +│ │ ├── LastModifiedBy: *string +│ │ └── LastModifiedByType: *Enum (4 values) +│ │ ├── "Application" +│ │ ├── "Key" +│ │ ├── "ManagedIdentity" +│ │ └── "User" +│ └── Type: *string +├── ManagedClusters_TrustedAccessRoleBinding_Spec_ARM: Object (2 properties) +│ ├── Name: string +│ └── Properties: *Object (2 properties) +│ ├── Roles: string[] +│ └── SourceResourceId: *string +└── TrustedAccessRoleBinding: Resource + ├── Owner: ManagedCluster + ├── Spec: Object (4 properties) + │ ├── AzureName: Validated (3 rules) + │ │ ├── Rule 0: MaxLength: 24 + │ │ ├── Rule 1: MinLength: 1 + │ │ └── Rule 2: Pattern: "^([A-Za-z0-9-])+$" + │ ├── Owner: *genruntime.KnownResourceReference + │ ├── Roles: string[] + │ └── SourceResourceReference: *genruntime.ResourceReference + └── Status: Object (8 properties) + ├── Conditions: conditions.Condition[] + ├── Id: *string + ├── Name: *string + ├── ProvisioningState: *Enum (5 values) + │ ├── "Canceled" + │ ├── "Deleting" + │ ├── "Failed" + │ ├── "Succeeded" + │ └── "Updating" + ├── Roles: string[] + ├── SourceResourceId: *string + ├── SystemData: *Object (6 properties) + │ ├── CreatedAt: *string + │ ├── CreatedBy: *string + │ ├── CreatedByType: *Enum (4 values) + │ │ ├── "Application" + │ │ ├── "Key" + │ │ ├── "ManagedIdentity" + │ │ └── "User" + │ ├── LastModifiedAt: *string + │ ├── LastModifiedBy: *string + │ └── LastModifiedByType: *Enum (4 values) + │ ├── "Application" + │ ├── "Key" + │ ├── "ManagedIdentity" + │ └── "User" + └── Type: *string diff --git a/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go new file mode 100644 index 0000000000..84f58f001a --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go @@ -0,0 +1,823 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +import ( + "fmt" + v1api20230202ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202previewstorage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + kerrors "k8s.io/apimachinery/pkg/util/errors" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generator information: +// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-02-02-preview/managedClusters.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName} +type TrustedAccessRoleBinding struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ManagedClusters_TrustedAccessRoleBinding_Spec `json:"spec,omitempty"` + Status ManagedClusters_TrustedAccessRoleBinding_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &TrustedAccessRoleBinding{} + +// GetConditions returns the conditions of the resource +func (binding *TrustedAccessRoleBinding) GetConditions() conditions.Conditions { + return binding.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (binding *TrustedAccessRoleBinding) SetConditions(conditions conditions.Conditions) { + binding.Status.Conditions = conditions +} + +var _ conversion.Convertible = &TrustedAccessRoleBinding{} + +// ConvertFrom populates our TrustedAccessRoleBinding from the provided hub TrustedAccessRoleBinding +func (binding *TrustedAccessRoleBinding) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v1api20230202ps.TrustedAccessRoleBinding) + if !ok { + return fmt.Errorf("expected containerservice/v1api20230202previewstorage/TrustedAccessRoleBinding but received %T instead", hub) + } + + return binding.AssignProperties_From_TrustedAccessRoleBinding(source) +} + +// ConvertTo populates the provided hub TrustedAccessRoleBinding from our TrustedAccessRoleBinding +func (binding *TrustedAccessRoleBinding) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v1api20230202ps.TrustedAccessRoleBinding) + if !ok { + return fmt.Errorf("expected containerservice/v1api20230202previewstorage/TrustedAccessRoleBinding but received %T instead", hub) + } + + return binding.AssignProperties_To_TrustedAccessRoleBinding(destination) +} + +// +kubebuilder:webhook:path=/mutate-containerservice-azure-com-v1api20230202preview-trustedaccessrolebinding,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=containerservice.azure.com,resources=trustedaccessrolebindings,verbs=create;update,versions=v1api20230202preview,name=default.v1api20230202preview.trustedaccessrolebindings.containerservice.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &TrustedAccessRoleBinding{} + +// Default applies defaults to the TrustedAccessRoleBinding resource +func (binding *TrustedAccessRoleBinding) Default() { + binding.defaultImpl() + var temp any = binding + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (binding *TrustedAccessRoleBinding) defaultAzureName() { + if binding.Spec.AzureName == "" { + binding.Spec.AzureName = binding.Name + } +} + +// defaultImpl applies the code generated defaults to the TrustedAccessRoleBinding resource +func (binding *TrustedAccessRoleBinding) defaultImpl() { binding.defaultAzureName() } + +var _ genruntime.ImportableResource = &TrustedAccessRoleBinding{} + +// InitializeSpec initializes the spec for this resource from the given status +func (binding *TrustedAccessRoleBinding) InitializeSpec(status genruntime.ConvertibleStatus) error { + if s, ok := status.(*ManagedClusters_TrustedAccessRoleBinding_STATUS); ok { + return binding.Spec.Initialize_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(s) + } + + return fmt.Errorf("expected Status of type ManagedClusters_TrustedAccessRoleBinding_STATUS but received %T instead", status) +} + +var _ genruntime.KubernetesResource = &TrustedAccessRoleBinding{} + +// AzureName returns the Azure name of the resource +func (binding *TrustedAccessRoleBinding) AzureName() string { + return binding.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-02-02-preview" +func (binding TrustedAccessRoleBinding) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (binding *TrustedAccessRoleBinding) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (binding *TrustedAccessRoleBinding) GetSpec() genruntime.ConvertibleSpec { + return &binding.Spec +} + +// GetStatus returns the status of this resource +func (binding *TrustedAccessRoleBinding) GetStatus() genruntime.ConvertibleStatus { + return &binding.Status +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +func (binding *TrustedAccessRoleBinding) GetType() string { + return "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +} + +// NewEmptyStatus returns a new empty (blank) status +func (binding *TrustedAccessRoleBinding) NewEmptyStatus() genruntime.ConvertibleStatus { + return &ManagedClusters_TrustedAccessRoleBinding_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (binding *TrustedAccessRoleBinding) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(binding.Spec) + return &genruntime.ResourceReference{ + Group: group, + Kind: kind, + Name: binding.Spec.Owner.Name, + } +} + +// SetStatus sets the status of this resource +func (binding *TrustedAccessRoleBinding) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*ManagedClusters_TrustedAccessRoleBinding_STATUS); ok { + binding.Status = *st + return nil + } + + // Convert status to required version + var st ManagedClusters_TrustedAccessRoleBinding_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + binding.Status = st + return nil +} + +// +kubebuilder:webhook:path=/validate-containerservice-azure-com-v1api20230202preview-trustedaccessrolebinding,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=containerservice.azure.com,resources=trustedaccessrolebindings,verbs=create;update,versions=v1api20230202preview,name=validate.v1api20230202preview.trustedaccessrolebindings.containerservice.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &TrustedAccessRoleBinding{} + +// ValidateCreate validates the creation of the resource +func (binding *TrustedAccessRoleBinding) ValidateCreate() error { + validations := binding.createValidations() + var temp any = binding + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + var errs []error + for _, validation := range validations { + err := validation() + if err != nil { + errs = append(errs, err) + } + } + return kerrors.NewAggregate(errs) +} + +// ValidateDelete validates the deletion of the resource +func (binding *TrustedAccessRoleBinding) ValidateDelete() error { + validations := binding.deleteValidations() + var temp any = binding + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + var errs []error + for _, validation := range validations { + err := validation() + if err != nil { + errs = append(errs, err) + } + } + return kerrors.NewAggregate(errs) +} + +// ValidateUpdate validates an update of the resource +func (binding *TrustedAccessRoleBinding) ValidateUpdate(old runtime.Object) error { + validations := binding.updateValidations() + var temp any = binding + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + var errs []error + for _, validation := range validations { + err := validation(old) + if err != nil { + errs = append(errs, err) + } + } + return kerrors.NewAggregate(errs) +} + +// createValidations validates the creation of the resource +func (binding *TrustedAccessRoleBinding) createValidations() []func() error { + return []func() error{binding.validateResourceReferences} +} + +// deleteValidations validates the deletion of the resource +func (binding *TrustedAccessRoleBinding) deleteValidations() []func() error { + return nil +} + +// updateValidations validates the update of the resource +func (binding *TrustedAccessRoleBinding) updateValidations() []func(old runtime.Object) error { + return []func(old runtime.Object) error{ + func(old runtime.Object) error { + return binding.validateResourceReferences() + }, + binding.validateWriteOnceProperties} +} + +// validateResourceReferences validates all resource references +func (binding *TrustedAccessRoleBinding) validateResourceReferences() error { + refs, err := reflecthelpers.FindResourceReferences(&binding.Spec) + if err != nil { + return err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (binding *TrustedAccessRoleBinding) validateWriteOnceProperties(old runtime.Object) error { + oldObj, ok := old.(*TrustedAccessRoleBinding) + if !ok { + return nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, binding) +} + +// AssignProperties_From_TrustedAccessRoleBinding populates our TrustedAccessRoleBinding from the provided source TrustedAccessRoleBinding +func (binding *TrustedAccessRoleBinding) AssignProperties_From_TrustedAccessRoleBinding(source *v1api20230202ps.TrustedAccessRoleBinding) error { + + // ObjectMeta + binding.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec ManagedClusters_TrustedAccessRoleBinding_Spec + err := spec.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec() to populate field Spec") + } + binding.Spec = spec + + // Status + var status ManagedClusters_TrustedAccessRoleBinding_STATUS + err = status.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(&source.Status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS() to populate field Status") + } + binding.Status = status + + // No error + return nil +} + +// AssignProperties_To_TrustedAccessRoleBinding populates the provided destination TrustedAccessRoleBinding from our TrustedAccessRoleBinding +func (binding *TrustedAccessRoleBinding) AssignProperties_To_TrustedAccessRoleBinding(destination *v1api20230202ps.TrustedAccessRoleBinding) error { + + // ObjectMeta + destination.ObjectMeta = *binding.ObjectMeta.DeepCopy() + + // Spec + var spec v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec + err := binding.Spec.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec() to populate field Spec") + } + destination.Spec = spec + + // Status + var status v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS + err = binding.Status.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS(&status) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS() to populate field Status") + } + destination.Status = status + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (binding *TrustedAccessRoleBinding) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: binding.Spec.OriginalVersion(), + Kind: "TrustedAccessRoleBinding", + } +} + +// +kubebuilder:object:root=true +// Generator information: +// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-02-02-preview/managedClusters.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName} +type TrustedAccessRoleBindingList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TrustedAccessRoleBinding `json:"items"` +} + +type ManagedClusters_TrustedAccessRoleBinding_Spec struct { + // +kubebuilder:validation:MaxLength=24 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern="^([A-Za-z0-9-])+$" + // 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"` + + // +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 + // reference to a containerservice.azure.com/ManagedCluster resource + Owner *genruntime.KnownResourceReference `group:"containerservice.azure.com" json:"owner,omitempty" kind:"ManagedCluster"` + + // +kubebuilder:validation:Required + // Roles: A list of roles to bind, each item is a resource type qualified role name. For example: + // 'Microsoft.MachineLearningServices/workspaces/reader'. + Roles []string `json:"roles,omitempty"` + + // +kubebuilder:validation:Required + // SourceResourceReference: The ARM resource ID of source resource that trusted access is configured for. + SourceResourceReference *genruntime.ResourceReference `armReference:"SourceResourceId" json:"sourceResourceReference,omitempty"` +} + +var _ genruntime.ARMTransformer = &ManagedClusters_TrustedAccessRoleBinding_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if binding == nil { + return nil, nil + } + result := &ManagedClusters_TrustedAccessRoleBinding_Spec_ARM{} + + // Set property ‘Name’: + result.Name = resolved.Name + + // Set property ‘Properties’: + if binding.Roles != nil || binding.SourceResourceReference != nil { + result.Properties = &TrustedAccessRoleBindingProperties_ARM{} + } + for _, item := range binding.Roles { + result.Properties.Roles = append(result.Properties.Roles, item) + } + if binding.SourceResourceReference != nil { + sourceResourceIdARMID, err := resolved.ResolvedReferences.Lookup(*binding.SourceResourceReference) + if err != nil { + return nil, err + } + sourceResourceId := sourceResourceIdARMID + result.Properties.SourceResourceId = &sourceResourceId + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagedClusters_TrustedAccessRoleBinding_Spec_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagedClusters_TrustedAccessRoleBinding_Spec_ARM, got %T", armInput) + } + + // Set property ‘AzureName’: + binding.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property ‘Owner’: + binding.Owner = &genruntime.KnownResourceReference{Name: owner.Name} + + // Set property ‘Roles’: + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.Roles { + binding.Roles = append(binding.Roles, item) + } + } + + // no assignment for property ‘SourceResourceReference’ + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &ManagedClusters_TrustedAccessRoleBinding_Spec{} + +// ConvertSpecFrom populates our ManagedClusters_TrustedAccessRoleBinding_Spec from the provided source +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec) + if ok { + // Populate our instance from source + return binding.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec(src) + } + + // Convert to an intermediate form + src = &v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = binding.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our ManagedClusters_TrustedAccessRoleBinding_Spec +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec) + if ok { + // Populate destination from our instance + return binding.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec(dst) + } + + // Convert to an intermediate form + dst = &v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec{} + err := binding.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec populates our ManagedClusters_TrustedAccessRoleBinding_Spec from the provided source ManagedClusters_TrustedAccessRoleBinding_Spec +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec(source *v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec) error { + + // AzureName + binding.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + binding.Owner = &owner + } else { + binding.Owner = nil + } + + // Roles + binding.Roles = genruntime.CloneSliceOfString(source.Roles) + + // SourceResourceReference + if source.SourceResourceReference != nil { + sourceResourceReference := source.SourceResourceReference.Copy() + binding.SourceResourceReference = &sourceResourceReference + } else { + binding.SourceResourceReference = nil + } + + // No error + return nil +} + +// AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec populates the provided destination ManagedClusters_TrustedAccessRoleBinding_Spec from our ManagedClusters_TrustedAccessRoleBinding_Spec +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec(destination *v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // AzureName + destination.AzureName = binding.AzureName + + // OriginalVersion + destination.OriginalVersion = binding.OriginalVersion() + + // Owner + if binding.Owner != nil { + owner := binding.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Roles + destination.Roles = genruntime.CloneSliceOfString(binding.Roles) + + // SourceResourceReference + if binding.SourceResourceReference != nil { + sourceResourceReference := binding.SourceResourceReference.Copy() + destination.SourceResourceReference = &sourceResourceReference + } else { + destination.SourceResourceReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// Initialize_From_ManagedClusters_TrustedAccessRoleBinding_STATUS populates our ManagedClusters_TrustedAccessRoleBinding_Spec from the provided source ManagedClusters_TrustedAccessRoleBinding_STATUS +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) Initialize_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(source *ManagedClusters_TrustedAccessRoleBinding_STATUS) error { + + // Roles + binding.Roles = genruntime.CloneSliceOfString(source.Roles) + + // SourceResourceReference + if source.SourceResourceId != nil { + sourceResourceReference := genruntime.CreateResourceReferenceFromARMID(*source.SourceResourceId) + binding.SourceResourceReference = &sourceResourceReference + } else { + binding.SourceResourceReference = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) SetAzureName(azureName string) { + binding.AzureName = azureName +} + +type ManagedClusters_TrustedAccessRoleBinding_STATUS struct { + // Conditions: The observed state of the resource + Conditions []conditions.Condition `json:"conditions,omitempty"` + + // Id: Fully qualified resource ID for the resource. Ex - + // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + Id *string `json:"id,omitempty"` + + // Name: The name of the resource + Name *string `json:"name,omitempty"` + + // ProvisioningState: The current provisioning state of trusted access role binding. + ProvisioningState *TrustedAccessRoleBindingProperties_ProvisioningState_STATUS `json:"provisioningState,omitempty"` + + // Roles: A list of roles to bind, each item is a resource type qualified role name. For example: + // 'Microsoft.MachineLearningServices/workspaces/reader'. + Roles []string `json:"roles,omitempty"` + + // SourceResourceId: The ARM resource ID of source resource that trusted access is configured for. + SourceResourceId *string `json:"sourceResourceId,omitempty"` + + // SystemData: Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + + // Type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ManagedClusters_TrustedAccessRoleBinding_STATUS{} + +// ConvertStatusFrom populates our ManagedClusters_TrustedAccessRoleBinding_STATUS from the provided source +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + src, ok := source.(*v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS) + if ok { + // Populate our instance from source + return binding.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(src) + } + + // Convert to an intermediate form + src = &v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS{} + err := src.ConvertStatusFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusFrom()") + } + + // Update our instance from src + err = binding.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusFrom()") + } + + return nil +} + +// ConvertStatusTo populates the provided destination from our ManagedClusters_TrustedAccessRoleBinding_STATUS +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + dst, ok := destination.(*v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS) + if ok { + // Populate destination from our instance + return binding.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS(dst) + } + + // Convert to an intermediate form + dst = &v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS{} + err := binding.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertStatusTo()") + } + + // Update dst from our instance + err = dst.ConvertStatusTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertStatusTo()") + } + + return nil +} + +var _ genruntime.FromARMConverter = &ManagedClusters_TrustedAccessRoleBinding_STATUS{} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM, got %T", armInput) + } + + // no assignment for property ‘Conditions’ + + // Set property ‘Id’: + if typedInput.Id != nil { + id := *typedInput.Id + binding.Id = &id + } + + // Set property ‘Name’: + if typedInput.Name != nil { + name := *typedInput.Name + binding.Name = &name + } + + // Set property ‘ProvisioningState’: + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.ProvisioningState != nil { + provisioningState := *typedInput.Properties.ProvisioningState + binding.ProvisioningState = &provisioningState + } + } + + // Set property ‘Roles’: + // copying flattened property: + if typedInput.Properties != nil { + for _, item := range typedInput.Properties.Roles { + binding.Roles = append(binding.Roles, item) + } + } + + // Set property ‘SourceResourceId’: + // copying flattened property: + if typedInput.Properties != nil { + if typedInput.Properties.SourceResourceId != nil { + sourceResourceId := *typedInput.Properties.SourceResourceId + binding.SourceResourceId = &sourceResourceId + } + } + + // Set property ‘SystemData’: + if typedInput.SystemData != nil { + var systemData1 SystemData_STATUS + err := systemData1.PopulateFromARM(owner, *typedInput.SystemData) + if err != nil { + return err + } + systemData := systemData1 + binding.SystemData = &systemData + } + + // Set property ‘Type’: + if typedInput.Type != nil { + typeVar := *typedInput.Type + binding.Type = &typeVar + } + + // No error + return nil +} + +// AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS populates our ManagedClusters_TrustedAccessRoleBinding_STATUS from the provided source ManagedClusters_TrustedAccessRoleBinding_STATUS +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(source *v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS) error { + + // Conditions + binding.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) + + // Id + binding.Id = genruntime.ClonePointerToString(source.Id) + + // Name + binding.Name = genruntime.ClonePointerToString(source.Name) + + // ProvisioningState + if source.ProvisioningState != nil { + provisioningState := TrustedAccessRoleBindingProperties_ProvisioningState_STATUS(*source.ProvisioningState) + binding.ProvisioningState = &provisioningState + } else { + binding.ProvisioningState = nil + } + + // Roles + binding.Roles = genruntime.CloneSliceOfString(source.Roles) + + // SourceResourceId + binding.SourceResourceId = genruntime.ClonePointerToString(source.SourceResourceId) + + // SystemData + if source.SystemData != nil { + var systemDatum SystemData_STATUS + err := systemDatum.AssignProperties_From_SystemData_STATUS(source.SystemData) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_SystemData_STATUS() to populate field SystemData") + } + binding.SystemData = &systemDatum + } else { + binding.SystemData = nil + } + + // Type + binding.Type = genruntime.ClonePointerToString(source.Type) + + // No error + return nil +} + +// AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS populates the provided destination ManagedClusters_TrustedAccessRoleBinding_STATUS from our ManagedClusters_TrustedAccessRoleBinding_STATUS +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS(destination *v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Conditions + destination.Conditions = genruntime.CloneSliceOfCondition(binding.Conditions) + + // Id + destination.Id = genruntime.ClonePointerToString(binding.Id) + + // Name + destination.Name = genruntime.ClonePointerToString(binding.Name) + + // ProvisioningState + if binding.ProvisioningState != nil { + provisioningState := string(*binding.ProvisioningState) + destination.ProvisioningState = &provisioningState + } else { + destination.ProvisioningState = nil + } + + // Roles + destination.Roles = genruntime.CloneSliceOfString(binding.Roles) + + // SourceResourceId + destination.SourceResourceId = genruntime.ClonePointerToString(binding.SourceResourceId) + + // SystemData + if binding.SystemData != nil { + var systemDatum v1api20230202ps.SystemData_STATUS + err := binding.SystemData.AssignProperties_To_SystemData_STATUS(&systemDatum) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_SystemData_STATUS() to populate field SystemData") + } + destination.SystemData = &systemDatum + } else { + destination.SystemData = nil + } + + // Type + destination.Type = genruntime.ClonePointerToString(binding.Type) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&TrustedAccessRoleBinding{}, &TrustedAccessRoleBindingList{}) +} diff --git a/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen_test.go b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen_test.go new file mode 100644 index 0000000000..73884e31cd --- /dev/null +++ b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen_test.go @@ -0,0 +1,397 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202preview + +import ( + "encoding/json" + v1api20230202ps "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202previewstorage" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_TrustedAccessRoleBinding_WhenConvertedToHub_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + parameters.MinSuccessfulTests = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TrustedAccessRoleBinding to hub returns original", + prop.ForAll(RunResourceConversionTestForTrustedAccessRoleBinding, TrustedAccessRoleBindingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunResourceConversionTestForTrustedAccessRoleBinding tests if a specific instance of TrustedAccessRoleBinding round trips to the hub storage version and back losslessly +func RunResourceConversionTestForTrustedAccessRoleBinding(subject TrustedAccessRoleBinding) string { + // Copy subject to make sure conversion doesn't modify it + copied := subject.DeepCopy() + + // Convert to our hub version + var hub v1api20230202ps.TrustedAccessRoleBinding + err := copied.ConvertTo(&hub) + if err != nil { + return err.Error() + } + + // Convert from our hub version + var actual TrustedAccessRoleBinding + err = actual.ConvertFrom(&hub) + if err != nil { + return err.Error() + } + + // Compare actual with what we started with + 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_TrustedAccessRoleBinding_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from TrustedAccessRoleBinding to TrustedAccessRoleBinding via AssignProperties_To_TrustedAccessRoleBinding & AssignProperties_From_TrustedAccessRoleBinding returns original", + prop.ForAll(RunPropertyAssignmentTestForTrustedAccessRoleBinding, TrustedAccessRoleBindingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForTrustedAccessRoleBinding tests if a specific instance of TrustedAccessRoleBinding can be assigned to v1api20230202previewstorage and back losslessly +func RunPropertyAssignmentTestForTrustedAccessRoleBinding(subject TrustedAccessRoleBinding) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230202ps.TrustedAccessRoleBinding + err := copied.AssignProperties_To_TrustedAccessRoleBinding(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual TrustedAccessRoleBinding + err = actual.AssignProperties_From_TrustedAccessRoleBinding(&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_TrustedAccessRoleBinding_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TrustedAccessRoleBinding via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTrustedAccessRoleBinding, TrustedAccessRoleBindingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTrustedAccessRoleBinding runs a test to see if a specific instance of TrustedAccessRoleBinding round trips to JSON and back losslessly +func RunJSONSerializationTestForTrustedAccessRoleBinding(subject TrustedAccessRoleBinding) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TrustedAccessRoleBinding + 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 TrustedAccessRoleBinding instances for property testing - lazily instantiated by +// TrustedAccessRoleBindingGenerator() +var trustedAccessRoleBindingGenerator gopter.Gen + +// TrustedAccessRoleBindingGenerator returns a generator of TrustedAccessRoleBinding instances for property testing. +func TrustedAccessRoleBindingGenerator() gopter.Gen { + if trustedAccessRoleBindingGenerator != nil { + return trustedAccessRoleBindingGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding(generators) + trustedAccessRoleBindingGenerator = gen.Struct(reflect.TypeOf(TrustedAccessRoleBinding{}), generators) + + return trustedAccessRoleBindingGenerator +} + +// AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding(gens map[string]gopter.Gen) { + gens["Spec"] = ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() + gens["Status"] = ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() +} + +func Test_ManagedClusters_TrustedAccessRoleBinding_Spec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagedClusters_TrustedAccessRoleBinding_Spec to ManagedClusters_TrustedAccessRoleBinding_Spec via AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec & AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec returns original", + prop.ForAll(RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_Spec, ManagedClusters_TrustedAccessRoleBinding_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_Spec tests if a specific instance of ManagedClusters_TrustedAccessRoleBinding_Spec can be assigned to v1api20230202previewstorage and back losslessly +func RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_Spec(subject ManagedClusters_TrustedAccessRoleBinding_Spec) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_Spec + err := copied.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_Spec(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagedClusters_TrustedAccessRoleBinding_Spec + err = actual.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_Spec(&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_ManagedClusters_TrustedAccessRoleBinding_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec, ManagedClusters_TrustedAccessRoleBinding_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec(subject ManagedClusters_TrustedAccessRoleBinding_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_Spec + 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 ManagedClusters_TrustedAccessRoleBinding_Spec instances for property testing - lazily instantiated by +// ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() +var managedClusters_TrustedAccessRoleBinding_SpecGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_SpecGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_Spec instances for property testing. +func ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_SpecGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec(generators) + managedClusters_TrustedAccessRoleBinding_SpecGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_Spec{}), generators) + + return managedClusters_TrustedAccessRoleBinding_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["Roles"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_ManagedClusters_TrustedAccessRoleBinding_STATUS_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagedClusters_TrustedAccessRoleBinding_STATUS to ManagedClusters_TrustedAccessRoleBinding_STATUS via AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS & AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS returns original", + prop.ForAll(RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_STATUS, ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_STATUS tests if a specific instance of ManagedClusters_TrustedAccessRoleBinding_STATUS can be assigned to v1api20230202previewstorage and back losslessly +func RunPropertyAssignmentTestForManagedClusters_TrustedAccessRoleBinding_STATUS(subject ManagedClusters_TrustedAccessRoleBinding_STATUS) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230202ps.ManagedClusters_TrustedAccessRoleBinding_STATUS + err := copied.AssignProperties_To_ManagedClusters_TrustedAccessRoleBinding_STATUS(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagedClusters_TrustedAccessRoleBinding_STATUS + err = actual.AssignProperties_From_ManagedClusters_TrustedAccessRoleBinding_STATUS(&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_ManagedClusters_TrustedAccessRoleBinding_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS, ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS(subject ManagedClusters_TrustedAccessRoleBinding_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_STATUS + 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 ManagedClusters_TrustedAccessRoleBinding_STATUS instances for property testing - lazily instantiated by +// ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() +var managedClusters_TrustedAccessRoleBinding_STATUSGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_STATUS instances for property testing. +// We first initialize managedClusters_TrustedAccessRoleBinding_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_STATUSGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + managedClusters_TrustedAccessRoleBinding_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + managedClusters_TrustedAccessRoleBinding_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS{}), generators) + + return managedClusters_TrustedAccessRoleBinding_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.OneConstOf( + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Canceled, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Deleting, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Failed, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Succeeded, + TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Updating)) + gens["Roles"] = gen.SliceOf(gen.AlphaString()) + gens["SourceResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(gens map[string]gopter.Gen) { + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} diff --git a/v2/api/containerservice/v1api20230202preview/zz_generated.deepcopy.go b/v2/api/containerservice/v1api20230202preview/zz_generated.deepcopy.go index d443a8c4bf..3f2b9545cf 100644 --- a/v2/api/containerservice/v1api20230202preview/zz_generated.deepcopy.go +++ b/v2/api/containerservice/v1api20230202preview/zz_generated.deepcopy.go @@ -6382,6 +6382,26 @@ func (in *ManagedClusterOIDCIssuerProfile_STATUS_ARM) DeepCopy() *ManagedCluster return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusterOperatorConfigMaps) DeepCopyInto(out *ManagedClusterOperatorConfigMaps) { + *out = *in + if in.OIDCIssuerProfile != nil { + in, out := &in.OIDCIssuerProfile, &out.OIDCIssuerProfile + *out = new(genruntime.ConfigMapDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusterOperatorConfigMaps. +func (in *ManagedClusterOperatorConfigMaps) DeepCopy() *ManagedClusterOperatorConfigMaps { + if in == nil { + return nil + } + out := new(ManagedClusterOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSecrets) DeepCopyInto(out *ManagedClusterOperatorSecrets) { *out = *in @@ -6410,6 +6430,11 @@ func (in *ManagedClusterOperatorSecrets) DeepCopy() *ManagedClusterOperatorSecre // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSpec) DeepCopyInto(out *ManagedClusterOperatorSpec) { *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(ManagedClusterOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } if in.Secrets != nil { in, out := &in.Secrets, &out.Secrets *out = new(ManagedClusterOperatorSecrets) @@ -10945,6 +10970,153 @@ func (in *ManagedClusters_AgentPool_Spec_ARM) DeepCopy() *ManagedClusters_AgentP return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(TrustedAccessRoleBindingProperties_ProvisioningState_STATUS) + **out = **in + } + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceId != nil { + in, out := &in.SourceResourceId, &out.SourceResourceId + *out = new(string) + **out = **in + } + if in.SystemData != nil { + in, out := &in.SystemData, &out.SystemData + *out = new(SystemData_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_STATUS. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_STATUS { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) { + *out = *in + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(TrustedAccessRoleBindingProperties_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.SystemData != nil { + in, out := &in.SystemData, &out.SystemData + *out = new(SystemData_STATUS_ARM) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_STATUS_ARM { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_STATUS_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 *ManagedClusters_TrustedAccessRoleBinding_Spec) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **out = **in + } + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceReference != nil { + in, out := &in.SourceResourceReference, &out.SourceResourceReference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_Spec. +func (in *ManagedClusters_TrustedAccessRoleBinding_Spec) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_Spec { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_Spec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) { + *out = *in + if in.Properties != nil { + in, out := &in.Properties, &out.Properties + *out = new(TrustedAccessRoleBindingProperties_ARM) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_Spec_ARM. +func (in *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_Spec_ARM { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_Spec_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 *PortRange) DeepCopyInto(out *PortRange) { *out = *in @@ -12205,6 +12377,120 @@ func (in *SystemData_STATUS_ARM) DeepCopy() *SystemData_STATUS_ARM { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrustedAccessRoleBinding) DeepCopyInto(out *TrustedAccessRoleBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBinding. +func (in *TrustedAccessRoleBinding) DeepCopy() *TrustedAccessRoleBinding { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrustedAccessRoleBinding) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrustedAccessRoleBindingList) DeepCopyInto(out *TrustedAccessRoleBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TrustedAccessRoleBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBindingList. +func (in *TrustedAccessRoleBindingList) DeepCopy() *TrustedAccessRoleBindingList { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrustedAccessRoleBindingList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrustedAccessRoleBindingProperties_ARM) DeepCopyInto(out *TrustedAccessRoleBindingProperties_ARM) { + *out = *in + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceId != nil { + in, out := &in.SourceResourceId, &out.SourceResourceId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBindingProperties_ARM. +func (in *TrustedAccessRoleBindingProperties_ARM) DeepCopy() *TrustedAccessRoleBindingProperties_ARM { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBindingProperties_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 *TrustedAccessRoleBindingProperties_STATUS_ARM) DeepCopyInto(out *TrustedAccessRoleBindingProperties_STATUS_ARM) { + *out = *in + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(TrustedAccessRoleBindingProperties_ProvisioningState_STATUS) + **out = **in + } + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceId != nil { + in, out := &in.SourceResourceId, &out.SourceResourceId + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBindingProperties_STATUS_ARM. +func (in *TrustedAccessRoleBindingProperties_STATUS_ARM) DeepCopy() *TrustedAccessRoleBindingProperties_STATUS_ARM { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBindingProperties_STATUS_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 *UpgradeOverrideSettings) DeepCopyInto(out *UpgradeOverrideSettings) { *out = *in diff --git a/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen.go index 3b2f5c0928..1ce411eb98 100644 --- a/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen.go @@ -4,13 +4,18 @@ package v1api20230202previewstorage import ( + "context" "fmt" v1api20230201s "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230201storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps" + "github.com/go-logr/logr" "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/conversion" ) @@ -65,6 +70,25 @@ func (cluster *ManagedCluster) ConvertTo(hub conversion.Hub) error { return cluster.AssignProperties_To_ManagedCluster(destination) } +var _ genruntime.KubernetesExporter = &ManagedCluster{} + +// ExportKubernetesResources defines a resource which can create other resources in Kubernetes. +func (cluster *ManagedCluster) ExportKubernetesResources(_ context.Context, _ genruntime.MetaObject, _ *genericarmclient.GenericClient, _ logr.Logger) ([]client.Object, error) { + collector := configmaps.NewCollector(cluster.Namespace) + if cluster.Spec.OperatorSpec != nil && cluster.Spec.OperatorSpec.ConfigMaps != nil { + if cluster.Status.OidcIssuerProfile != nil { + if cluster.Status.OidcIssuerProfile.IssuerURL != nil { + collector.AddValue(cluster.Spec.OperatorSpec.ConfigMaps.OIDCIssuerProfile, *cluster.Status.OidcIssuerProfile.IssuerURL) + } + } + } + result, err := collector.Values() + if err != nil { + return nil, err + } + return configmaps.SliceToClientObjectSlice(result), nil +} + var _ genruntime.KubernetesResource = &ManagedCluster{} // AzureName returns the Azure name of the resource @@ -6228,8 +6252,9 @@ func (profile *ManagedClusterOIDCIssuerProfile_STATUS) AssignProperties_To_Manag // Storage version of v1api20230202preview.ManagedClusterOperatorSpec // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ManagedClusterOperatorSpec struct { - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` + ConfigMaps *ManagedClusterOperatorConfigMaps `json:"configMaps,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *ManagedClusterOperatorSecrets `json:"secrets,omitempty"` } // AssignProperties_From_ManagedClusterOperatorSpec populates our ManagedClusterOperatorSpec from the provided source ManagedClusterOperatorSpec @@ -6237,6 +6262,18 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_From_ManagedCluster // Clone the existing property bag propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + // ConfigMaps + if source.ConfigMaps != nil { + var configMap ManagedClusterOperatorConfigMaps + err := configMap.AssignProperties_From_ManagedClusterOperatorConfigMaps(source.ConfigMaps) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + operator.ConfigMaps = &configMap + } else { + operator.ConfigMaps = nil + } + // Secrets if source.Secrets != nil { var secret ManagedClusterOperatorSecrets @@ -6274,6 +6311,18 @@ func (operator *ManagedClusterOperatorSpec) AssignProperties_To_ManagedClusterOp // Clone the existing property bag propertyBag := genruntime.NewPropertyBag(operator.PropertyBag) + // ConfigMaps + if operator.ConfigMaps != nil { + var configMap v1api20230201s.ManagedClusterOperatorConfigMaps + err := operator.ConfigMaps.AssignProperties_To_ManagedClusterOperatorConfigMaps(&configMap) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_ManagedClusterOperatorConfigMaps() to populate field ConfigMaps") + } + destination.ConfigMaps = &configMap + } else { + destination.ConfigMaps = nil + } + // Secrets if operator.Secrets != nil { var secret v1api20230201s.ManagedClusterOperatorSecrets @@ -10597,6 +10646,78 @@ func (profile *ManagedClusterNATGatewayProfile_STATUS) AssignProperties_To_Manag return nil } +// Storage version of v1api20230202preview.ManagedClusterOperatorConfigMaps +type ManagedClusterOperatorConfigMaps struct { + OIDCIssuerProfile *genruntime.ConfigMapDestination `json:"oidcIssuerProfile,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` +} + +// AssignProperties_From_ManagedClusterOperatorConfigMaps populates our ManagedClusterOperatorConfigMaps from the provided source ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_From_ManagedClusterOperatorConfigMaps(source *v1api20230201s.ManagedClusterOperatorConfigMaps) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(source.PropertyBag) + + // OIDCIssuerProfile + if source.OIDCIssuerProfile != nil { + oidcIssuerProfile := source.OIDCIssuerProfile.Copy() + maps.OIDCIssuerProfile = &oidcIssuerProfile + } else { + maps.OIDCIssuerProfile = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + maps.PropertyBag = propertyBag + } else { + maps.PropertyBag = nil + } + + // Invoke the augmentConversionForManagedClusterOperatorConfigMaps interface (if implemented) to customize the conversion + var mapsAsAny any = maps + if augmentedMaps, ok := mapsAsAny.(augmentConversionForManagedClusterOperatorConfigMaps); ok { + err := augmentedMaps.AssignPropertiesFrom(source) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion") + } + } + + // No error + return nil +} + +// AssignProperties_To_ManagedClusterOperatorConfigMaps populates the provided destination ManagedClusterOperatorConfigMaps from our ManagedClusterOperatorConfigMaps +func (maps *ManagedClusterOperatorConfigMaps) AssignProperties_To_ManagedClusterOperatorConfigMaps(destination *v1api20230201s.ManagedClusterOperatorConfigMaps) error { + // Clone the existing property bag + propertyBag := genruntime.NewPropertyBag(maps.PropertyBag) + + // OIDCIssuerProfile + if maps.OIDCIssuerProfile != nil { + oidcIssuerProfile := maps.OIDCIssuerProfile.Copy() + destination.OIDCIssuerProfile = &oidcIssuerProfile + } else { + destination.OIDCIssuerProfile = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // Invoke the augmentConversionForManagedClusterOperatorConfigMaps interface (if implemented) to customize the conversion + var mapsAsAny any = maps + if augmentedMaps, ok := mapsAsAny.(augmentConversionForManagedClusterOperatorConfigMaps); ok { + err := augmentedMaps.AssignPropertiesTo(destination) + if err != nil { + return errors.Wrap(err, "calling augmented AssignPropertiesTo() for conversion") + } + } + + // No error + return nil +} + // Storage version of v1api20230202preview.ManagedClusterOperatorSecrets type ManagedClusterOperatorSecrets struct { AdminCredentials *genruntime.SecretDestination `json:"adminCredentials,omitempty"` @@ -12685,6 +12806,11 @@ type augmentConversionForManagedClusterNATGatewayProfile_STATUS interface { AssignPropertiesTo(dst *v1api20230201s.ManagedClusterNATGatewayProfile_STATUS) error } +type augmentConversionForManagedClusterOperatorConfigMaps interface { + AssignPropertiesFrom(src *v1api20230201s.ManagedClusterOperatorConfigMaps) error + AssignPropertiesTo(dst *v1api20230201s.ManagedClusterOperatorConfigMaps) error +} + type augmentConversionForManagedClusterOperatorSecrets interface { AssignPropertiesFrom(src *v1api20230201s.ManagedClusterOperatorSecrets) error AssignPropertiesTo(dst *v1api20230201s.ManagedClusterOperatorSecrets) error diff --git a/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen_test.go b/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen_test.go index 4fbdec92ef..1076f296d2 100644 --- a/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen_test.go +++ b/v2/api/containerservice/v1api20230202previewstorage/managed_cluster_types_gen_test.go @@ -3993,6 +3993,7 @@ func ManagedClusterOperatorSpecGenerator() gopter.Gen { // AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForManagedClusterOperatorSpec(gens map[string]gopter.Gen) { + gens["ConfigMaps"] = gen.PtrOf(ManagedClusterOperatorConfigMapsGenerator()) gens["Secrets"] = gen.PtrOf(ManagedClusterOperatorSecretsGenerator()) } @@ -8214,6 +8215,103 @@ func AddRelatedPropertyGeneratorsForManagedClusterNATGatewayProfile_STATUS(gens gens["ManagedOutboundIPProfile"] = gen.PtrOf(ManagedClusterManagedOutboundIPProfile_STATUSGenerator()) } +func Test_ManagedClusterOperatorConfigMaps_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from ManagedClusterOperatorConfigMaps to ManagedClusterOperatorConfigMaps via AssignProperties_To_ManagedClusterOperatorConfigMaps & AssignProperties_From_ManagedClusterOperatorConfigMaps returns original", + prop.ForAll(RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps tests if a specific instance of ManagedClusterOperatorConfigMaps can be assigned to v1api20230201storage and back losslessly +func RunPropertyAssignmentTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1api20230201s.ManagedClusterOperatorConfigMaps + err := copied.AssignProperties_To_ManagedClusterOperatorConfigMaps(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual ManagedClusterOperatorConfigMaps + err = actual.AssignProperties_From_ManagedClusterOperatorConfigMaps(&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_ManagedClusterOperatorConfigMaps_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 ManagedClusterOperatorConfigMaps via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusterOperatorConfigMaps, ManagedClusterOperatorConfigMapsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusterOperatorConfigMaps runs a test to see if a specific instance of ManagedClusterOperatorConfigMaps round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusterOperatorConfigMaps(subject ManagedClusterOperatorConfigMaps) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusterOperatorConfigMaps + 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 ManagedClusterOperatorConfigMaps instances for property testing - lazily instantiated by +// ManagedClusterOperatorConfigMapsGenerator() +var managedClusterOperatorConfigMapsGenerator gopter.Gen + +// ManagedClusterOperatorConfigMapsGenerator returns a generator of ManagedClusterOperatorConfigMaps instances for property testing. +func ManagedClusterOperatorConfigMapsGenerator() gopter.Gen { + if managedClusterOperatorConfigMapsGenerator != nil { + return managedClusterOperatorConfigMapsGenerator + } + + generators := make(map[string]gopter.Gen) + managedClusterOperatorConfigMapsGenerator = gen.Struct(reflect.TypeOf(ManagedClusterOperatorConfigMaps{}), generators) + + return managedClusterOperatorConfigMapsGenerator +} + func Test_ManagedClusterOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/containerservice/v1api20230202previewstorage/structure.txt b/v2/api/containerservice/v1api20230202previewstorage/structure.txt index f33a26dd59..c4d1fc746d 100644 --- a/v2/api/containerservice/v1api20230202previewstorage/structure.txt +++ b/v2/api/containerservice/v1api20230202previewstorage/structure.txt @@ -291,7 +291,10 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre │ │ ├── OidcIssuerProfile: *Object (2 properties) │ │ │ ├── Enabled: *bool │ │ │ └── PropertyBag: genruntime.PropertyBag -│ │ ├── OperatorSpec: *Object (2 properties) +│ │ ├── OperatorSpec: *Object (3 properties) +│ │ │ ├── ConfigMaps: *Object (2 properties) +│ │ │ │ ├── OIDCIssuerProfile: *genruntime.ConfigMapDestination +│ │ │ │ └── PropertyBag: genruntime.PropertyBag │ │ │ ├── PropertyBag: genruntime.PropertyBag │ │ │ └── Secrets: *Object (3 properties) │ │ │ ├── AdminCredentials: *genruntime.SecretDestination @@ -1099,6 +1102,35 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre │ │ ├── DisableOutboundNat: *bool │ │ └── PropertyBag: genruntime.PropertyBag │ └── WorkloadRuntime: *string +├── TrustedAccessRoleBinding: Resource +│ ├── Owner: github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202preview.ManagedCluster +│ ├── Spec: Object (6 properties) +│ │ ├── AzureName: Validated (3 rules) +│ │ │ ├── Rule 0: MaxLength: 24 +│ │ │ ├── Rule 1: MinLength: 1 +│ │ │ └── Rule 2: Pattern: "^([A-Za-z0-9-])+$" +│ │ ├── OriginalVersion: string +│ │ ├── Owner: *genruntime.KnownResourceReference +│ │ ├── PropertyBag: genruntime.PropertyBag +│ │ ├── Roles: string[] +│ │ └── SourceResourceReference: *genruntime.ResourceReference +│ └── Status: Object (9 properties) +│ ├── Conditions: conditions.Condition[] +│ ├── Id: *string +│ ├── Name: *string +│ ├── PropertyBag: genruntime.PropertyBag +│ ├── ProvisioningState: *string +│ ├── Roles: string[] +│ ├── SourceResourceId: *string +│ ├── SystemData: *Object (7 properties) +│ │ ├── CreatedAt: *string +│ │ ├── CreatedBy: *string +│ │ ├── CreatedByType: *string +│ │ ├── LastModifiedAt: *string +│ │ ├── LastModifiedBy: *string +│ │ ├── LastModifiedByType: *string +│ │ └── PropertyBag: genruntime.PropertyBag +│ └── Type: *string ├── augmentConversionForAgentPoolUpgradeSettings: Interface ├── augmentConversionForAgentPoolUpgradeSettings_STATUS: Interface ├── augmentConversionForAzureKeyVaultKms: Interface @@ -1155,6 +1187,7 @@ github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202pre ├── augmentConversionForManagedClusterNATGatewayProfile_STATUS: Interface ├── augmentConversionForManagedClusterOIDCIssuerProfile: Interface ├── augmentConversionForManagedClusterOIDCIssuerProfile_STATUS: Interface +├── augmentConversionForManagedClusterOperatorConfigMaps: Interface ├── augmentConversionForManagedClusterOperatorSecrets: Interface ├── augmentConversionForManagedClusterOperatorSpec: Interface ├── augmentConversionForManagedClusterPodIdentity: Interface diff --git a/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen.go b/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen.go new file mode 100644 index 0000000000..e8e5be4b95 --- /dev/null +++ b/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen.go @@ -0,0 +1,214 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202previewstorage + +import ( + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +kubebuilder:rbac:groups=containerservice.azure.com,resources=trustedaccessrolebindings,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=containerservice.azure.com,resources={trustedaccessrolebindings/status,trustedaccessrolebindings/finalizers},verbs=get;update;patch + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Storage version of v1api20230202preview.TrustedAccessRoleBinding +// Generator information: +// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-02-02-preview/managedClusters.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName} +type TrustedAccessRoleBinding struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ManagedClusters_TrustedAccessRoleBinding_Spec `json:"spec,omitempty"` + Status ManagedClusters_TrustedAccessRoleBinding_STATUS `json:"status,omitempty"` +} + +var _ conditions.Conditioner = &TrustedAccessRoleBinding{} + +// GetConditions returns the conditions of the resource +func (binding *TrustedAccessRoleBinding) GetConditions() conditions.Conditions { + return binding.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (binding *TrustedAccessRoleBinding) SetConditions(conditions conditions.Conditions) { + binding.Status.Conditions = conditions +} + +var _ genruntime.KubernetesResource = &TrustedAccessRoleBinding{} + +// AzureName returns the Azure name of the resource +func (binding *TrustedAccessRoleBinding) AzureName() string { + return binding.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2023-02-02-preview" +func (binding TrustedAccessRoleBinding) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (binding *TrustedAccessRoleBinding) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (binding *TrustedAccessRoleBinding) GetSpec() genruntime.ConvertibleSpec { + return &binding.Spec +} + +// GetStatus returns the status of this resource +func (binding *TrustedAccessRoleBinding) GetStatus() genruntime.ConvertibleStatus { + return &binding.Status +} + +// GetType returns the ARM Type of the resource. This is always "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +func (binding *TrustedAccessRoleBinding) GetType() string { + return "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings" +} + +// NewEmptyStatus returns a new empty (blank) status +func (binding *TrustedAccessRoleBinding) NewEmptyStatus() genruntime.ConvertibleStatus { + return &ManagedClusters_TrustedAccessRoleBinding_STATUS{} +} + +// Owner returns the ResourceReference of the owner +func (binding *TrustedAccessRoleBinding) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(binding.Spec) + return &genruntime.ResourceReference{ + Group: group, + Kind: kind, + Name: binding.Spec.Owner.Name, + } +} + +// SetStatus sets the status of this resource +func (binding *TrustedAccessRoleBinding) SetStatus(status genruntime.ConvertibleStatus) error { + // If we have exactly the right type of status, assign it + if st, ok := status.(*ManagedClusters_TrustedAccessRoleBinding_STATUS); ok { + binding.Status = *st + return nil + } + + // Convert status to required version + var st ManagedClusters_TrustedAccessRoleBinding_STATUS + err := status.ConvertStatusTo(&st) + if err != nil { + return errors.Wrap(err, "failed to convert status") + } + + binding.Status = st + return nil +} + +// Hub marks that this TrustedAccessRoleBinding is the hub type for conversion +func (binding *TrustedAccessRoleBinding) Hub() {} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (binding *TrustedAccessRoleBinding) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: binding.Spec.OriginalVersion, + Kind: "TrustedAccessRoleBinding", + } +} + +// +kubebuilder:object:root=true +// Storage version of v1api20230202preview.TrustedAccessRoleBinding +// Generator information: +// - Generated from: /containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-02-02-preview/managedClusters.json +// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName} +type TrustedAccessRoleBindingList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []TrustedAccessRoleBinding `json:"items"` +} + +// Storage version of v1api20230202preview.ManagedClusters_TrustedAccessRoleBinding_Spec +type ManagedClusters_TrustedAccessRoleBinding_Spec struct { + // +kubebuilder:validation:MaxLength=24 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern="^([A-Za-z0-9-])+$" + // 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"` + 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 + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a containerservice.azure.com/ManagedCluster resource + Owner *genruntime.KnownResourceReference `group:"containerservice.azure.com" json:"owner,omitempty" kind:"ManagedCluster"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Roles []string `json:"roles,omitempty"` + + // +kubebuilder:validation:Required + // SourceResourceReference: The ARM resource ID of source resource that trusted access is configured for. + SourceResourceReference *genruntime.ResourceReference `armReference:"SourceResourceId" json:"sourceResourceReference,omitempty"` +} + +var _ genruntime.ConvertibleSpec = &ManagedClusters_TrustedAccessRoleBinding_Spec{} + +// ConvertSpecFrom populates our ManagedClusters_TrustedAccessRoleBinding_Spec from the provided source +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + if source == binding { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return source.ConvertSpecTo(binding) +} + +// ConvertSpecTo populates the provided destination from our ManagedClusters_TrustedAccessRoleBinding_Spec +func (binding *ManagedClusters_TrustedAccessRoleBinding_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + if destination == binding { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec") + } + + return destination.ConvertSpecFrom(binding) +} + +// Storage version of v1api20230202preview.ManagedClusters_TrustedAccessRoleBinding_STATUS +type ManagedClusters_TrustedAccessRoleBinding_STATUS struct { + Conditions []conditions.Condition `json:"conditions,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Roles []string `json:"roles,omitempty"` + SourceResourceId *string `json:"sourceResourceId,omitempty"` + SystemData *SystemData_STATUS `json:"systemData,omitempty"` + Type *string `json:"type,omitempty"` +} + +var _ genruntime.ConvertibleStatus = &ManagedClusters_TrustedAccessRoleBinding_STATUS{} + +// ConvertStatusFrom populates our ManagedClusters_TrustedAccessRoleBinding_STATUS from the provided source +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error { + if source == binding { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return source.ConvertStatusTo(binding) +} + +// ConvertStatusTo populates the provided destination from our ManagedClusters_TrustedAccessRoleBinding_STATUS +func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error { + if destination == binding { + return errors.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus") + } + + return destination.ConvertStatusFrom(binding) +} + +func init() { + SchemeBuilder.Register(&TrustedAccessRoleBinding{}, &TrustedAccessRoleBindingList{}) +} diff --git a/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen_test.go b/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen_test.go new file mode 100644 index 0000000000..ce455e8aaa --- /dev/null +++ b/v2/api/containerservice/v1api20230202previewstorage/trusted_access_role_binding_types_gen_test.go @@ -0,0 +1,223 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20230202previewstorage + +import ( + "encoding/json" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/kr/pretty" + "github.com/kylelemons/godebug/diff" + "github.com/leanovate/gopter" + "github.com/leanovate/gopter/gen" + "github.com/leanovate/gopter/prop" + "os" + "reflect" + "testing" +) + +func Test_TrustedAccessRoleBinding_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 20 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of TrustedAccessRoleBinding via JSON returns original", + prop.ForAll(RunJSONSerializationTestForTrustedAccessRoleBinding, TrustedAccessRoleBindingGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForTrustedAccessRoleBinding runs a test to see if a specific instance of TrustedAccessRoleBinding round trips to JSON and back losslessly +func RunJSONSerializationTestForTrustedAccessRoleBinding(subject TrustedAccessRoleBinding) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual TrustedAccessRoleBinding + 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 TrustedAccessRoleBinding instances for property testing - lazily instantiated by +// TrustedAccessRoleBindingGenerator() +var trustedAccessRoleBindingGenerator gopter.Gen + +// TrustedAccessRoleBindingGenerator returns a generator of TrustedAccessRoleBinding instances for property testing. +func TrustedAccessRoleBindingGenerator() gopter.Gen { + if trustedAccessRoleBindingGenerator != nil { + return trustedAccessRoleBindingGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding(generators) + trustedAccessRoleBindingGenerator = gen.Struct(reflect.TypeOf(TrustedAccessRoleBinding{}), generators) + + return trustedAccessRoleBindingGenerator +} + +// AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForTrustedAccessRoleBinding(gens map[string]gopter.Gen) { + gens["Spec"] = ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() + gens["Status"] = ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() +} + +func Test_ManagedClusters_TrustedAccessRoleBinding_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_Spec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec, ManagedClusters_TrustedAccessRoleBinding_SpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_Spec round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_Spec(subject ManagedClusters_TrustedAccessRoleBinding_Spec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_Spec + 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 ManagedClusters_TrustedAccessRoleBinding_Spec instances for property testing - lazily instantiated by +// ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() +var managedClusters_TrustedAccessRoleBinding_SpecGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_SpecGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_Spec instances for property testing. +func ManagedClusters_TrustedAccessRoleBinding_SpecGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_SpecGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_SpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec(generators) + managedClusters_TrustedAccessRoleBinding_SpecGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_Spec{}), generators) + + return managedClusters_TrustedAccessRoleBinding_SpecGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_Spec(gens map[string]gopter.Gen) { + gens["AzureName"] = gen.AlphaString() + gens["OriginalVersion"] = gen.AlphaString() + gens["Roles"] = gen.SliceOf(gen.AlphaString()) +} + +func Test_ManagedClusters_TrustedAccessRoleBinding_STATUS_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MinSuccessfulTests = 80 + parameters.MaxSize = 3 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of ManagedClusters_TrustedAccessRoleBinding_STATUS via JSON returns original", + prop.ForAll(RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS, ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS runs a test to see if a specific instance of ManagedClusters_TrustedAccessRoleBinding_STATUS round trips to JSON and back losslessly +func RunJSONSerializationTestForManagedClusters_TrustedAccessRoleBinding_STATUS(subject ManagedClusters_TrustedAccessRoleBinding_STATUS) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual ManagedClusters_TrustedAccessRoleBinding_STATUS + 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 ManagedClusters_TrustedAccessRoleBinding_STATUS instances for property testing - lazily instantiated by +// ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() +var managedClusters_TrustedAccessRoleBinding_STATUSGenerator gopter.Gen + +// ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator returns a generator of ManagedClusters_TrustedAccessRoleBinding_STATUS instances for property testing. +// We first initialize managedClusters_TrustedAccessRoleBinding_STATUSGenerator with a simplified generator based on the +// fields with primitive types then replacing it with a more complex one that also handles complex fields +// to ensure any cycles in the object graph properly terminate. +func ManagedClusters_TrustedAccessRoleBinding_STATUSGenerator() gopter.Gen { + if managedClusters_TrustedAccessRoleBinding_STATUSGenerator != nil { + return managedClusters_TrustedAccessRoleBinding_STATUSGenerator + } + + generators := make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + managedClusters_TrustedAccessRoleBinding_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS{}), generators) + + // The above call to gen.Struct() captures the map, so create a new one + generators = make(map[string]gopter.Gen) + AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(generators) + managedClusters_TrustedAccessRoleBinding_STATUSGenerator = gen.Struct(reflect.TypeOf(ManagedClusters_TrustedAccessRoleBinding_STATUS{}), generators) + + return managedClusters_TrustedAccessRoleBinding_STATUSGenerator +} + +// AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) + gens["Name"] = gen.PtrOf(gen.AlphaString()) + gens["ProvisioningState"] = gen.PtrOf(gen.AlphaString()) + gens["Roles"] = gen.SliceOf(gen.AlphaString()) + gens["SourceResourceId"] = gen.PtrOf(gen.AlphaString()) + gens["Type"] = gen.PtrOf(gen.AlphaString()) +} + +// AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForManagedClusters_TrustedAccessRoleBinding_STATUS(gens map[string]gopter.Gen) { + gens["SystemData"] = gen.PtrOf(SystemData_STATUSGenerator()) +} diff --git a/v2/api/containerservice/v1api20230202previewstorage/zz_generated.deepcopy.go b/v2/api/containerservice/v1api20230202previewstorage/zz_generated.deepcopy.go index 832640fe4b..1a7eca0785 100644 --- a/v2/api/containerservice/v1api20230202previewstorage/zz_generated.deepcopy.go +++ b/v2/api/containerservice/v1api20230202previewstorage/zz_generated.deepcopy.go @@ -3555,6 +3555,33 @@ func (in *ManagedClusterOIDCIssuerProfile_STATUS) DeepCopy() *ManagedClusterOIDC return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusterOperatorConfigMaps) DeepCopyInto(out *ManagedClusterOperatorConfigMaps) { + *out = *in + if in.OIDCIssuerProfile != nil { + in, out := &in.OIDCIssuerProfile, &out.OIDCIssuerProfile + *out = new(genruntime.ConfigMapDestination) + **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 ManagedClusterOperatorConfigMaps. +func (in *ManagedClusterOperatorConfigMaps) DeepCopy() *ManagedClusterOperatorConfigMaps { + if in == nil { + return nil + } + out := new(ManagedClusterOperatorConfigMaps) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSecrets) DeepCopyInto(out *ManagedClusterOperatorSecrets) { *out = *in @@ -3590,6 +3617,11 @@ func (in *ManagedClusterOperatorSecrets) DeepCopy() *ManagedClusterOperatorSecre // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManagedClusterOperatorSpec) DeepCopyInto(out *ManagedClusterOperatorSpec) { *out = *in + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = new(ManagedClusterOperatorConfigMaps) + (*in).DeepCopyInto(*out) + } if in.PropertyBag != nil { in, out := &in.PropertyBag, &out.PropertyBag *out = make(genruntime.PropertyBag, len(*in)) @@ -6459,6 +6491,107 @@ func (in *ManagedClusters_AgentPool_Spec) DeepCopy() *ManagedClusters_AgentPool_ return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_STATUS) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]conditions.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Id != nil { + in, out := &in.Id, &out.Id + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *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 + } + } + if in.ProvisioningState != nil { + in, out := &in.ProvisioningState, &out.ProvisioningState + *out = new(string) + **out = **in + } + if in.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceId != nil { + in, out := &in.SourceResourceId, &out.SourceResourceId + *out = new(string) + **out = **in + } + if in.SystemData != nil { + in, out := &in.SystemData, &out.SystemData + *out = new(SystemData_STATUS) + (*in).DeepCopyInto(*out) + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_STATUS. +func (in *ManagedClusters_TrustedAccessRoleBinding_STATUS) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_STATUS { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_STATUS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedClusters_TrustedAccessRoleBinding_Spec) DeepCopyInto(out *ManagedClusters_TrustedAccessRoleBinding_Spec) { + *out = *in + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(genruntime.KnownResourceReference) + **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.Roles != nil { + in, out := &in.Roles, &out.Roles + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SourceResourceReference != nil { + in, out := &in.SourceResourceReference, &out.SourceResourceReference + *out = new(genruntime.ResourceReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedClusters_TrustedAccessRoleBinding_Spec. +func (in *ManagedClusters_TrustedAccessRoleBinding_Spec) DeepCopy() *ManagedClusters_TrustedAccessRoleBinding_Spec { + if in == nil { + return nil + } + out := new(ManagedClusters_TrustedAccessRoleBinding_Spec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PortRange) DeepCopyInto(out *PortRange) { *out = *in @@ -7180,6 +7313,65 @@ func (in *SystemData_STATUS) DeepCopy() *SystemData_STATUS { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrustedAccessRoleBinding) DeepCopyInto(out *TrustedAccessRoleBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBinding. +func (in *TrustedAccessRoleBinding) DeepCopy() *TrustedAccessRoleBinding { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrustedAccessRoleBinding) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TrustedAccessRoleBindingList) DeepCopyInto(out *TrustedAccessRoleBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]TrustedAccessRoleBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedAccessRoleBindingList. +func (in *TrustedAccessRoleBindingList) DeepCopy() *TrustedAccessRoleBindingList { + if in == nil { + return nil + } + out := new(TrustedAccessRoleBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TrustedAccessRoleBindingList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UpgradeOverrideSettings) DeepCopyInto(out *UpgradeOverrideSettings) { *out = *in diff --git a/v2/api/containerservice/versions_matrix.md b/v2/api/containerservice/versions_matrix.md index 6741a5bf73..7005d82ae0 100644 --- a/v2/api/containerservice/versions_matrix.md +++ b/v2/api/containerservice/versions_matrix.md @@ -205,6 +205,8 @@ | ManagedClustersAgentPool | v1api20210501 | v1api20230201 | v1api20230202preview | v1beta20210501 | | ManagedClusters_AgentPool_STATUS | v1api20210501 | v1api20230201 | v1api20230202preview | v1beta20210501 | | ManagedClusters_AgentPool_Spec | v1api20210501 | v1api20230201 | v1api20230202preview | v1beta20210501 | +| ManagedClusters_TrustedAccessRoleBinding_STATUS | | | v1api20230202preview | | +| ManagedClusters_TrustedAccessRoleBinding_Spec | | | v1api20230202preview | | | NetworkDataplane | | | v1api20230202preview | | | NetworkDataplane_STATUS | | | v1api20230202preview | | | NetworkMode | | | v1api20230202preview | | @@ -248,6 +250,10 @@ | SystemData_CreatedByType_STATUS | | v1api20230201 | v1api20230202preview | | | SystemData_LastModifiedByType_STATUS | | v1api20230201 | v1api20230202preview | | | SystemData_STATUS | | v1api20230201 | v1api20230202preview | | +| TrustedAccessRoleBinding | | | v1api20230202preview | | +| TrustedAccessRoleBindingProperties | | | v1api20230202preview | | +| TrustedAccessRoleBindingProperties_ProvisioningState_STATUS | | | v1api20230202preview | | +| TrustedAccessRoleBindingProperties_STATUS | | | v1api20230202preview | | | UpgradeOverrideSettings | | | v1api20230202preview | | | UpgradeOverrideSettings_STATUS | | | v1api20230202preview | | | UserAssignedIdentity | v1api20210501 | v1api20230201 | v1api20230202preview | v1beta20210501 | diff --git a/v2/api/dbforpostgresql/customizations/flexible_server_extensions.go b/v2/api/dbforpostgresql/customizations/flexible_server_extensions.go index a73e75ceaa..21a2236094 100644 --- a/v2/api/dbforpostgresql/customizations/flexible_server_extensions.go +++ b/v2/api/dbforpostgresql/customizations/flexible_server_extensions.go @@ -17,10 +17,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" postgresql "github.com/Azure/azure-service-operator/v2/api/dbforpostgresql/v1api20210601storage" - "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/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/internal/set" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" "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/extensions" @@ -102,7 +103,7 @@ func (ext *FlexibleServerExtension) PreReconcileCheck( _ context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PreReconcileCheckFunc, diff --git a/v2/api/dbforpostgresql/customizations/flexible_servers_database_extensions.go b/v2/api/dbforpostgresql/customizations/flexible_servers_database_extensions.go index 4c4f988d06..f9b2e7e087 100644 --- a/v2/api/dbforpostgresql/customizations/flexible_servers_database_extensions.go +++ b/v2/api/dbforpostgresql/customizations/flexible_servers_database_extensions.go @@ -9,15 +9,15 @@ import ( "context" "fmt" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" - "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" - "github.com/go-logr/logr" api "github.com/Azure/azure-service-operator/v2/api/dbforpostgresql/v1api20210601" hub "github.com/Azure/azure-service-operator/v2/api/dbforpostgresql/v1api20210601storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" ) var _ extensions.PreReconciliationChecker = &FlexibleServersDatabaseExtension{} @@ -26,7 +26,7 @@ func (extension *FlexibleServersDatabaseExtension) PreReconcileCheck( _ context.Context, _ genruntime.MetaObject, owner genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PreReconcileCheckFunc, diff --git a/v2/api/dbforpostgresql/customizations/flexible_servers_firewall_rule_extensions.go b/v2/api/dbforpostgresql/customizations/flexible_servers_firewall_rule_extensions.go index 261d4a1b25..f12be14b58 100644 --- a/v2/api/dbforpostgresql/customizations/flexible_servers_firewall_rule_extensions.go +++ b/v2/api/dbforpostgresql/customizations/flexible_servers_firewall_rule_extensions.go @@ -9,14 +9,14 @@ import ( "context" "fmt" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" - "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" - "github.com/go-logr/logr" postgresql "github.com/Azure/azure-service-operator/v2/api/dbforpostgresql/v1api20210601storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" ) var _ extensions.PreReconciliationChecker = &FlexibleServersFirewallRuleExtension{} @@ -25,7 +25,7 @@ func (ext *FlexibleServersFirewallRuleExtension) PreReconcileCheck( _ context.Context, _ genruntime.MetaObject, owner genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PreReconcileCheckFunc, diff --git a/v2/api/managedidentity/v1api20220131preview/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1api20220131preview/federated_identity_credential_types_gen.go index fe0c02f401..6422f9b6d8 100644 --- a/v2/api/managedidentity/v1api20220131preview/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1api20220131preview/federated_identity_credential_types_gen.go @@ -225,7 +225,7 @@ func (credential *FederatedIdentityCredential) ValidateUpdate(old runtime.Object // createValidations validates the creation of the resource func (credential *FederatedIdentityCredential) createValidations() []func() error { - return []func() error{credential.validateResourceReferences} + return []func() error{credential.validateResourceReferences, credential.validateOptionalConfigMapReferences} } // deleteValidations validates the deletion of the resource @@ -239,7 +239,20 @@ func (credential *FederatedIdentityCredential) updateValidations() []func(old ru func(old runtime.Object) error { return credential.validateResourceReferences() }, - credential.validateWriteOnceProperties} + credential.validateWriteOnceProperties, + func(old runtime.Object) error { + return credential.validateOptionalConfigMapReferences() + }, + } +} + +// validateOptionalConfigMapReferences validates all optional configmap reference pairs to ensure that at most 1 is set +func (credential *FederatedIdentityCredential) validateOptionalConfigMapReferences() error { + refs, err := reflecthelpers.FindOptionalConfigMapReferences(&credential.Spec) + if err != nil { + return err + } + return genruntime.ValidateOptionalConfigMapReferences(refs) } // validateResourceReferences validates all resource references @@ -346,9 +359,11 @@ type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { // doesn't have to be. AzureName string `json:"azureName,omitempty"` - // +kubebuilder:validation:Required // Issuer: The URL of the issuer to be trusted. - Issuer *string `json:"issuer,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` + + // IssuerFromConfig: The URL of the issuer to be trusted. + IssuerFromConfig *genruntime.ConfigMapReference `json:"issuerFromConfig,omitempty" optionalConfigMapPair:"Issuer"` // +kubebuilder:validation:Required // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also @@ -356,9 +371,11 @@ type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { // reference to a managedidentity.azure.com/UserAssignedIdentity resource Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` - // +kubebuilder:validation:Required // Subject: The identifier of the external identity. - Subject *string `json:"subject,omitempty"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` + + // SubjectFromConfig: The identifier of the external identity. + SubjectFromConfig *genruntime.ConfigMapReference `json:"subjectFromConfig,omitempty" optionalConfigMapPair:"Subject"` } var _ genruntime.ARMTransformer = &UserAssignedIdentities_FederatedIdentityCredential_Spec{} @@ -376,7 +393,9 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Conve // Set property ‘Properties’: if credential.Audiences != nil || credential.Issuer != nil || - credential.Subject != nil { + credential.IssuerFromConfig != nil || + credential.Subject != nil || + credential.SubjectFromConfig != nil { result.Properties = &FederatedIdentityCredentialProperties_ARM{} } for _, item := range credential.Audiences { @@ -386,10 +405,26 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Conve issuer := *credential.Issuer result.Properties.Issuer = &issuer } + if credential.IssuerFromConfig != nil { + issuerValue, err := resolved.ResolvedConfigMaps.Lookup(*credential.IssuerFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property Issuer") + } + issuer := issuerValue + result.Properties.Issuer = &issuer + } if credential.Subject != nil { subject := *credential.Subject result.Properties.Subject = &subject } + if credential.SubjectFromConfig != nil { + subjectValue, err := resolved.ResolvedConfigMaps.Lookup(*credential.SubjectFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property Subject") + } + subject := subjectValue + result.Properties.Subject = &subject + } return result, nil } @@ -425,6 +460,8 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Popul } } + // no assignment for property ‘IssuerFromConfig’ + // Set property ‘Owner’: credential.Owner = &genruntime.KnownResourceReference{Name: owner.Name} @@ -437,6 +474,8 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Popul } } + // no assignment for property ‘SubjectFromConfig’ + // No error return nil } @@ -503,6 +542,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer credential.Issuer = genruntime.ClonePointerToString(source.Issuer) + // IssuerFromConfig + if source.IssuerFromConfig != nil { + issuerFromConfig := source.IssuerFromConfig.Copy() + credential.IssuerFromConfig = &issuerFromConfig + } else { + credential.IssuerFromConfig = nil + } + // Owner if source.Owner != nil { owner := source.Owner.Copy() @@ -514,6 +561,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject credential.Subject = genruntime.ClonePointerToString(source.Subject) + // SubjectFromConfig + if source.SubjectFromConfig != nil { + subjectFromConfig := source.SubjectFromConfig.Copy() + credential.SubjectFromConfig = &subjectFromConfig + } else { + credential.SubjectFromConfig = nil + } + // No error return nil } @@ -532,6 +587,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer destination.Issuer = genruntime.ClonePointerToString(credential.Issuer) + // IssuerFromConfig + if credential.IssuerFromConfig != nil { + issuerFromConfig := credential.IssuerFromConfig.Copy() + destination.IssuerFromConfig = &issuerFromConfig + } else { + destination.IssuerFromConfig = nil + } + // OriginalVersion destination.OriginalVersion = credential.OriginalVersion() @@ -546,6 +609,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject destination.Subject = genruntime.ClonePointerToString(credential.Subject) + // SubjectFromConfig + if credential.SubjectFromConfig != nil { + subjectFromConfig := credential.SubjectFromConfig.Copy() + destination.SubjectFromConfig = &subjectFromConfig + } else { + destination.SubjectFromConfig = nil + } + // Update the property bag if len(propertyBag) > 0 { destination.PropertyBag = propertyBag diff --git a/v2/api/managedidentity/v1api20220131preview/structure.txt b/v2/api/managedidentity/v1api20220131preview/structure.txt index ee3f1e1a2a..5eef9c935e 100644 --- a/v2/api/managedidentity/v1api20220131preview/structure.txt +++ b/v2/api/managedidentity/v1api20220131preview/structure.txt @@ -4,12 +4,14 @@ github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20220131prev │ └── "2022-01-31-preview" ├── FederatedIdentityCredential: Resource │ ├── Owner: UserAssignedIdentity -│ ├── Spec: Object (5 properties) +│ ├── Spec: Object (7 properties) │ │ ├── Audiences: string[] │ │ ├── AzureName: string │ │ ├── Issuer: *string +│ │ ├── IssuerFromConfig: *genruntime.ConfigMapReference │ │ ├── Owner: *genruntime.KnownResourceReference -│ │ └── Subject: *string +│ │ ├── Subject: *string +│ │ └── SubjectFromConfig: *genruntime.ConfigMapReference │ └── Status: Object (7 properties) │ ├── Audiences: string[] │ ├── Conditions: conditions.Condition[] diff --git a/v2/api/managedidentity/v1api20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go b/v2/api/managedidentity/v1api20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go index fb5d8b37a4..c08101c00c 100644 --- a/v2/api/managedidentity/v1api20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go +++ b/v2/api/managedidentity/v1api20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go @@ -35,8 +35,8 @@ type FederatedIdentityCredentialProperties_ARM struct { Audiences []string `json:"audiences,omitempty"` // Issuer: The URL of the issuer to be trusted. - Issuer *string `json:"issuer,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` // Subject: The identifier of the external identity. - Subject *string `json:"subject,omitempty"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` } diff --git a/v2/api/managedidentity/v1api20220131preview/zz_generated.deepcopy.go b/v2/api/managedidentity/v1api20220131preview/zz_generated.deepcopy.go index a7a6b41a6e..f98f6ee29f 100644 --- a/v2/api/managedidentity/v1api20220131preview/zz_generated.deepcopy.go +++ b/v2/api/managedidentity/v1api20220131preview/zz_generated.deepcopy.go @@ -235,6 +235,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.IssuerFromConfig != nil { + in, out := &in.IssuerFromConfig, &out.IssuerFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) @@ -245,6 +250,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.SubjectFromConfig != nil { + in, out := &in.SubjectFromConfig, &out.SubjectFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentities_FederatedIdentityCredential_Spec. diff --git a/v2/api/managedidentity/v1api20220131previewstorage/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1api20220131previewstorage/federated_identity_credential_types_gen.go index eb1522bc2b..432d903ca1 100644 --- a/v2/api/managedidentity/v1api20220131previewstorage/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1api20220131previewstorage/federated_identity_credential_types_gen.go @@ -145,17 +145,19 @@ type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { // 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"` - Issuer *string `json:"issuer,omitempty"` - OriginalVersion string `json:"originalVersion,omitempty"` + AzureName string `json:"azureName,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` + IssuerFromConfig *genruntime.ConfigMapReference `json:"issuerFromConfig,omitempty" optionalConfigMapPair:"Issuer"` + 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 // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a // reference to a managedidentity.azure.com/UserAssignedIdentity resource - Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Subject *string `json:"subject,omitempty"` + Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` + SubjectFromConfig *genruntime.ConfigMapReference `json:"subjectFromConfig,omitempty" optionalConfigMapPair:"Subject"` } var _ genruntime.ConvertibleSpec = &UserAssignedIdentities_FederatedIdentityCredential_Spec{} diff --git a/v2/api/managedidentity/v1api20220131previewstorage/structure.txt b/v2/api/managedidentity/v1api20220131previewstorage/structure.txt index 08e5d696ea..f9e0bb200a 100644 --- a/v2/api/managedidentity/v1api20220131previewstorage/structure.txt +++ b/v2/api/managedidentity/v1api20220131previewstorage/structure.txt @@ -4,14 +4,16 @@ github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20220131prev │ └── "2022-01-31-preview" └── FederatedIdentityCredential: Resource ├── Owner: github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20220131preview.UserAssignedIdentity - ├── Spec: Object (7 properties) + ├── Spec: Object (9 properties) │ ├── Audiences: string[] │ ├── AzureName: string │ ├── Issuer: *string + │ ├── IssuerFromConfig: *genruntime.ConfigMapReference │ ├── OriginalVersion: string │ ├── Owner: *genruntime.KnownResourceReference │ ├── PropertyBag: genruntime.PropertyBag - │ └── Subject: *string + │ ├── Subject: *string + │ └── SubjectFromConfig: *genruntime.ConfigMapReference └── Status: Object (8 properties) ├── Audiences: string[] ├── Conditions: conditions.Condition[] diff --git a/v2/api/managedidentity/v1api20220131previewstorage/zz_generated.deepcopy.go b/v2/api/managedidentity/v1api20220131previewstorage/zz_generated.deepcopy.go index addf0571a0..aa6078f384 100644 --- a/v2/api/managedidentity/v1api20220131previewstorage/zz_generated.deepcopy.go +++ b/v2/api/managedidentity/v1api20220131previewstorage/zz_generated.deepcopy.go @@ -147,6 +147,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.IssuerFromConfig != nil { + in, out := &in.IssuerFromConfig, &out.IssuerFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) @@ -164,6 +169,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.SubjectFromConfig != nil { + in, out := &in.SubjectFromConfig, &out.SubjectFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentities_FederatedIdentityCredential_Spec. diff --git a/v2/api/managedidentity/v1beta20220131preview/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1beta20220131preview/federated_identity_credential_types_gen.go index dfd7da2a38..a9daea6ec7 100644 --- a/v2/api/managedidentity/v1beta20220131preview/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1beta20220131preview/federated_identity_credential_types_gen.go @@ -226,7 +226,7 @@ func (credential *FederatedIdentityCredential) ValidateUpdate(old runtime.Object // createValidations validates the creation of the resource func (credential *FederatedIdentityCredential) createValidations() []func() error { - return []func() error{credential.validateResourceReferences} + return []func() error{credential.validateResourceReferences, credential.validateOptionalConfigMapReferences} } // deleteValidations validates the deletion of the resource @@ -240,7 +240,20 @@ func (credential *FederatedIdentityCredential) updateValidations() []func(old ru func(old runtime.Object) error { return credential.validateResourceReferences() }, - credential.validateWriteOnceProperties} + credential.validateWriteOnceProperties, + func(old runtime.Object) error { + return credential.validateOptionalConfigMapReferences() + }, + } +} + +// validateOptionalConfigMapReferences validates all optional configmap reference pairs to ensure that at most 1 is set +func (credential *FederatedIdentityCredential) validateOptionalConfigMapReferences() error { + refs, err := reflecthelpers.FindOptionalConfigMapReferences(&credential.Spec) + if err != nil { + return err + } + return genruntime.ValidateOptionalConfigMapReferences(refs) } // validateResourceReferences validates all resource references @@ -343,19 +356,17 @@ type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { // 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"` - - // +kubebuilder:validation:Required - Issuer *string `json:"issuer,omitempty"` + AzureName string `json:"azureName,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` + IssuerFromConfig *genruntime.ConfigMapReference `json:"issuerFromConfig,omitempty" optionalConfigMapPair:"Issuer"` // +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 // reference to a managedidentity.azure.com/UserAssignedIdentity resource - Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` - - // +kubebuilder:validation:Required - Subject *string `json:"subject,omitempty"` + Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` + SubjectFromConfig *genruntime.ConfigMapReference `json:"subjectFromConfig,omitempty" optionalConfigMapPair:"Subject"` } var _ genruntime.ARMTransformer = &UserAssignedIdentities_FederatedIdentityCredential_Spec{} @@ -373,7 +384,9 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Conve // Set property ‘Properties’: if credential.Audiences != nil || credential.Issuer != nil || - credential.Subject != nil { + credential.IssuerFromConfig != nil || + credential.Subject != nil || + credential.SubjectFromConfig != nil { result.Properties = &FederatedIdentityCredentialProperties_ARM{} } for _, item := range credential.Audiences { @@ -383,10 +396,26 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Conve issuer := *credential.Issuer result.Properties.Issuer = &issuer } + if credential.IssuerFromConfig != nil { + issuerValue, err := resolved.ResolvedConfigMaps.Lookup(*credential.IssuerFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property Issuer") + } + issuer := issuerValue + result.Properties.Issuer = &issuer + } if credential.Subject != nil { subject := *credential.Subject result.Properties.Subject = &subject } + if credential.SubjectFromConfig != nil { + subjectValue, err := resolved.ResolvedConfigMaps.Lookup(*credential.SubjectFromConfig) + if err != nil { + return nil, errors.Wrap(err, "looking up configmap for property Subject") + } + subject := subjectValue + result.Properties.Subject = &subject + } return result, nil } @@ -422,6 +451,8 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Popul } } + // no assignment for property ‘IssuerFromConfig’ + // Set property ‘Owner’: credential.Owner = &genruntime.KnownResourceReference{Name: owner.Name} @@ -434,6 +465,8 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Popul } } + // no assignment for property ‘SubjectFromConfig’ + // No error return nil } @@ -500,6 +533,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer credential.Issuer = genruntime.ClonePointerToString(source.Issuer) + // IssuerFromConfig + if source.IssuerFromConfig != nil { + issuerFromConfig := source.IssuerFromConfig.Copy() + credential.IssuerFromConfig = &issuerFromConfig + } else { + credential.IssuerFromConfig = nil + } + // Owner if source.Owner != nil { owner := source.Owner.Copy() @@ -511,6 +552,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject credential.Subject = genruntime.ClonePointerToString(source.Subject) + // SubjectFromConfig + if source.SubjectFromConfig != nil { + subjectFromConfig := source.SubjectFromConfig.Copy() + credential.SubjectFromConfig = &subjectFromConfig + } else { + credential.SubjectFromConfig = nil + } + // No error return nil } @@ -529,6 +578,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer destination.Issuer = genruntime.ClonePointerToString(credential.Issuer) + // IssuerFromConfig + if credential.IssuerFromConfig != nil { + issuerFromConfig := credential.IssuerFromConfig.Copy() + destination.IssuerFromConfig = &issuerFromConfig + } else { + destination.IssuerFromConfig = nil + } + // OriginalVersion destination.OriginalVersion = credential.OriginalVersion() @@ -543,6 +600,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject destination.Subject = genruntime.ClonePointerToString(credential.Subject) + // SubjectFromConfig + if credential.SubjectFromConfig != nil { + subjectFromConfig := credential.SubjectFromConfig.Copy() + destination.SubjectFromConfig = &subjectFromConfig + } else { + destination.SubjectFromConfig = nil + } + // Update the property bag if len(propertyBag) > 0 { destination.PropertyBag = propertyBag diff --git a/v2/api/managedidentity/v1beta20220131preview/structure.txt b/v2/api/managedidentity/v1beta20220131preview/structure.txt index 482b4412a9..58d562ef6a 100644 --- a/v2/api/managedidentity/v1beta20220131preview/structure.txt +++ b/v2/api/managedidentity/v1beta20220131preview/structure.txt @@ -4,12 +4,14 @@ github.com/Azure/azure-service-operator/v2/api/managedidentity/v1beta20220131pre │ └── "2022-01-31-preview" ├── FederatedIdentityCredential: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20220131preview.UserAssignedIdentity -│ ├── Spec: Object (5 properties) +│ ├── Spec: Object (7 properties) │ │ ├── Audiences: string[] │ │ ├── AzureName: string │ │ ├── Issuer: *string +│ │ ├── IssuerFromConfig: *genruntime.ConfigMapReference │ │ ├── Owner: *genruntime.KnownResourceReference -│ │ └── Subject: *string +│ │ ├── Subject: *string +│ │ └── SubjectFromConfig: *genruntime.ConfigMapReference │ └── Status: Object (7 properties) │ ├── Audiences: string[] │ ├── Conditions: conditions.Condition[] diff --git a/v2/api/managedidentity/v1beta20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go b/v2/api/managedidentity/v1beta20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go index a32cdbfabe..997817b4e9 100644 --- a/v2/api/managedidentity/v1beta20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go +++ b/v2/api/managedidentity/v1beta20220131preview/user_assigned_identities_federated_identity_credential_spec_arm_types_gen.go @@ -31,6 +31,6 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec_ARM) G // Deprecated version of FederatedIdentityCredentialProperties. Use v1api20220131preview.FederatedIdentityCredentialProperties instead type FederatedIdentityCredentialProperties_ARM struct { Audiences []string `json:"audiences,omitempty"` - Issuer *string `json:"issuer,omitempty"` - Subject *string `json:"subject,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` } diff --git a/v2/api/managedidentity/v1beta20220131preview/zz_generated.deepcopy.go b/v2/api/managedidentity/v1beta20220131preview/zz_generated.deepcopy.go index 228dde292c..14b60249a2 100644 --- a/v2/api/managedidentity/v1beta20220131preview/zz_generated.deepcopy.go +++ b/v2/api/managedidentity/v1beta20220131preview/zz_generated.deepcopy.go @@ -235,6 +235,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.IssuerFromConfig != nil { + in, out := &in.IssuerFromConfig, &out.IssuerFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) @@ -245,6 +250,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.SubjectFromConfig != nil { + in, out := &in.SubjectFromConfig, &out.SubjectFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentities_FederatedIdentityCredential_Spec. diff --git a/v2/api/managedidentity/v1beta20220131previewstorage/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1beta20220131previewstorage/federated_identity_credential_types_gen.go index f8cbc96a0f..29e8bcc9a2 100644 --- a/v2/api/managedidentity/v1beta20220131previewstorage/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1beta20220131previewstorage/federated_identity_credential_types_gen.go @@ -235,17 +235,19 @@ type UserAssignedIdentities_FederatedIdentityCredential_Spec struct { // 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"` - Issuer *string `json:"issuer,omitempty"` - OriginalVersion string `json:"originalVersion,omitempty"` + AzureName string `json:"azureName,omitempty"` + Issuer *string `json:"issuer,omitempty" optionalConfigMapPair:"Issuer"` + IssuerFromConfig *genruntime.ConfigMapReference `json:"issuerFromConfig,omitempty" optionalConfigMapPair:"Issuer"` + 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 // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a // reference to a managedidentity.azure.com/UserAssignedIdentity resource - Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - Subject *string `json:"subject,omitempty"` + Owner *genruntime.KnownResourceReference `group:"managedidentity.azure.com" json:"owner,omitempty" kind:"UserAssignedIdentity"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Subject *string `json:"subject,omitempty" optionalConfigMapPair:"Subject"` + SubjectFromConfig *genruntime.ConfigMapReference `json:"subjectFromConfig,omitempty" optionalConfigMapPair:"Subject"` } var _ genruntime.ConvertibleSpec = &UserAssignedIdentities_FederatedIdentityCredential_Spec{} @@ -312,6 +314,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer credential.Issuer = genruntime.ClonePointerToString(source.Issuer) + // IssuerFromConfig + if source.IssuerFromConfig != nil { + issuerFromConfig := source.IssuerFromConfig.Copy() + credential.IssuerFromConfig = &issuerFromConfig + } else { + credential.IssuerFromConfig = nil + } + // OriginalVersion credential.OriginalVersion = source.OriginalVersion @@ -326,6 +336,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject credential.Subject = genruntime.ClonePointerToString(source.Subject) + // SubjectFromConfig + if source.SubjectFromConfig != nil { + subjectFromConfig := source.SubjectFromConfig.Copy() + credential.SubjectFromConfig = &subjectFromConfig + } else { + credential.SubjectFromConfig = nil + } + // Update the property bag if len(propertyBag) > 0 { credential.PropertyBag = propertyBag @@ -360,6 +378,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Issuer destination.Issuer = genruntime.ClonePointerToString(credential.Issuer) + // IssuerFromConfig + if credential.IssuerFromConfig != nil { + issuerFromConfig := credential.IssuerFromConfig.Copy() + destination.IssuerFromConfig = &issuerFromConfig + } else { + destination.IssuerFromConfig = nil + } + // OriginalVersion destination.OriginalVersion = credential.OriginalVersion @@ -374,6 +400,14 @@ func (credential *UserAssignedIdentities_FederatedIdentityCredential_Spec) Assig // Subject destination.Subject = genruntime.ClonePointerToString(credential.Subject) + // SubjectFromConfig + if credential.SubjectFromConfig != nil { + subjectFromConfig := credential.SubjectFromConfig.Copy() + destination.SubjectFromConfig = &subjectFromConfig + } else { + destination.SubjectFromConfig = nil + } + // Update the property bag if len(propertyBag) > 0 { destination.PropertyBag = propertyBag diff --git a/v2/api/managedidentity/v1beta20220131previewstorage/structure.txt b/v2/api/managedidentity/v1beta20220131previewstorage/structure.txt index 498845ef4c..47495e936a 100644 --- a/v2/api/managedidentity/v1beta20220131previewstorage/structure.txt +++ b/v2/api/managedidentity/v1beta20220131previewstorage/structure.txt @@ -4,14 +4,16 @@ github.com/Azure/azure-service-operator/v2/api/managedidentity/v1beta20220131pre │ └── "2022-01-31-preview" ├── FederatedIdentityCredential: Resource │ ├── Owner: github.com/Azure/azure-service-operator/v2/api/managedidentity/v1api20220131preview.UserAssignedIdentity -│ ├── Spec: Object (7 properties) +│ ├── Spec: Object (9 properties) │ │ ├── Audiences: string[] │ │ ├── AzureName: string │ │ ├── Issuer: *string +│ │ ├── IssuerFromConfig: *genruntime.ConfigMapReference │ │ ├── OriginalVersion: string │ │ ├── Owner: *genruntime.KnownResourceReference │ │ ├── PropertyBag: genruntime.PropertyBag -│ │ └── Subject: *string +│ │ ├── Subject: *string +│ │ └── SubjectFromConfig: *genruntime.ConfigMapReference │ └── Status: Object (8 properties) │ ├── Audiences: string[] │ ├── Conditions: conditions.Condition[] diff --git a/v2/api/managedidentity/v1beta20220131previewstorage/zz_generated.deepcopy.go b/v2/api/managedidentity/v1beta20220131previewstorage/zz_generated.deepcopy.go index b35667583b..22e6cbea68 100644 --- a/v2/api/managedidentity/v1beta20220131previewstorage/zz_generated.deepcopy.go +++ b/v2/api/managedidentity/v1beta20220131previewstorage/zz_generated.deepcopy.go @@ -147,6 +147,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.IssuerFromConfig != nil { + in, out := &in.IssuerFromConfig, &out.IssuerFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } if in.Owner != nil { in, out := &in.Owner, &out.Owner *out = new(genruntime.KnownResourceReference) @@ -164,6 +169,11 @@ func (in *UserAssignedIdentities_FederatedIdentityCredential_Spec) DeepCopyInto( *out = new(string) **out = **in } + if in.SubjectFromConfig != nil { + in, out := &in.SubjectFromConfig, &out.SubjectFromConfig + *out = new(genruntime.ConfigMapReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAssignedIdentities_FederatedIdentityCredential_Spec. diff --git a/v2/api/network/customizations/private_endpoints_extensions.go b/v2/api/network/customizations/private_endpoints_extensions.go index ba3459e4a2..8273fe05ff 100644 --- a/v2/api/network/customizations/private_endpoints_extensions.go +++ b/v2/api/network/customizations/private_endpoints_extensions.go @@ -12,8 +12,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" network "github.com/Azure/azure-service-operator/v2/api/network/v1api20220701storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" - "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" ) @@ -24,7 +25,7 @@ func (extension *PrivateEndpointExtension) PostReconcileCheck( _ context.Context, obj genruntime.MetaObject, _ genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, _ extensions.PostReconcileCheckFunc) (extensions.PostReconcileCheckResult, error) { diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 7184511b50..2580e1eebd 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -580,7 +580,7 @@ status: # # $generatedConfigs: string> # The key of the map is the name of the property to export, the value of the map is a json-path like expression -# to the property to export. Currently only $.. snytax is supported. +# to the property to export. Currently only $.. syntax is supported. # Only valid for resources. # Example: # $generatedConfigs: @@ -944,6 +944,8 @@ objectModelConfiguration: $azureGeneratedSecrets: - AdminCredentials - UserCredentials + $generatedConfigs: + OIDCIssuerProfile: $.Status.OidcIssuerProfile.IssuerURL ManagedClusters_AgentPool: $exportAs: ManagedClustersAgentPool $supportedFrom: v2.0.0 @@ -960,12 +962,20 @@ objectModelConfiguration: $azureGeneratedSecrets: - AdminCredentials - UserCredentials + $generatedConfigs: + OIDCIssuerProfile: $.Status.OidcIssuerProfile.IssuerURL ManagedClusters_AgentPool: $exportAs: ManagedClustersAgentPool $supportedFrom: v2.0.0 ManagedClusterServicePrincipalProfile: Secret: $isSecret: true + ManagedClusters_TrustedAccessRoleBinding: + $exportAs: TrustedAccessRoleBinding + $supportedFrom: v2.2.0 + TrustedAccessRoleBindingProperties: + SourceResourceId: + $armReference: true PrivateLinkResource: Id: $armReference: true @@ -1287,6 +1297,12 @@ objectModelConfiguration: UserAssignedIdentities_FederatedIdentityCredential: $exportAs: FederatedIdentityCredential $supportedFrom: v2.0.0-beta.3 + FederatedIdentityCredentialProperties: + Issuer: + $importConfigMapMode: optional + Subject: + $importConfigMapMode: optional + machinelearningservices: 2021-07-01: AksNetworkingConfiguration: diff --git a/v2/cmd/controller/app/setup.go b/v2/cmd/controller/app/setup.go index dd07966043..d212c151bf 100644 --- a/v2/cmd/controller/app/setup.go +++ b/v2/cmd/controller/app/setup.go @@ -34,13 +34,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/reconcile" + . "github.com/Azure/azure-service-operator/v2/internal/logging" + asometrics "github.com/Azure/azure-service-operator/v2/internal/metrics" + armreconciler "github.com/Azure/azure-service-operator/v2/internal/reconcilers/arm" + + "github.com/Azure/azure-service-operator/v2/api" "github.com/Azure/azure-service-operator/v2/internal/config" "github.com/Azure/azure-service-operator/v2/internal/controllers" "github.com/Azure/azure-service-operator/v2/internal/crdmanagement" "github.com/Azure/azure-service-operator/v2/internal/identity" - . "github.com/Azure/azure-service-operator/v2/internal/logging" - asometrics "github.com/Azure/azure-service-operator/v2/internal/metrics" - armreconciler "github.com/Azure/azure-service-operator/v2/internal/reconcilers/arm" "github.com/Azure/azure-service-operator/v2/internal/reconcilers/generic" "github.com/Azure/azure-service-operator/v2/internal/util/interval" "github.com/Azure/azure-service-operator/v2/internal/util/kubeclient" @@ -66,6 +68,7 @@ func SetupPreUpgradeCheck(ctx context.Context) error { return errors.Wrap(err, "failed to list CRDs") } + scheme := api.CreateScheme() crdRegexp := regexp.MustCompile(`.*\.azure\.com`) var errs []error for _, crd := range list.Items { @@ -74,6 +77,11 @@ func SetupPreUpgradeCheck(ctx context.Context) error { continue } + if !scheme.Recognizes(crd.GroupVersionKind()) { + // Not one of our resources + continue + } + // If this CRD is annotated with "serviceoperator.azure.com/version", it must be >=2.0.0 and so safe // as we didn't start using this label until 2.0.0 if _, ok := crd.Labels[crdmanagement.ServiceOperatorVersionLabel]; ok { diff --git a/v2/internal/controllers/controller_resources_gen.go b/v2/internal/controllers/controller_resources_gen.go index 9f1011eada..c29ddd3cdd 100644 --- a/v2/internal/controllers/controller_resources_gen.go +++ b/v2/internal/controllers/controller_resources_gen.go @@ -317,6 +317,7 @@ func getKnownStorageTypes() []*registration.StorageType { }, }) result = append(result, ®istration.StorageType{Obj: new(containerservice_v1api20230201s.ManagedClustersAgentPool)}) + result = append(result, ®istration.StorageType{Obj: new(containerservice_v1api20230202ps.TrustedAccessRoleBinding)}) result = append(result, ®istration.StorageType{Obj: new(datafactory_v1api20180601s.Factory)}) result = append(result, ®istration.StorageType{Obj: new(dataprotection_v1api20230101s.BackupVault)}) result = append(result, ®istration.StorageType{Obj: new(dataprotection_v1api20230101s.BackupVaultsBackupPolicy)}) @@ -540,7 +541,25 @@ func getKnownStorageTypes() []*registration.StorageType { }) result = append(result, ®istration.StorageType{Obj: new(machinelearningservices_v1api20210701s.WorkspacesConnection)}) result = append(result, ®istration.StorageType{Obj: new(managedidentity_v1api20181130s.UserAssignedIdentity)}) - result = append(result, ®istration.StorageType{Obj: new(managedidentity_v1api20220131ps.FederatedIdentityCredential)}) + result = append(result, ®istration.StorageType{ + Obj: new(managedidentity_v1api20220131ps.FederatedIdentityCredential), + Indexes: []registration.Index{ + { + Key: ".spec.issuerFromConfig", + Func: indexManagedidentityFederatedIdentityCredentialIssuerFromConfig, + }, + { + Key: ".spec.subjectFromConfig", + Func: indexManagedidentityFederatedIdentityCredentialSubjectFromConfig, + }, + }, + Watches: []registration.Watch{ + { + Src: &source.Kind{Type: &v1.ConfigMap{}}, + MakeEventHandler: watchConfigMapsFactory([]string{".spec.issuerFromConfig", ".spec.subjectFromConfig"}, &managedidentity_v1api20220131ps.FederatedIdentityCredentialList{}), + }, + }, + }) result = append(result, ®istration.StorageType{Obj: new(network_v1api20180501s.DnsZone)}) result = append(result, ®istration.StorageType{Obj: new(network_v1api20180501s.DnsZonesAAAARecord)}) result = append(result, ®istration.StorageType{Obj: new(network_v1api20180501s.DnsZonesARecord)}) @@ -914,8 +933,16 @@ func getKnownTypes() []client.Object { result = append(result, new(containerservice_v1api20210501s.ManagedCluster), new(containerservice_v1api20210501s.ManagedClustersAgentPool)) result = append(result, new(containerservice_v1api20230201.ManagedCluster), new(containerservice_v1api20230201.ManagedClustersAgentPool)) result = append(result, new(containerservice_v1api20230201s.ManagedCluster), new(containerservice_v1api20230201s.ManagedClustersAgentPool)) - result = append(result, new(containerservice_v1api20230202p.ManagedCluster), new(containerservice_v1api20230202p.ManagedClustersAgentPool)) - result = append(result, new(containerservice_v1api20230202ps.ManagedCluster), new(containerservice_v1api20230202ps.ManagedClustersAgentPool)) + result = append( + result, + new(containerservice_v1api20230202p.ManagedCluster), + new(containerservice_v1api20230202p.ManagedClustersAgentPool), + new(containerservice_v1api20230202p.TrustedAccessRoleBinding)) + result = append( + result, + new(containerservice_v1api20230202ps.ManagedCluster), + new(containerservice_v1api20230202ps.ManagedClustersAgentPool), + new(containerservice_v1api20230202ps.TrustedAccessRoleBinding)) result = append(result, new(containerservice_v20210501.ManagedCluster), new(containerservice_v20210501.ManagedClustersAgentPool)) result = append(result, new(containerservice_v20210501s.ManagedCluster), new(containerservice_v20210501s.ManagedClustersAgentPool)) result = append(result, new(datafactory_v1api20180601.Factory)) @@ -1651,6 +1678,7 @@ func getResourceExtensions() []genruntime.ResourceExtension { result = append(result, &containerregistry_customizations.RegistryExtension{}) result = append(result, &containerservice_customizations.ManagedClusterExtension{}) result = append(result, &containerservice_customizations.ManagedClustersAgentPoolExtension{}) + result = append(result, &containerservice_customizations.TrustedAccessRoleBindingExtension{}) result = append(result, &datafactory_customizations.FactoryExtension{}) result = append(result, &dataprotection_customizations.BackupVaultExtension{}) result = append(result, &dataprotection_customizations.BackupVaultsBackupPolicyExtension{}) @@ -2344,6 +2372,30 @@ func indexMachinelearningservicesWorkspacesComputeVirtualMachinePassword(rawObj return obj.Spec.Properties.VirtualMachine.Properties.AdministratorAccount.Password.Index() } +// indexManagedidentityFederatedIdentityCredentialIssuerFromConfig an index function for managedidentity_v1api20220131ps.FederatedIdentityCredential .spec.issuerFromConfig +func indexManagedidentityFederatedIdentityCredentialIssuerFromConfig(rawObj client.Object) []string { + obj, ok := rawObj.(*managedidentity_v1api20220131ps.FederatedIdentityCredential) + if !ok { + return nil + } + if obj.Spec.IssuerFromConfig == nil { + return nil + } + return obj.Spec.IssuerFromConfig.Index() +} + +// indexManagedidentityFederatedIdentityCredentialSubjectFromConfig an index function for managedidentity_v1api20220131ps.FederatedIdentityCredential .spec.subjectFromConfig +func indexManagedidentityFederatedIdentityCredentialSubjectFromConfig(rawObj client.Object) []string { + obj, ok := rawObj.(*managedidentity_v1api20220131ps.FederatedIdentityCredential) + if !ok { + return nil + } + if obj.Spec.SubjectFromConfig == nil { + return nil + } + return obj.Spec.SubjectFromConfig.Index() +} + // indexNetworkDnsForwardingRuleSetsForwardingRuleIpAddressFromConfig an index function for network_v1api20220701s.DnsForwardingRuleSetsForwardingRule .spec.targetDnsServers.ipAddressFromConfig func indexNetworkDnsForwardingRuleSetsForwardingRuleIpAddressFromConfig(rawObj client.Object) []string { obj, ok := rawObj.(*network_v1api20220701s.DnsForwardingRuleSetsForwardingRule) diff --git a/v2/internal/controllers/crd_aks_managedcluster_20230102preview_test.go b/v2/internal/controllers/crd_aks_managedcluster_20230102preview_test.go index d4a6f5d0ab..5517b5b3eb 100644 --- a/v2/internal/controllers/crd_aks_managedcluster_20230102preview_test.go +++ b/v2/internal/controllers/crd_aks_managedcluster_20230102preview_test.go @@ -11,6 +11,7 @@ import ( . "github.com/onsi/gomega" aks "github.com/Azure/azure-service-operator/v2/api/containerservice/v1api20230202preview" + "github.com/Azure/azure-service-operator/v2/api/resources/v1api20200601" "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" @@ -62,6 +63,9 @@ func Test_AKS_ManagedCluster_20230202Preview_CRUD(t *testing.T) { Identity: &aks.ManagedClusterIdentity{ Type: &identityKind, }, + OidcIssuerProfile: &aks.ManagedClusterOIDCIssuerProfile{ + Enabled: to.Ptr(true), + }, }, } @@ -88,9 +92,15 @@ func Test_AKS_ManagedCluster_20230202Preview_CRUD(t *testing.T) { // Run sub tests tc.RunSubtests( testcommon.Subtest{ - Name: "AKS KubeConfig secret CRUD", + Name: "AKS KubeConfig secret & configmap CRUD", + Test: func(tc *testcommon.KubePerTestContext) { + AKS_ManagedCluster_Kubeconfig_20230102Preview_OperatorSpec(tc, cluster) + }, + }, + testcommon.Subtest{ + Name: "AKS RoleBinding CRUD", Test: func(tc *testcommon.KubePerTestContext) { - AKS_ManagedCluster_Kubeconfig_20230102Preview_Secrets(tc, cluster) + AKS_ManagedCluster_TrustedAccessRoleBinding_20230102Preview_CRUD(tc, rg, cluster) }, }) tc.RunParallelSubtests( @@ -149,10 +159,13 @@ func AKS_ManagedCluster_AgentPool_20230102Preview_CRUD(tc *testcommon.KubePerTes tc.Expect(agentPool.Status.NodeLabels).To(HaveKey("mylabel")) } -func AKS_ManagedCluster_Kubeconfig_20230102Preview_Secrets(tc *testcommon.KubePerTestContext, cluster *aks.ManagedCluster) { +func AKS_ManagedCluster_Kubeconfig_20230102Preview_OperatorSpec(tc *testcommon.KubePerTestContext, cluster *aks.ManagedCluster) { old := cluster.DeepCopy() secret := "kubeconfig" cluster.Spec.OperatorSpec = &aks.ManagedClusterOperatorSpec{ + ConfigMaps: &aks.ManagedClusterOperatorConfigMaps{ + OIDCIssuerProfile: &genruntime.ConfigMapDestination{Name: "oidc", Key: "issuer"}, + }, Secrets: &aks.ManagedClusterOperatorSecrets{ AdminCredentials: &genruntime.SecretDestination{Name: secret, Key: "admin"}, UserCredentials: &genruntime.SecretDestination{Name: secret, Key: "user"}, @@ -161,4 +174,58 @@ func AKS_ManagedCluster_Kubeconfig_20230102Preview_Secrets(tc *testcommon.KubePe tc.PatchResourceAndWait(old, cluster) tc.ExpectSecretHasKeys(secret, "admin", "user") + tc.ExpectConfigMapHasKeysAndValues("oidc", "issuer", *cluster.Status.OidcIssuerProfile.IssuerURL) +} + +func AKS_ManagedCluster_TrustedAccessRoleBinding_20230102Preview_CRUD( + tc *testcommon.KubePerTestContext, + resourceGroup *v1api20200601.ResourceGroup, + cluster *aks.ManagedCluster, +) { + + // Create a storage account and key vault to use for the workspace + sa := newStorageAccount(tc, resourceGroup) + tc.CreateResourceAndWait(sa) + + kv := newVault("kv", tc, resourceGroup) + tc.CreateResourceAndWait(kv) + + // Create workspace + workspace := newWorkspace( + tc, + testcommon.AsOwner(resourceGroup), + sa, + kv, + resourceGroup.Spec.Location, + ) + tc.CreateResourceAndWait(workspace) + + roleBinding := &aks.TrustedAccessRoleBinding{ + ObjectMeta: tc.MakeObjectMetaWithName("tarb"), + Spec: aks.ManagedClusters_TrustedAccessRoleBinding_Spec{ + Owner: testcommon.AsOwner(cluster), + Roles: []string{ + // Microsoft.MachineLearningServices/workspaces/mlworkload + workspace.GetType() + "/mlworkload", + }, + SourceResourceReference: tc.MakeReferenceFromResource(workspace), + }, + } + + // Create the role binding + tc.CreateResourceAndWait(roleBinding) + + // Clean up when we're done + defer tc.DeleteResourcesAndWait(roleBinding, workspace, kv, sa) + + // Perform a simple patch + old := roleBinding.DeepCopy() + roleBinding.Spec.Roles = []string{ + // Microsoft.MachineLearningServices/workspaces/inference-v1 + workspace.GetType() + "/inference-v1", + } + + tc.PatchResourceAndWait(old, roleBinding) + tc.Expect(roleBinding.Status.Roles).To(HaveLen(1)) + tc.Expect(roleBinding.Status.Roles[0]).To(Equal(roleBinding.Spec.Roles[0])) } diff --git a/v2/internal/controllers/crd_appconfiguration_configstore_test.go b/v2/internal/controllers/crd_appconfiguration_configstore_test.go index 2ed23ad2b8..495ba7bce8 100644 --- a/v2/internal/controllers/crd_appconfiguration_configstore_test.go +++ b/v2/internal/controllers/crd_appconfiguration_configstore_test.go @@ -22,8 +22,10 @@ import ( func Test_AppConfiguration_ConfigurationStore_CRUD(t *testing.T) { t.Parallel() - createModeDefault := appconfig.ConfigurationStoreProperties_CreateMode_Default - publicNetworkAccessDisabled := appconfig.ConfigurationStoreProperties_PublicNetworkAccess_Disabled + if *isLive { + t.Skip("can't run in live mode, as ConfigurationStore retains the name after deletion which results in conflicts") + } + publicNetworkAccessEnabled := appconfig.ConfigurationStoreProperties_PublicNetworkAccess_Enabled tc := globalTestContext.ForTest(t) @@ -33,13 +35,13 @@ func Test_AppConfiguration_ConfigurationStore_CRUD(t *testing.T) { TypeMeta: metav1.TypeMeta{}, ObjectMeta: tc.MakeObjectMeta("confstore"), Spec: appconfig.ConfigurationStore_Spec{ - CreateMode: &createModeDefault, + CreateMode: to.Ptr(appconfig.ConfigurationStoreProperties_CreateMode_Default), Location: tc.AzureRegion, Owner: testcommon.AsOwner(rg), Sku: &appconfig.Sku{ Name: to.Ptr("standard"), }, - PublicNetworkAccess: &publicNetworkAccessDisabled, + PublicNetworkAccess: to.Ptr(appconfig.ConfigurationStoreProperties_PublicNetworkAccess_Disabled), }, Status: appconfig.ConfigurationStore_STATUS{}, } diff --git a/v2/internal/controllers/crd_cache_redis_test.go b/v2/internal/controllers/crd_cache_redis_test.go index 80efc0d568..62a01dbf72 100644 --- a/v2/internal/controllers/crd_cache_redis_test.go +++ b/v2/internal/controllers/crd_cache_redis_test.go @@ -22,6 +22,10 @@ import ( func Test_Cache_Redis_CRUD(t *testing.T) { t.Parallel() + if *isLive { + t.Skip("can't run in live mode, redis server takes too long to be provisioned and deletion") + } + tc := globalTestContext.ForTest(t) rg := tc.CreateTestResourceGroupAndWait() diff --git a/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20210601_test.go b/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20210601_test.go index 6d8bae9681..3756ce91bc 100644 --- a/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20210601_test.go +++ b/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20210601_test.go @@ -21,6 +21,10 @@ import ( func Test_DBForPostgreSQL_FlexibleServer_20210601_CRUD(t *testing.T) { t.Parallel() + if *isLive { + t.Skip("can't run in live mode, postresql flexible server takes too long to be provisioned and deleted") + } + g := NewGomegaWithT(t) ctx := context.Background() tc := globalTestContext.ForTest(t) diff --git a/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20220120preview_test.go b/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20220120preview_test.go index 61fda2649f..11e982b5f0 100644 --- a/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20220120preview_test.go +++ b/v2/internal/controllers/crd_dbforpostgresql_flexibleserver_20220120preview_test.go @@ -22,6 +22,10 @@ import ( func Test_DBForPostgreSQL_FlexibleServer_20220120preview_CRUD(t *testing.T) { t.Parallel() + if *isLive { + t.Skip("can't run in live mode, postresql flexible server takes too long to be provisioned and deleted") + } + g := NewGomegaWithT(t) ctx := context.Background() tc := globalTestContext.ForTest(t) diff --git a/v2/internal/controllers/crd_keyvault_test.go b/v2/internal/controllers/crd_keyvault_test.go index 87518fbc95..083e1ccb89 100644 --- a/v2/internal/controllers/crd_keyvault_test.go +++ b/v2/internal/controllers/crd_keyvault_test.go @@ -36,6 +36,10 @@ func Test_KeyVault_Vault_FromConfig_CRUD(t *testing.T) { t.Parallel() + if *isLive { + t.Skip("can't run in live mode, as KeyVault reserves the name unless manually purged") + } + tc := globalTestContext.ForTest(t) rg := tc.CreateTestResourceGroupAndWait() diff --git a/v2/internal/controllers/crd_machinelearningservices_test.go b/v2/internal/controllers/crd_machinelearningservices_test.go index 8001d27b92..cd7d0ece76 100644 --- a/v2/internal/controllers/crd_machinelearningservices_test.go +++ b/v2/internal/controllers/crd_machinelearningservices_test.go @@ -22,6 +22,10 @@ import ( func Test_MachineLearning_Workspaces_CRUD(t *testing.T) { t.Parallel() + if *isLive { + t.Skip("can't run in live mode, as this test is creates a KeyVault which reserves the name unless manually purged") + } + tc := globalTestContext.ForTest(t) rg := tc.CreateTestResourceGroupAndWait() diff --git a/v2/internal/controllers/crd_sql_server_test.go b/v2/internal/controllers/crd_sql_server_test.go index a4dc4bf682..040851c11d 100644 --- a/v2/internal/controllers/crd_sql_server_test.go +++ b/v2/internal/controllers/crd_sql_server_test.go @@ -132,13 +132,7 @@ func Test_SQL_Server_CRUD(t *testing.T) { armId := *server.Status.Id tc.DeleteResourceAndWait(server) - - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } func SQL_Server_ConnectionPolicy_CRUD(tc *testcommon.KubePerTestContext, server *sql.Server) { @@ -240,12 +234,7 @@ func SQL_Server_FirewallRules_CRUD(tc *testcommon.KubePerTestContext, server *sq armId := *firewall.Status.Id tc.DeleteResourceAndWait(firewall) - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } func SQL_Server_IPV6_FirewallRules_CRUD(tc *testcommon.KubePerTestContext, server *sql.Server) { @@ -264,12 +253,7 @@ func SQL_Server_IPV6_FirewallRules_CRUD(tc *testcommon.KubePerTestContext, serve armId := *firewall.Status.Id tc.DeleteResourceAndWait(firewall) - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } func SQL_Server_AuditingSetting_CRUD(tc *testcommon.KubePerTestContext, server *sql.Server, storageDetails vulnStorageAccountDetails) { @@ -404,12 +388,7 @@ func SQL_Server_ElasticPool_CRUD(tc *testcommon.KubePerTestContext, server *sql. armId := *elasticPool.Status.Id tc.DeleteResourceAndWait(elasticPool) - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } // See https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.web/asev2-appservice-sql-vpngw/azuredeploy.json @@ -430,12 +409,7 @@ func SQL_Server_VirtualNetworkRule_CRUD(tc *testcommon.KubePerTestContext, serve armId := *vnetRule.Status.Id tc.DeleteResourceAndWait(vnetRule) - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } // See https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.sql/sql-database-transparent-encryption-create/azuredeploy.json @@ -496,12 +470,7 @@ func SQL_Databases_CRUD(tc *testcommon.KubePerTestContext, server *sql.Server, s ) tc.DeleteResourceAndWait(db) - exists, _, err := tc.AzureClient.HeadByID( - tc.Ctx, - armId, - string(sql.APIVersion_Value)) - tc.Expect(err).ToNot(HaveOccurred()) - tc.Expect(exists).To(BeFalse()) + tc.ExpectResourceIsDeletedInAzure(armId, string(sql.APIVersion_Value)) } func SQL_BackupLongTermRetention_CRUD(tc *testcommon.KubePerTestContext, db *sql.ServersDatabase) { diff --git a/v2/internal/controllers/crd_subscription_alias_test.go b/v2/internal/controllers/crd_subscription_alias_test.go index 1383487f9a..47752a69db 100644 --- a/v2/internal/controllers/crd_subscription_alias_test.go +++ b/v2/internal/controllers/crd_subscription_alias_test.go @@ -25,16 +25,16 @@ import ( func Test_SubscriptionAndAlias_CRUD(t *testing.T) { t.Parallel() + if *isLive == true { + t.Skip("Can't run in live mode as our tenant doesn't support subscription creation") + } + tc := globalTestContext.ForTest(t) if tc.AzureBillingInvoiceID == "" { t.Fatalf("%q enviornment variable must be set", testcommon.TestBillingIDVar) } - if *isLive == true { - t.Skip("Can't run in live mode as our tenant doesn't support subscription creation") - } - // TODO: Once ManagedIdentity is registered in our sub, we can use this instead of the hardcoded identity below // TODO: There's an issue registering it right now though so for now using a hardcoded identity //rg := tc.CreateTestResourceGroupAndWait() diff --git a/v2/internal/controllers/recordings/Test_AKS_ManagedCluster_20230202Preview_CRUD.yaml b/v2/internal/controllers/recordings/Test_AKS_ManagedCluster_20230202Preview_CRUD.yaml index f7afc0a04c..3c3ab30cf8 100644 --- a/v2/internal/controllers/recordings/Test_AKS_ManagedCluster_20230202Preview_CRUD.yaml +++ b/v2/internal/controllers/recordings/Test_AKS_ManagedCluster_20230202Preview_CRUD.yaml @@ -101,13 +101,13 @@ interactions: duration: "" - request: body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"asotest-mc-sgohla","properties":{"agentPoolProfiles":[{"count":1,"mode":"System","name":"ap1","osType":"Linux","vmSize":"Standard_DS2_v2"}],"dnsPrefix":"aso","linuxProfile":{"adminUsername":"adminUser","ssh":{"publicKeys":[{"keyData":"ssh-rsa - {KEY}\n"}]}}}}' + {KEY}\n"}]}},"oidcIssuerProfile":{"enabled":true}}}' form: {} headers: Accept: - application/json Content-Length: - - "691" + - "728" Content-Type: - application/json Test-Request-Attempt: @@ -126,11 +126,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -145,12 +145,12 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -208,13 +208,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -224,11 +225,11 @@ interactions: } headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 Cache-Control: - no-cache Content-Length: - - "2989" + - "3122" Content-Type: - application/json Expires: @@ -250,12 +251,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -285,12 +286,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -320,12 +321,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -355,12 +356,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -390,12 +391,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -425,12 +426,12 @@ interactions: headers: Test-Request-Attempt: - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -460,12 +461,12 @@ interactions: headers: Test-Request-Attempt: - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -495,12 +496,12 @@ interactions: headers: Test-Request-Attempt: - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -530,14 +531,15 @@ interactions: headers: Test-Request-Attempt: - "8" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/3770ad28-14ae-4b12-b46b-a61e565339c9?api-version=2016-03-30 method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "name": "28ad7037-ae14-124b-b46b-a61e565339c9", + "status": "Succeeded", + "startTime": "2001-02-03T04:05:06Z", + "endTime": "2001-02-03T04:05:06Z" } headers: Cache-Control: @@ -564,15 +566,129 @@ interactions: form: {} headers: Test-Request-Attempt: - - "9" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla", + "location": "westus3", + "name": "asotest-mc-sgohla", + "type": "Microsoft.ContainerService/ManagedClusters", + "properties": { + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", + "dnsPrefix": "aso", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", + "agentPoolProfiles": [ + { + "name": "ap1", + "count": 1, + "vmSize": "Standard_DS2_v2", + "osDiskSizeGB": 128, + "osDiskType": "Managed", + "kubeletDiskType": "OS", + "maxPods": 110, + "type": "VirtualMachineScaleSets", + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", + "mode": "System", + "osType": "Linux", + "osSKU": "Ubuntu", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", + "enableFIPS": false + } + ], + "linuxProfile": { + "adminUsername": "adminUser", + "ssh": { + "publicKeys": [ + { + "keyData": "ssh-rsa {KEY}\n" + } + ] + } + }, + "servicePrincipalProfile": { + "clientId": "msi" + }, + "nodeResourceGroup": "MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3", + "enableRBAC": true, + "networkProfile": { + "networkPlugin": "kubenet", + "loadBalancerSku": "Standard", + "loadBalancerProfile": { + "managedOutboundIPs": { + "count": 1 + }, + "effectiveOutboundIPs": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" + } + ], + "backendPoolType": "nodeIPConfiguration" + }, + "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", + "outboundType": "loadBalancer", + "podCidrs": [ + "10.244.0.0/16" + ], + "serviceCidrs": [ + "10.0.0.0/16" + ], + "ipFamilies": [ + "IPv4" + ] + }, + "maxAgentPools": 100, + "identityProfile": { + "kubeletidentity": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" + } + }, + "securityProfile": {}, + "storageProfile": { + "diskCSIDriver": { + "enabled": true, + "version": "v1" + }, + "fileCSIDriver": { + "enabled": true + }, + "snapshotController": { + "enabled": true + } + }, + "oidcIssuerProfile": { + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" + }, + "workloadAutoScalerProfile": {} + }, + "identity": { + "type": "SystemAssigned", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "sku": { + "name": "Base", + "tier": "Free" + } } headers: Cache-Control: @@ -598,16 +714,132 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "10" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview method: GET response: body: |- { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla", + "location": "westus3", + "name": "asotest-mc-sgohla", + "type": "Microsoft.ContainerService/ManagedClusters", + "properties": { + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", + "dnsPrefix": "aso", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", + "agentPoolProfiles": [ + { + "name": "ap1", + "count": 1, + "vmSize": "Standard_DS2_v2", + "osDiskSizeGB": 128, + "osDiskType": "Managed", + "kubeletDiskType": "OS", + "maxPods": 110, + "type": "VirtualMachineScaleSets", + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", + "mode": "System", + "osType": "Linux", + "osSKU": "Ubuntu", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", + "enableFIPS": false + } + ], + "linuxProfile": { + "adminUsername": "adminUser", + "ssh": { + "publicKeys": [ + { + "keyData": "ssh-rsa {KEY}\n" + } + ] + } + }, + "servicePrincipalProfile": { + "clientId": "msi" + }, + "nodeResourceGroup": "MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3", + "enableRBAC": true, + "networkProfile": { + "networkPlugin": "kubenet", + "loadBalancerSku": "Standard", + "loadBalancerProfile": { + "managedOutboundIPs": { + "count": 1 + }, + "effectiveOutboundIPs": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" + } + ], + "backendPoolType": "nodeIPConfiguration" + }, + "podCidr": "10.244.0.0/16", + "serviceCidr": "10.0.0.0/16", + "dnsServiceIP": "10.0.0.10", + "dockerBridgeCidr": "172.17.0.1/16", + "outboundType": "loadBalancer", + "podCidrs": [ + "10.244.0.0/16" + ], + "serviceCidrs": [ + "10.0.0.0/16" + ], + "ipFamilies": [ + "IPv4" + ] + }, + "maxAgentPools": 100, + "identityProfile": { + "kubeletidentity": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" + } + }, + "securityProfile": {}, + "storageProfile": { + "diskCSIDriver": { + "enabled": true, + "version": "v1" + }, + "fileCSIDriver": { + "enabled": true + }, + "snapshotController": { + "enabled": true + } + }, + "oidcIssuerProfile": { + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" + }, + "workloadAutoScalerProfile": {} + }, + "identity": { + "type": "SystemAssigned", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "sku": { + "name": "Base", + "tier": "Free" + } } headers: Cache-Control: @@ -633,220 +865,11 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "11" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "12" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - 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/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - 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/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "15" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "16" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11ca8e0e-9051-425e-a144-875870732210?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "0e8eca11-5190-5e42-a144-875870732210", - "status": "Succeeded", - "startTime": "2001-02-03T04:05:06Z", - "endTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview method: GET response: body: |- @@ -860,11 +883,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -879,12 +902,12 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -912,7 +935,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -936,8 +959,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -954,13 +977,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -989,15 +1013,20 @@ interactions: code: 200 duration: "" - request: - body: "" + body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"asotest-mc-sgohla","properties":{"agentPoolProfiles":[{"count":1,"mode":"System","name":"ap1","osType":"Linux","vmSize":"Standard_DS2_v2"}],"dnsPrefix":"aso","linuxProfile":{"adminUsername":"adminUser","ssh":{"publicKeys":[{"keyData":"ssh-rsa + {KEY}\n"}]}},"oidcIssuerProfile":{"enabled":true}},"sku":{"name":"Base","tier":"Standard"}}' form: {} headers: Accept: - application/json + Content-Length: + - "768" + Content-Type: + - application/json Test-Request-Attempt: - - "2" + - "1" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview - method: GET + method: PUT response: body: |- { @@ -1006,15 +1035,15 @@ interactions: "name": "asotest-mc-sgohla", "type": "Microsoft.ContainerService/ManagedClusters", "properties": { - "provisioningState": "Succeeded", + "provisioningState": "Updating", "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -1025,16 +1054,17 @@ interactions: "kubeletDiskType": "OS", "maxPods": 110, "type": "VirtualMachineScaleSets", - "provisioningState": "Succeeded", + "provisioningState": "Updating", "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", + "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -1062,7 +1092,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -1086,8 +1116,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -1104,21 +1134,24 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { "name": "Base", - "tier": "Free" + "tier": "Standard" } } headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 Cache-Control: - no-cache Content-Type: @@ -1142,291 +1175,53 @@ interactions: body: "" form: {} headers: - Accept: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 + method: GET + response: + body: |- + { + "name": "167797d8-4856-f643-b253-16977d97248c", + "status": "InProgress", + "startTime": "2001-02-03T04:05:06Z" + } + headers: + Cache-Control: + - no-cache + Content-Type: - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla", - "location": "westus3", - "name": "asotest-mc-sgohla", - "type": "Microsoft.ContainerService/ManagedClusters", - "properties": { - "provisioningState": "Succeeded", - "powerState": { - "code": "Running" - }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", - "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", - "agentPoolProfiles": [ - { - "name": "ap1", - "count": 1, - "vmSize": "Standard_DS2_v2", - "osDiskSizeGB": 128, - "osDiskType": "Managed", - "kubeletDiskType": "OS", - "maxPods": 110, - "type": "VirtualMachineScaleSets", - "provisioningState": "Succeeded", - "powerState": { - "code": "Running" - }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", - "mode": "System", - "osType": "Linux", - "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", - "enableFIPS": false - } - ], - "linuxProfile": { - "adminUsername": "adminUser", - "ssh": { - "publicKeys": [ - { - "keyData": "ssh-rsa {KEY}\n" - } - ] - } - }, - "servicePrincipalProfile": { - "clientId": "msi" - }, - "nodeResourceGroup": "MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3", - "enableRBAC": true, - "networkProfile": { - "networkPlugin": "kubenet", - "loadBalancerSku": "Standard", - "loadBalancerProfile": { - "managedOutboundIPs": { - "count": 1 - }, - "effectiveOutboundIPs": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" - } - ], - "backendPoolType": "nodeIPConfiguration" - }, - "podCidr": "10.244.0.0/16", - "serviceCidr": "10.0.0.0/16", - "dnsServiceIP": "10.0.0.10", - "dockerBridgeCidr": "172.17.0.1/16", - "outboundType": "loadBalancer", - "podCidrs": [ - "10.244.0.0/16" - ], - "serviceCidrs": [ - "10.0.0.0/16" - ], - "ipFamilies": [ - "IPv4" - ] - }, - "maxAgentPools": 100, - "identityProfile": { - "kubeletidentity": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" - } - }, - "securityProfile": {}, - "storageProfile": { - "diskCSIDriver": { - "enabled": true, - "version": "v1" - }, - "fileCSIDriver": { - "enabled": true - }, - "snapshotController": { - "enabled": true - } - }, - "oidcIssuerProfile": { - "enabled": false - }, - "workloadAutoScalerProfile": {} - }, - "identity": { - "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", - "tenantId": "00000000-0000-0000-0000-000000000000" - }, - "sku": { - "name": "Base", - "tier": "Free" - } - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"asotest-mc-sgohla","properties":{"agentPoolProfiles":[{"count":1,"mode":"System","name":"ap1","osType":"Linux","vmSize":"Standard_DS2_v2"}],"dnsPrefix":"aso","linuxProfile":{"adminUsername":"adminUser","ssh":{"publicKeys":[{"keyData":"ssh-rsa - {KEY}\n"}]}}},"sku":{"name":"Base","tier":"Standard"}}' - form: {} - headers: - Accept: - - application/json - Content-Length: - - "731" - Content-Type: - - application/json - Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview - method: PUT - response: - body: |- - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla", - "location": "westus3", - "name": "asotest-mc-sgohla", - "type": "Microsoft.ContainerService/ManagedClusters", - "properties": { - "provisioningState": "Updating", - "powerState": { - "code": "Running" - }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", - "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", - "agentPoolProfiles": [ - { - "name": "ap1", - "count": 1, - "vmSize": "Standard_DS2_v2", - "osDiskSizeGB": 128, - "osDiskType": "Managed", - "kubeletDiskType": "OS", - "maxPods": 110, - "type": "VirtualMachineScaleSets", - "provisioningState": "Updating", - "powerState": { - "code": "Running" - }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", - "enableCustomCATrust": false, - "mode": "System", - "osType": "Linux", - "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", - "enableFIPS": false - } - ], - "linuxProfile": { - "adminUsername": "adminUser", - "ssh": { - "publicKeys": [ - { - "keyData": "ssh-rsa {KEY}\n" - } - ] - } - }, - "servicePrincipalProfile": { - "clientId": "msi" - }, - "nodeResourceGroup": "MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3", - "enableRBAC": true, - "networkProfile": { - "networkPlugin": "kubenet", - "loadBalancerSku": "Standard", - "loadBalancerProfile": { - "managedOutboundIPs": { - "count": 1 - }, - "effectiveOutboundIPs": [ - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" - } - ], - "backendPoolType": "nodeIPConfiguration" - }, - "podCidr": "10.244.0.0/16", - "serviceCidr": "10.0.0.0/16", - "dnsServiceIP": "10.0.0.10", - "dockerBridgeCidr": "172.17.0.1/16", - "outboundType": "loadBalancer", - "podCidrs": [ - "10.244.0.0/16" - ], - "serviceCidrs": [ - "10.0.0.0/16" - ], - "ipFamilies": [ - "IPv4" - ] - }, - "maxAgentPools": 100, - "identityProfile": { - "kubeletidentity": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" - } - }, - "securityProfile": {}, - "storageProfile": { - "diskCSIDriver": { - "enabled": true, - "version": "v1" - }, - "fileCSIDriver": { - "enabled": true - }, - "snapshotController": { - "enabled": true - } - }, - "oidcIssuerProfile": { - "enabled": false - }, - "workloadAutoScalerProfile": {} - }, - "identity": { - "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", - "tenantId": "00000000-0000-0000-0000-000000000000" - }, - "sku": { - "name": "Base", - "tier": "Standard" - } + "name": "167797d8-4856-f643-b253-16977d97248c", + "status": "InProgress", + "startTime": "2001-02-03T04:05:06Z" } headers: - Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 Cache-Control: - no-cache Content-Type: @@ -1451,13 +1246,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", + "name": "167797d8-4856-f643-b253-16977d97248c", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1486,13 +1281,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", + "name": "167797d8-4856-f643-b253-16977d97248c", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1521,13 +1316,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", + "name": "167797d8-4856-f643-b253-16977d97248c", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1556,13 +1351,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", + "name": "167797d8-4856-f643-b253-16977d97248c", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1591,13 +1386,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", + "name": "167797d8-4856-f643-b253-16977d97248c", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1626,15 +1421,16 @@ interactions: form: {} headers: Test-Request-Attempt: - - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d8977716-5648-43f6-b253-16977d97248c?api-version=2016-03-30 method: GET response: body: |- { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "name": "167797d8-4856-f643-b253-16977d97248c", + "status": "Succeeded", + "startTime": "2001-02-03T04:05:06Z", + "endTime": "2001-02-03T04:05:06Z" } headers: Cache-Control: @@ -1661,79 +1457,8 @@ interactions: form: {} headers: Test-Request-Attempt: - - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/85daeda9-c007-4371-bc1f-fb636a2c3313?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "a9edda85-07c0-7143-bc1f-fb636a2c3313", - "status": "Succeeded", - "startTime": "2001-02-03T04:05:06Z", - "endTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla?api-version=2023-02-02-preview method: GET response: body: |- @@ -1747,11 +1472,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -1766,13 +1491,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -1800,7 +1525,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -1824,8 +1549,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -1842,13 +1567,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -1898,11 +1624,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -1917,13 +1643,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -1951,7 +1677,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -1975,8 +1701,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -1993,13 +1719,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -2049,11 +1776,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -2068,13 +1795,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -2102,7 +1829,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -2126,8 +1853,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -2144,13 +1871,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -2180,13 +1908,13 @@ interactions: duration: "" - request: body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"asotest-mc-sgohla","properties":{"agentPoolProfiles":[{"count":1,"mode":"System","name":"ap1","osType":"Linux","vmSize":"Standard_DS2_v2"}],"dnsPrefix":"aso","linuxProfile":{"adminUsername":"adminUser","ssh":{"publicKeys":[{"keyData":"ssh-rsa - {KEY}\n"}]}}},"sku":{"name":"Base","tier":"Standard"}}' + {KEY}\n"}]}},"oidcIssuerProfile":{"enabled":true}},"sku":{"name":"Base","tier":"Standard"}}' form: {} headers: Accept: - application/json Content-Length: - - "731" + - "768" Content-Type: - application/json Test-Request-Attempt: @@ -2205,11 +1933,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -2224,13 +1952,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -2258,7 +1986,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -2282,8 +2010,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -2300,13 +2028,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -2316,7 +2045,7 @@ interactions: } headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 Cache-Control: - no-cache Content-Type: @@ -2342,12 +2071,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2377,12 +2106,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2412,12 +2141,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2447,12 +2176,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2482,12 +2211,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2517,12 +2246,12 @@ interactions: headers: Test-Request-Attempt: - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -2552,12 +2281,12 @@ interactions: headers: Test-Request-Attempt: - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7ac35338-59f0-4b74-ba40-5537f410a2af?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0670aa6c-289b-4a3a-89c9-be4fbd442f73?api-version=2016-03-30 method: GET response: body: |- { - "name": "3853c37a-f059-744b-ba40-5537f410a2af", + "name": "6caa7006-9b28-3a4a-89c9-be4fbd442f73", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" @@ -2602,11 +2331,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -2621,13 +2350,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -2655,7 +2384,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -2679,8 +2408,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -2697,13 +2426,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -2753,11 +2483,11 @@ interactions: "powerState": { "code": "Running" }, - "kubernetesVersion": "1.24.9", - "currentKubernetesVersion": "1.24.9", + "kubernetesVersion": "1.25.6", + "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-y8pjps1z.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-y8pjps1z.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-4c8hsc2p.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-4c8hsc2p.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "ap1", @@ -2772,13 +2502,13 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } ], @@ -2806,7 +2536,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/6c9b2b97-06cc-4656-929e-d95c83fb1c62" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.Network/publicIPAddresses/eeae8e8b-24d0-4199-9210-f5f58f708da4" } ], "backendPoolType": "nodeIPConfiguration" @@ -2830,8 +2560,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-kfdsdw_asotest-mc-sgohla_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asotest-mc-sgohla-agentpool", - "clientId": "ba2ce16a-49a3-4e28-a7a6-6b4cb7c5f24e", - "objectId": "f1458fe5-50d2-4b0c-b1f6-57a5e1a1a79a" + "clientId": "d45d3472-346a-40d8-a07b-8df694773a58", + "objectId": "6bb52373-9129-4223-a6ed-5b91d5b30a9c" } }, "securityProfile": {}, @@ -2848,13 +2578,14 @@ interactions: } }, "oidcIssuerProfile": { - "enabled": false + "enabled": true, + "issuerURL": "https://westus3.oic.prod-aks.azure.com/00000000-0000-0000-0000-000000000000/c843b126-f5a1-4d66-9bee-0c165b279f94/" }, "workloadAutoScalerProfile": {} }, "identity": { "type": "SystemAssigned", - "principalId": "a478526c-882f-43f5-8b93-97fd8fcbbb01", + "principalId": "1234a0c0-8548-462b-9afc-424b4186709d", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -2866,19 +2597,1509 @@ interactions: Cache-Control: - no-cache Content-Type: - - application/json + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - 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-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/listClusterAdminCredential?api-version=2022-04-01 + method: POST + response: + body: |- + { + "kubeconfigs": [ + { + "name": "clusterAdmin", + "value": "IA==" + } + ] + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - 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-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/listClusterUserCredential?api-version=2022-04-01 + method: POST + response: + body: |- + { + "kubeconfigs": [ + { + "name": "clusterUser", + "value": "IA==" + } + ] + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"kind":"StorageV2","location":"westus2","name":"asoteststorpxftks","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "144" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks?api-version=2021-04-01 + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "17" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "17" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "3" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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/providers/Microsoft.Storage/locations/westus2/asyncoperations/9d0984c8-bebe-453e-afd3-0a4de6216fbe?monitor=true&api-version=2021-04-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks","name":"asoteststorpxftks","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorpxftks.dfs.core.windows.net/","web":"https://asoteststorpxftks.z5.web.core.windows.net/","blob":"https://asoteststorpxftks.blob.core.windows.net/","queue":"https://asoteststorpxftks.queue.core.windows.net/","table":"https://asoteststorpxftks.table.core.windows.net/","file":"https://asoteststorpxftks.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - 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-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks?api-version=2021-04-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks","name":"asoteststorpxftks","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststorpxftks.dfs.core.windows.net/","web":"https://asoteststorpxftks.z5.web.core.windows.net/","blob":"https://asoteststorpxftks.blob.core.windows.net/","queue":"https://asoteststorpxftks.queue.core.windows.net/","table":"https://asoteststorpxftks.table.core.windows.net/","file":"https://asoteststorpxftks.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-kv-msimpt","properties":{"accessPolicies":[{"applicationId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]},"tenantId":"00000000-0000-0000-0000-000000000000"}],"enableSoftDelete":false,"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "444" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","name":"asotest-kv-msimpt","type":"Microsoft.KeyVault/vaults","location":"westus2","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","applicationId":"00000000-0000-0000-0000-000000000000","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://asotest-kv-msimpt.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"identity":{"type":"SystemAssigned"},"location":"westus2","name":"asotestworkrgnasr","properties":{"allowPublicAccessWhenBehindVnet":false,"keyVault":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt","storageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks"},"sku":{"name":"Standard_S1","tier":"Basic"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "503" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr?api-version=2021-07-01 + method: PUT + response: + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=async + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=location + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.104" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.017" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/gvSf96U0tWSR0yryeW06bRNFQUxTskEuFvyM-g9t2Jc?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "Succeeded", + "percentComplete": 100.0 + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.016" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr?api-version=2021-07-01 + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "name": "asotestworkrgnasr", + "type": "Microsoft.MachineLearningServices/workspaces", + "location": "westus2", + "tags": {}, + "etag": null, + "properties": { + "friendlyName": "", + "description": "", + "storageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks", + "keyVault": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Keyvault/vaults/asotest-kv-msimpt", + "applicationInsights": null, + "hbiWorkspace": false, + "tenantId": "00000000-0000-0000-0000-000000000000", + "imageBuildCompute": null, + "provisioningState": "Succeeded", + "creationTime": "2001-02-03T04:05:06Z", + "notebookInfo": { + "resourceId": "a3ee3fd3aaca437dbeec2d54f0383698", + "fqdn": "ml-asotestworkrgna-westus2-789615f5-95f2-48f7-acbd-cd91c6ea511e.westus2.notebooks.azure.net", + "isPrivateLinkEnabled": false, + "notebookPreparationError": null + }, + "storageHnsEnabled": false, + "workspaceId": "789615f5-95f2-48f7-acbd-cd91c6ea511e", + "linkedModelInventoryArmId": null, + "privateLinkCount": 0, + "allowPublicAccessWhenBehindVnet": true, + "discoveryUrl": "https://westus2.api.azureml.ms/discovery", + "mlFlowTrackingUri": "azureml://westus2.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "sdkTelemetryAppInsightsKey": "73498d6d-b9a0-4d3b-9a6c-84285b86bea8", + "sasGetterUri": "" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "ca43d312-d032-4df4-b6e9-4767762cf688", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "kind": "Default", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "systemData": { + "createdAt": "2001-02-03T04:05:06Z", + "createdBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "createdByType": "Application", + "lastModifiedAt": "2001-02-03T04:05:06Z", + "lastModifiedBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "lastModifiedByType": "Application" + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.030" + 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-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr?api-version=2021-07-01 + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "name": "asotestworkrgnasr", + "type": "Microsoft.MachineLearningServices/workspaces", + "location": "westus2", + "tags": {}, + "etag": null, + "properties": { + "friendlyName": "", + "description": "", + "storageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks", + "keyVault": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.Keyvault/vaults/asotest-kv-msimpt", + "applicationInsights": null, + "hbiWorkspace": false, + "tenantId": "00000000-0000-0000-0000-000000000000", + "imageBuildCompute": null, + "provisioningState": "Succeeded", + "creationTime": "2001-02-03T04:05:06Z", + "notebookInfo": { + "resourceId": "a3ee3fd3aaca437dbeec2d54f0383698", + "fqdn": "ml-asotestworkrgna-westus2-789615f5-95f2-48f7-acbd-cd91c6ea511e.westus2.notebooks.azure.net", + "isPrivateLinkEnabled": false, + "notebookPreparationError": null + }, + "storageHnsEnabled": false, + "workspaceId": "789615f5-95f2-48f7-acbd-cd91c6ea511e", + "linkedModelInventoryArmId": null, + "privateLinkCount": 0, + "allowPublicAccessWhenBehindVnet": true, + "discoveryUrl": "https://westus2.api.azureml.ms/discovery", + "mlFlowTrackingUri": "azureml://westus2.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "sdkTelemetryAppInsightsKey": "73498d6d-b9a0-4d3b-9a6c-84285b86bea8", + "sasGetterUri": "" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "ca43d312-d032-4df4-b6e9-4767762cf688", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "kind": "Default", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "systemData": { + "createdAt": "2001-02-03T04:05:06Z", + "createdBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "createdByType": "Application", + "lastModifiedAt": "2001-02-03T04:05:06Z", + "lastModifiedBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "lastModifiedByType": "Application" + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.021" + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"tarb","properties":{"roles":["Microsoft.MachineLearningServices/workspaces/mlworkload"],"sourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "277" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: PUT + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"name":"tarb","properties":{"roles":["Microsoft.MachineLearningServices/workspaces/inference-v1"],"sourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "279" + Content-Type: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: PUT + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/inference-v1" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/inference-v1" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/inference-v1" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/inference-v1" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb", + "name": "tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/inference-v1" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - 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-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/trustedAccessRoleBindings/tarb?api-version=2023-02-02-preview + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + 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-kfdsdw/providers/Microsoft.MachineLearningServices/workspaces/asotestworkrgnasr?api-version=2021-07-01 + method: DELETE + response: + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=location + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.072" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.013" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.016" + 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-kfdsdw/providers/Microsoft.KeyVault/vaults/asotest-kv-msimpt?api-version=2021-04-01-preview + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + 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-kfdsdw/providers/Microsoft.Storage/storageAccounts/asoteststorpxftks?api-version=2021-04-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 Expires: - "-1" Pragma: - no-cache Server: - - nginx + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 X-Content-Type-Options: - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" status: 200 OK code: 200 duration: "" @@ -2886,39 +4107,38 @@ 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-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/listClusterAdminCredential?api-version=2022-04-01 - method: POST + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET response: body: |- { - "kubeconfigs": [ - { - "name": "clusterAdmin", - "value": "IA==" - } - ] - } + "status": "InProgress" + } headers: Cache-Control: - no-cache Content-Type: - - application/json + - application/json; charset=utf-8 Expires: - "-1" Pragma: - no-cache - Server: - - nginx + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 X-Content-Type-Options: - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.014" status: 200 OK code: 200 duration: "" @@ -2926,39 +4146,117 @@ 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-kfdsdw/providers/Microsoft.ContainerService/managedClusters/asotest-mc-sgohla/listClusterUserCredential?api-version=2022-04-01 - method: POST + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET response: body: |- { - "kubeconfigs": [ - { - "name": "clusterUser", - "value": "IA==" - } - ] - } + "status": "InProgress" + } headers: Cache-Control: - no-cache Content-Type: - - application/json + - application/json; charset=utf-8 Expires: - "-1" Pragma: - no-cache - Server: - - nginx + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.014" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 X-Content-Type-Options: - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.014" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus2/workspaceOperationsStatus/a4191caa-6a81-49e7-a2f8-390916cb12fd?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "Succeeded", + "percentComplete": 100.0 + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus2-01 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" status: 200 OK code: 200 duration: "" @@ -2976,6 +4274,12 @@ interactions: body: |- { "code": "NotFound", + "details": [ + { + "code": "Unspecified", + "message": "rpc error: code = NotFound desc = Agent Pool not found" + } + ], "message": "Could not find the agentpool: ap2 in subscription: 00000000-0000-0000-0000-000000000000, resourceGroup: asotest-rg-kfdsdw, resourceName: asotest-mc-sgohla.", "subcode": "GetAgentPool_NotFound" } @@ -2983,7 +4287,7 @@ interactions: Cache-Control: - no-cache Content-Length: - - "235" + - "364" Content-Type: - application/json Expires: @@ -3032,18 +4336,18 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 Cache-Control: - no-cache Content-Length: @@ -3069,12 +4373,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3104,12 +4408,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3139,12 +4443,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3174,12 +4478,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3209,12 +4513,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3244,12 +4548,12 @@ interactions: headers: Test-Request-Attempt: - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3279,12 +4583,12 @@ interactions: headers: Test-Request-Attempt: - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3314,12 +4618,12 @@ interactions: headers: Test-Request-Attempt: - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3349,12 +4653,12 @@ interactions: headers: Test-Request-Attempt: - "8" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/5da6b135-a3c0-4cb6-9b3e-1275e1c7ae3a?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/8278c4f7-f1f3-4896-a8c5-06c45a5247cc?api-version=2016-03-30 method: GET response: body: |- { - "name": "35b1a65d-c0a3-b64c-9b3e-1275e1c7ae3a", + "name": "f7c47882-f3f1-9648-a8c5-06c45a5247cc", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" @@ -3406,12 +4710,12 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } @@ -3464,12 +4768,12 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } @@ -3522,12 +4826,12 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } @@ -3584,8 +4888,8 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "nodeLabels": { "mylabel": "label" @@ -3593,13 +4897,13 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/82f0f43b-449e-433b-8245-ffcccdea8afc?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d6a805e9-1dac-429b-9122-028c6af0c527?api-version=2016-03-30 Cache-Control: - no-cache Content-Type: @@ -3625,12 +4929,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/82f0f43b-449e-433b-8245-ffcccdea8afc?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d6a805e9-1dac-429b-9122-028c6af0c527?api-version=2016-03-30 method: GET response: body: |- { - "name": "3bf4f082-9e44-3b43-8245-ffcccdea8afc", + "name": "e905a8d6-ac1d-9b42-9122-028c6af0c527", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3660,12 +4964,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/82f0f43b-449e-433b-8245-ffcccdea8afc?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d6a805e9-1dac-429b-9122-028c6af0c527?api-version=2016-03-30 method: GET response: body: |- { - "name": "3bf4f082-9e44-3b43-8245-ffcccdea8afc", + "name": "e905a8d6-ac1d-9b42-9122-028c6af0c527", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3695,47 +4999,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/82f0f43b-449e-433b-8245-ffcccdea8afc?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "3bf4f082-9e44-3b43-8245-ffcccdea8afc", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/82f0f43b-449e-433b-8245-ffcccdea8afc?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/d6a805e9-1dac-429b-9122-028c6af0c527?api-version=2016-03-30 method: GET response: body: |- { - "name": "3bf4f082-9e44-3b43-8245-ffcccdea8afc", + "name": "e905a8d6-ac1d-9b42-9122-028c6af0c527", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" @@ -3787,8 +5056,8 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "nodeLabels": { "mylabel": "label" @@ -3796,7 +5065,7 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } @@ -3849,8 +5118,8 @@ interactions: "powerState": { "code": "Running" }, - "orchestratorVersion": "1.24.9", - "currentOrchestratorVersion": "1.24.9", + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", "enableCustomCATrust": false, "nodeLabels": { "mylabel": "label" @@ -3858,7 +5127,7 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-1804gen2containerd-202303.06.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.26.0", "enableFIPS": false } } @@ -3896,7 +5165,7 @@ interactions: body: "" headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 Cache-Control: - no-cache Content-Length: @@ -3904,7 +5173,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operationresults/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operationresults/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 Pragma: - no-cache Server: @@ -3922,12 +5191,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 method: GET response: body: |- { - "name": "03d1ac06-8457-8d4c-9306-c33c98ab7e65", + "name": "c1f910ec-6986-e746-985a-a47daf4ca55a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3957,12 +5226,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 method: GET response: body: |- { - "name": "03d1ac06-8457-8d4c-9306-c33c98ab7e65", + "name": "c1f910ec-6986-e746-985a-a47daf4ca55a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -3992,12 +5261,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 method: GET response: body: |- { - "name": "03d1ac06-8457-8d4c-9306-c33c98ab7e65", + "name": "c1f910ec-6986-e746-985a-a47daf4ca55a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4027,12 +5296,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 method: GET response: body: |- { - "name": "03d1ac06-8457-8d4c-9306-c33c98ab7e65", + "name": "c1f910ec-6986-e746-985a-a47daf4ca55a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4062,12 +5331,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/06acd103-5784-4c8d-9306-c33c98ab7e65?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/ec10f9c1-8669-46e7-985a-a47daf4ca55a?api-version=2016-03-30 method: GET response: body: |- { - "name": "03d1ac06-8457-8d4c-9306-c33c98ab7e65", + "name": "c1f910ec-6986-e746-985a-a47daf4ca55a", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" @@ -4106,7 +5375,7 @@ interactions: body: "" headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 Cache-Control: - no-cache Content-Length: @@ -4114,7 +5383,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operationresults/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operationresults/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 Pragma: - no-cache Server: @@ -4132,12 +5401,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4167,12 +5436,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4202,12 +5471,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4237,12 +5506,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4272,12 +5541,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4307,12 +5576,12 @@ interactions: headers: Test-Request-Attempt: - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4342,12 +5611,12 @@ interactions: headers: Test-Request-Attempt: - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4377,12 +5646,12 @@ interactions: headers: Test-Request-Attempt: - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -4412,117 +5681,12 @@ interactions: headers: Test-Request-Attempt: - "8" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "9" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "10" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 - method: GET - response: - body: |- - { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" - } - headers: - Cache-Control: - - no-cache - Content-Type: - - application/json - Expires: - - "-1" - Pragma: - - no-cache - Server: - - nginx - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding - X-Content-Type-Options: - - nosniff - status: 200 OK - code: 200 - duration: "" -- request: - body: "" - form: {} - headers: - Test-Request-Attempt: - - "11" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/da4421bc-12aa-483e-9a7c-d8d06aee3e6c?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/11402feb-2827-4dab-b4e3-04ca85903c51?api-version=2016-03-30 method: GET response: body: |- { - "name": "bc2144da-aa12-3e48-9a7c-d8d06aee3e6c", + "name": "eb2f4011-2728-ab4d-b4e3-04ca85903c51", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" diff --git a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Containerservice_v1api20230202preview_CreationAndDeletion.yaml b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Containerservice_v1api20230202preview_CreationAndDeletion.yaml index cc2cdf88ab..8c5589f9ca 100644 --- a/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Containerservice_v1api20230202preview_CreationAndDeletion.yaml +++ b/v2/internal/controllers/recordings/Test_Samples_CreationAndDeletion/Test_Containerservice_v1api20230202preview_CreationAndDeletion.yaml @@ -66,7 +66,164 @@ interactions: code: 200 duration: "" - request: - body: '{"location":"westus3","name":"mlworkspaces-vault","properties":{"accessPolicies":[{"applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]},"tenantId":"00000000-0000-0000-0000-000000000000"}],"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000"}}' + body: '{"kind":"BlobStorage","location":"westus3","name":"asoworkspacestorageacct","properties":{"accessTier":"Hot"},"sku":{"name":"Standard_LRS"},"tags":null}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "152" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct?api-version=2021-04-01 + method: PUT + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "17" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"sampleworkspaces","properties":{"allowPublicAccessWhenBehindVnet":false,"keyVault":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","storageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct"},"sku":{"name":"Standard_S1","tier":"Basic"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "509" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces?api-version=2021-07-01 + method: PUT + response: + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=location + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.144" + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "17" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus3","name":"mlworkspaces-vault","properties":{"accessPolicies":[{"applicationId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]},"tenantId":"00000000-0000-0000-0000-000000000000"}],"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000"}}' form: {} headers: Accept: @@ -80,7 +237,7 @@ interactions: url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview method: PUT response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net","provisioningState":"RegisteringDns"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net","provisioningState":"RegisteringDns"}}' headers: Cache-Control: - no-cache @@ -114,7 +271,153 @@ interactions: url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.019" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.009" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' headers: Cache-Control: - no-cache @@ -134,8 +437,373 @@ interactions: - 4.0.30319 X-Content-Type-Options: - nosniff - X-Ms-Keyvault-Service-Version: - - 1.5.822.0 + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "Failed", + "error": { + "code": "BadRequest", + "message": "Conflict response body: {\"error\":{\"code\":\"StorageAccountIsNotProvisioned\",\"message\":\"The storage account provisioning state must be 'Succeeded' before executing the operation.\"}}" + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding,Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.013" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "3" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: '{"identity":{"type":"SystemAssigned"},"location":"westus3","name":"sampleworkspaces","properties":{"allowPublicAccessWhenBehindVnet":false,"keyVault":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","storageAccount":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct"},"sku":{"name":"Standard_S1","tier":"Basic"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "509" + Content-Type: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces?api-version=2021-07-01 + method: PUT + response: + body: "" + headers: + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=location + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.080" + 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/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "3" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.024" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"1C793267-c310-d4ae-7BD5-5Af5BEF875D3","applicationId":"1c793267-c310-d4ae-7bd5-5af5bef875d3","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-IIS/10.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aspnet-Version: + - 4.0.30319 + X-Content-Type-Options: + - nosniff + X-Ms-Keyvault-Service-Version: + - 1.5.822.0 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async + method: GET + response: + body: |- + { + "status": "InProgress" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 + X-Content-Type-Options: + - nosniff + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.015" + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus3/asyncoperations/fafe7008-4b53-4c1f-ab14-49a41d23e7e4?monitor=true&api-version=2021-04-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct","name":"asoworkspacestorageacct","type":"Microsoft.Storage/storageAccounts","location":"westus3","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoworkspacestorageacct.dfs.core.windows.net/","blob":"https://asoworkspacestorageacct.blob.core.windows.net/","table":"https://asoworkspacestorageacct.table.core.windows.net/"},"primaryLocation":"westus3","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - 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-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct?api-version=2021-04-01 + method: GET + response: + body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct","name":"asoworkspacestorageacct","type":"Microsoft.Storage/storageAccounts","location":"westus3","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoworkspacestorageacct.dfs.core.windows.net/","blob":"https://asoworkspacestorageacct.blob.core.windows.net/","table":"https://asoworkspacestorageacct.table.core.windows.net/"},"primaryLocation":"westus3","statusOfPrimary":"available"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff status: 200 OK code: 200 duration: "" @@ -144,11 +812,14 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' + body: |- + { + "status": "InProgress" + } headers: Cache-Control: - no-cache @@ -158,18 +829,20 @@ interactions: - "-1" Pragma: - no-cache - Server: - - Microsoft-IIS/10.0 + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - Accept-Encoding - X-Aspnet-Version: - - 4.0.30319 + X-Aml-Cluster: + - vienna-westus3-02 X-Content-Type-Options: - nosniff - X-Ms-Keyvault-Service-Version: - - 1.5.822.0 + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.012" status: 200 OK code: 200 duration: "" @@ -178,11 +851,15 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/westus3/workspaceOperationsStatus/KJc_nmV5w817KjaCbzoK_Phj7H164-KOIWxSTpX3Flw?api-version=2021-07-01&type=async method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"RegisteringDns"}}' + body: |- + { + "status": "Succeeded", + "percentComplete": 100.0 + } headers: Cache-Control: - no-cache @@ -192,18 +869,20 @@ interactions: - "-1" Pragma: - no-cache - Server: - - Microsoft-IIS/10.0 + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - Accept-Encoding - X-Aspnet-Version: - - 4.0.30319 + X-Aml-Cluster: + - vienna-westus3-02 X-Content-Type-Options: - nosniff - X-Ms-Keyvault-Service-Version: - - 1.5.822.0 + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.020" status: 200 OK code: 200 duration: "" @@ -212,11 +891,62 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces?api-version=2021-07-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"Succeeded"}}' + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "name": "sampleworkspaces", + "type": "Microsoft.MachineLearningServices/workspaces", + "location": "westus3", + "tags": {}, + "etag": null, + "properties": { + "friendlyName": "", + "description": "", + "storageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct", + "keyVault": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Keyvault/vaults/mlworkspaces-vault", + "applicationInsights": null, + "hbiWorkspace": false, + "tenantId": "00000000-0000-0000-0000-000000000000", + "imageBuildCompute": null, + "provisioningState": "Succeeded", + "creationTime": "2001-02-03T04:05:06Z", + "notebookInfo": { + "resourceId": "35952e7e2ba84c1aba2dba48152cc3db", + "fqdn": "ml-sampleworkspace-westus3-a87b6799-94c5-418a-bc41-c71cbc8e34b5.westus2.notebooks.azure.net", + "isPrivateLinkEnabled": false, + "notebookPreparationError": null + }, + "storageHnsEnabled": false, + "workspaceId": "a87b6799-94c5-418a-bc41-c71cbc8e34b5", + "linkedModelInventoryArmId": null, + "privateLinkCount": 0, + "allowPublicAccessWhenBehindVnet": true, + "discoveryUrl": "https://westus3.api.azureml.ms/discovery", + "mlFlowTrackingUri": "azureml://westus3.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "sdkTelemetryAppInsightsKey": "3c3a4870-ec7e-4790-8faa-fa109dddf062", + "sasGetterUri": "" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "f1f4fafd-8a3f-4f2b-9378-7fa717d9947e", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "kind": "Default", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "systemData": { + "createdAt": "2001-02-03T04:05:06Z", + "lastModifiedAt": "2001-02-03T04:05:06Z", + "lastModifiedBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "lastModifiedByType": "Application" + } + } headers: Cache-Control: - no-cache @@ -226,18 +956,20 @@ interactions: - "-1" Pragma: - no-cache - Server: - - Microsoft-IIS/10.0 + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - - Accept-Encoding - X-Aspnet-Version: - - 4.0.30319 + - Accept-Encoding,Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 X-Content-Type-Options: - nosniff - X-Ms-Keyvault-Service-Version: - - 1.5.822.0 + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.013" status: 200 OK code: 200 duration: "" @@ -248,11 +980,62 @@ interactions: Accept: - application/json Test-Request-Attempt: - - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault?api-version=2021-04-01-preview + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces?api-version=2021-07-01 method: GET response: - body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.KeyVault/vaults/mlworkspaces-vault","name":"mlworkspaces-vault","type":"Microsoft.KeyVault/vaults","location":"westus3","tags":{},"systemData":{"createdBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","createdByType":"Application","createdAt":"2001-02-03T04:05:06Z","lastModifiedBy":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","lastModifiedByType":"Application","lastModifiedAt":"2001-02-03T04:05:06Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","applicationId":"e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46","permissions":{"certificates":["get"],"keys":["get"],"secrets":["get"],"storage":["get"]}}],"enabledForDeployment":false,"enableSoftDelete":true,"vaultUri":"https://mlworkspaces-vault.vault.azure.net/","provisioningState":"Succeeded"}}' + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "name": "sampleworkspaces", + "type": "Microsoft.MachineLearningServices/workspaces", + "location": "westus3", + "tags": {}, + "etag": null, + "properties": { + "friendlyName": "", + "description": "", + "storageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct", + "keyVault": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.Keyvault/vaults/mlworkspaces-vault", + "applicationInsights": null, + "hbiWorkspace": false, + "tenantId": "00000000-0000-0000-0000-000000000000", + "imageBuildCompute": null, + "provisioningState": "Succeeded", + "creationTime": "2001-02-03T04:05:06Z", + "notebookInfo": { + "resourceId": "35952e7e2ba84c1aba2dba48152cc3db", + "fqdn": "ml-sampleworkspace-westus3-a87b6799-94c5-418a-bc41-c71cbc8e34b5.westus2.notebooks.azure.net", + "isPrivateLinkEnabled": false, + "notebookPreparationError": null + }, + "storageHnsEnabled": false, + "workspaceId": "a87b6799-94c5-418a-bc41-c71cbc8e34b5", + "linkedModelInventoryArmId": null, + "privateLinkCount": 0, + "allowPublicAccessWhenBehindVnet": true, + "discoveryUrl": "https://westus3.api.azureml.ms/discovery", + "mlFlowTrackingUri": "azureml://westus3.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "sdkTelemetryAppInsightsKey": "3c3a4870-ec7e-4790-8faa-fa109dddf062", + "sasGetterUri": "" + }, + "identity": { + "type": "SystemAssigned", + "principalId": "f1f4fafd-8a3f-4f2b-9378-7fa717d9947e", + "tenantId": "00000000-0000-0000-0000-000000000000" + }, + "kind": "Default", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "systemData": { + "createdAt": "2001-02-03T04:05:06Z", + "lastModifiedAt": "2001-02-03T04:05:06Z", + "lastModifiedBy": "e5d772d8-b77f-4ed1-8dbb-3e8d433cbf46", + "lastModifiedByType": "Application" + } + } headers: Cache-Control: - no-cache @@ -262,18 +1045,20 @@ interactions: - "-1" Pragma: - no-cache - Server: - - Microsoft-IIS/10.0 + Request-Context: + - appId=cid-v1:2d2e8e63-272e-4b3c-8598-4ee570a0e70d Strict-Transport-Security: - max-age=31536000; includeSubDomains Vary: - - Accept-Encoding - X-Aspnet-Version: - - 4.0.30319 + - Accept-Encoding,Accept-Encoding + X-Aml-Cluster: + - vienna-westus3-02 X-Content-Type-Options: - nosniff - X-Ms-Keyvault-Service-Version: - - 1.5.822.0 + X-Ms-Response-Type: + - standard + X-Request-Time: + - "0.020" status: 200 OK code: 200 duration: "" @@ -340,8 +1125,8 @@ interactions: "kubernetesVersion": "1.25.6", "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-kzekw0wp.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-kzekw0wp.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-ufm1ocgk.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-ufm1ocgk.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "pool1", @@ -361,7 +1146,7 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", "enableFIPS": false } ], @@ -415,7 +1200,7 @@ interactions: }, "identity": { "type": "SystemAssigned", - "principalId": "45f269e4-ba2e-4430-80f4-ea15c2b7ca06", + "principalId": "1740bf33-4c14-4f07-bd09-86b0eb47dec1", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -425,7 +1210,7 @@ interactions: } headers: Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 Cache-Control: - no-cache Content-Length: @@ -451,12 +1236,12 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -486,12 +1271,12 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -521,12 +1306,12 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -556,12 +1341,12 @@ interactions: headers: Test-Request-Attempt: - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -591,12 +1376,12 @@ interactions: headers: Test-Request-Attempt: - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -626,12 +1411,12 @@ interactions: headers: Test-Request-Attempt: - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -661,12 +1446,12 @@ interactions: headers: Test-Request-Attempt: - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -696,12 +1481,12 @@ interactions: headers: Test-Request-Attempt: - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -731,12 +1516,12 @@ interactions: headers: Test-Request-Attempt: - "8" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/0833ea39-ef31-4102-b032-370f70ae0e3d?api-version=2016-03-30 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/de28437f-541b-461a-ba7c-51eedcec662a?api-version=2016-03-30 method: GET response: body: |- { - "name": "39ea3308-31ef-0241-b032-370f70ae0e3d", + "name": "7f4328de-1b54-1a46-ba7c-51eedcec662a", "status": "Succeeded", "startTime": "2001-02-03T04:05:06Z", "endTime": "2001-02-03T04:05:06Z" @@ -784,8 +1569,8 @@ interactions: "kubernetesVersion": "1.25.6", "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-kzekw0wp.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-kzekw0wp.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-ufm1ocgk.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-ufm1ocgk.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "pool1", @@ -805,7 +1590,7 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", "enableFIPS": false } ], @@ -823,7 +1608,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.Network/publicIPAddresses/5ef52a68-20e0-4581-9572-cf34e3aec527" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.Network/publicIPAddresses/61d8d715-930e-471c-84b9-98d3c2e623d6" } ], "backendPoolType": "nodeIPConfiguration" @@ -847,8 +1632,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/samplemanagedcluster202221preview-agentpool", - "clientId": "9384eeea-e883-4bf5-bb43-c5be0b4c7597", - "objectId": "e8490c93-d567-48b2-9b8c-5c32b2accb14" + "clientId": "2d04d3f4-6c1b-4a73-b71a-6f5f64c3ef93", + "objectId": "9ab8d040-026c-45ec-9d60-9a6f54a0eed2" } }, "securityProfile": {}, @@ -871,7 +1656,7 @@ interactions: }, "identity": { "type": "SystemAssigned", - "principalId": "45f269e4-ba2e-4430-80f4-ea15c2b7ca06", + "principalId": "1740bf33-4c14-4f07-bd09-86b0eb47dec1", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -924,8 +1709,8 @@ interactions: "kubernetesVersion": "1.25.6", "currentKubernetesVersion": "1.25.6", "dnsPrefix": "aso", - "fqdn": "aso-kzekw0wp.hcp.westus3.azmk8s.io", - "azurePortalFQDN": "aso-kzekw0wp.portal.hcp.westus3.azmk8s.io", + "fqdn": "aso-ufm1ocgk.hcp.westus3.azmk8s.io", + "azurePortalFQDN": "aso-ufm1ocgk.portal.hcp.westus3.azmk8s.io", "agentPoolProfiles": [ { "name": "pool1", @@ -945,7 +1730,7 @@ interactions: "mode": "System", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", "enableFIPS": false } ], @@ -963,7 +1748,7 @@ interactions: }, "effectiveOutboundIPs": [ { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.Network/publicIPAddresses/5ef52a68-20e0-4581-9572-cf34e3aec527" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.Network/publicIPAddresses/61d8d715-930e-471c-84b9-98d3c2e623d6" } ], "backendPoolType": "nodeIPConfiguration" @@ -987,8 +1772,8 @@ interactions: "identityProfile": { "kubeletidentity": { "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_asotest-rg-dwrfmg_samplemanagedcluster202221preview_westus3/providers/Microsoft.ManagedIdentity/userAssignedIdentities/samplemanagedcluster202221preview-agentpool", - "clientId": "9384eeea-e883-4bf5-bb43-c5be0b4c7597", - "objectId": "e8490c93-d567-48b2-9b8c-5c32b2accb14" + "clientId": "2d04d3f4-6c1b-4a73-b71a-6f5f64c3ef93", + "objectId": "9ab8d040-026c-45ec-9d60-9a6f54a0eed2" } }, "securityProfile": {}, @@ -1011,7 +1796,7 @@ interactions: }, "identity": { "type": "SystemAssigned", - "principalId": "45f269e4-ba2e-4430-80f4-ea15c2b7ca06", + "principalId": "1740bf33-4c14-4f07-bd09-86b0eb47dec1", "tenantId": "00000000-0000-0000-0000-000000000000" }, "sku": { @@ -1082,6 +1867,182 @@ interactions: status: 404 Not Found code: 404 duration: "" +- request: + body: '{"name":"sample-tarb","properties":{"roles":["Microsoft.MachineLearningServices/workspaces/mlworkload"],"sourceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "283" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb?api-version=2023-02-02-preview + method: PUT + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb", + "name": "sample-tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb", + "name": "sample-tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Updating", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb", + "name": "sample-tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb?api-version=2023-02-02-preview + method: GET + response: + body: |- + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb", + "name": "sample-tarb", + "type": "Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings", + "properties": { + "provisioningState": "Succeeded", + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces", + "roles": [ + "Microsoft.MachineLearningServices/workspaces/mlworkload" + ] + } + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" - request: body: '{"name":"pool202221p","properties":{"count":1,"mode":"User","osType":"Linux","vmSize":"Standard_DS2_v2"}}' form: {} @@ -1120,17 +2081,85 @@ interactions: "mode": "User", "osType": "Linux", "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", "enableFIPS": false } } headers: - Azure-Asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + Azure-Asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 + Cache-Control: + - no-cache + Content-Length: + - "853" + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 + method: GET + response: + body: |- + { + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", + "status": "InProgress", + "startTime": "2001-02-03T04:05:06Z" + } + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json + Expires: + - "-1" + Pragma: + - no-cache + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 + method: GET + response: + body: |- + { + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", + "status": "InProgress", + "startTime": "2001-02-03T04:05:06Z" + } + headers: Cache-Control: - no-cache - Content-Length: - - "853" Content-Type: - application/json Expires: @@ -1141,23 +2170,25 @@ interactions: - nginx Strict-Transport-Security: - max-age=31536000; includeSubDomains + Vary: + - 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" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1186,13 +2217,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1221,13 +2252,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1256,13 +2287,13 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", "status": "InProgress", "startTime": "2001-02-03T04:05:06Z" } @@ -1291,15 +2322,16 @@ interactions: form: {} headers: Test-Request-Attempt: - - "4" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/7bd51f6b-673e-41c2-b174-447fccc5dab1?api-version=2016-03-30 method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "name": "6b1fd57b-3e67-c241-b174-447fccc5dab1", + "status": "Succeeded", + "startTime": "2001-02-03T04:05:06Z", + "endTime": "2001-02-03T04:05:06Z" } headers: Cache-Control: @@ -1326,15 +2358,36 @@ interactions: form: {} headers: Test-Request-Attempt: - - "5" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p?api-version=2023-02-02-preview method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p", + "name": "pool202221p", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "properties": { + "count": 1, + "vmSize": "Standard_DS2_v2", + "osDiskSizeGB": 128, + "osDiskType": "Managed", + "kubeletDiskType": "OS", + "maxPods": 110, + "type": "VirtualMachineScaleSets", + "scaleDownMode": "Delete", + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", + "mode": "User", + "osType": "Linux", + "osSKU": "Ubuntu", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", + "enableFIPS": false + } } headers: Cache-Control: @@ -1360,16 +2413,39 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "6" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p?api-version=2023-02-02-preview method: GET response: body: |- { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", - "status": "InProgress", - "startTime": "2001-02-03T04:05:06Z" + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p", + "name": "pool202221p", + "type": "Microsoft.ContainerService/managedClusters/agentPools", + "properties": { + "count": 1, + "vmSize": "Standard_DS2_v2", + "osDiskSizeGB": 128, + "osDiskType": "Managed", + "kubeletDiskType": "OS", + "maxPods": 110, + "type": "VirtualMachineScaleSets", + "scaleDownMode": "Delete", + "provisioningState": "Succeeded", + "powerState": { + "code": "Running" + }, + "orchestratorVersion": "1.25.6", + "currentOrchestratorVersion": "1.25.6", + "mode": "User", + "osType": "Linux", + "osSKU": "Ubuntu", + "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.07.0", + "enableFIPS": false + } } headers: Cache-Control: @@ -1395,162 +2471,252 @@ interactions: body: "" form: {} headers: + Accept: + - application/json Test-Request-Attempt: - - "7" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/westus3/operations/eaf40f2a-bf69-4b7c-b54b-6e15a1bb8812?api-version=2016-03-30 + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg?api-version=2020-06-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?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: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: - body: |- - { - "name": "2a0ff4ea-69bf-7c4b-b54b-6e15a1bb8812", - "status": "Succeeded", - "startTime": "2001-02-03T04:05:06Z", - "endTime": "2001-02-03T04:05:06Z" - } + body: "" headers: Cache-Control: - no-cache - Content-Type: - - application/json + Content-Length: + - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 Pragma: - no-cache - Server: - - nginx + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - Accept-Encoding X-Content-Type-Options: - nosniff - status: 200 OK - code: 200 + status: 202 Accepted + code: 202 duration: "" - request: body: "" form: {} headers: Test-Request-Attempt: - - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p?api-version=2023-02-02-preview + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: - body: |- - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p", - "name": "pool202221p", - "type": "Microsoft.ContainerService/managedClusters/agentPools", - "properties": { - "count": 1, - "vmSize": "Standard_DS2_v2", - "osDiskSizeGB": 128, - "osDiskType": "Managed", - "kubeletDiskType": "OS", - "maxPods": 110, - "type": "VirtualMachineScaleSets", - "scaleDownMode": "Delete", - "provisioningState": "Succeeded", - "powerState": { - "code": "Running" - }, - "orchestratorVersion": "1.25.6", - "currentOrchestratorVersion": "1.25.6", - "mode": "User", - "osType": "Linux", - "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", - "enableFIPS": false - } - } + body: "" headers: Cache-Control: - no-cache - Content-Type: - - application/json + Content-Length: + - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 Pragma: - no-cache - Server: - - nginx + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - 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: - - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p?api-version=2023-02-02-preview + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: - body: |- - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asotest-rg-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/agentPools/pool202221p", - "name": "pool202221p", - "type": "Microsoft.ContainerService/managedClusters/agentPools", - "properties": { - "count": 1, - "vmSize": "Standard_DS2_v2", - "osDiskSizeGB": 128, - "osDiskType": "Managed", - "kubeletDiskType": "OS", - "maxPods": 110, - "type": "VirtualMachineScaleSets", - "scaleDownMode": "Delete", - "provisioningState": "Succeeded", - "powerState": { - "code": "Running" - }, - "orchestratorVersion": "1.25.6", - "currentOrchestratorVersion": "1.25.6", - "mode": "User", - "osType": "Linux", - "osSKU": "Ubuntu", - "nodeImageVersion": "AKSUbuntu-2204gen2containerd-202306.01.0", - "enableFIPS": false - } - } + body: "" headers: Cache-Control: - no-cache - Content-Type: - - application/json + Content-Length: + - "0" Expires: - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 Pragma: - no-cache - Server: - - nginx + Retry-After: + - "15" Strict-Transport-Security: - max-age=31536000; includeSubDomains - Vary: - - 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-dwrfmg?api-version=2020-06-01 - method: DELETE + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + method: GET response: body: "" headers: @@ -1578,7 +2744,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "0" + - "8" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1608,7 +2774,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "1" + - "9" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1638,7 +2804,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "2" + - "10" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1668,7 +2834,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "3" + - "11" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1698,7 +2864,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "4" + - "12" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1728,7 +2894,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "5" + - "13" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1758,7 +2924,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "6" + - "14" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1788,7 +2954,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "7" + - "15" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1818,7 +2984,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "8" + - "16" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1848,7 +3014,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "9" + - "17" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1878,7 +3044,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "10" + - "18" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1908,7 +3074,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "11" + - "19" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1938,7 +3104,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "12" + - "20" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1968,7 +3134,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "13" + - "21" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -1998,7 +3164,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "14" + - "22" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2028,7 +3194,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "15" + - "23" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2058,7 +3224,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "16" + - "24" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2088,7 +3254,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "17" + - "25" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2118,7 +3284,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "18" + - "26" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2148,7 +3314,7 @@ interactions: form: {} headers: Test-Request-Attempt: - - "19" + - "27" url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkREV1JGTUctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 method: GET response: @@ -2169,6 +3335,72 @@ interactions: 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-dwrfmg/providers/Microsoft.Storage/storageAccounts/asoworkspacestorageacct?api-version=2021-04-01 + method: DELETE + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-dwrfmg'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + 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-dwrfmg/providers/Microsoft.MachineLearningServices/workspaces/sampleworkspaces?api-version=2021-07-01 + method: DELETE + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-dwrfmg'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + duration: "" - request: body: "" form: {} @@ -2235,6 +3467,40 @@ interactions: status: 404 Not Found code: 404 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-dwrfmg/providers/Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview/trustedAccessRoleBindings/sample-tarb?api-version=2023-02-02-preview + method: DELETE + response: + body: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.ContainerService/managedClusters/samplemanagedcluster202221preview'' + under resource group ''asotest-rg-dwrfmg'' was not found. For more details please + go to https://aka.ms/ARMResourceNotFoundFix"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "265" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + duration: "" - request: body: "" form: {} diff --git a/v2/internal/controllers/recordings/Test_WhenObjectPullSecretsAndSecretAlreadyExists_WarningConditionIsSet.yaml b/v2/internal/controllers/recordings/Test_WhenObjectPullSecretsAndSecretAlreadyExists_WarningConditionIsSet.yaml index 9edcce6e69..e65be5023f 100644 --- a/v2/internal/controllers/recordings/Test_WhenObjectPullSecretsAndSecretAlreadyExists_WarningConditionIsSet.yaml +++ b/v2/internal/controllers/recordings/Test_WhenObjectPullSecretsAndSecretAlreadyExists_WarningConditionIsSet.yaml @@ -91,7 +91,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 Pragma: - no-cache Retry-After: @@ -111,7 +111,7 @@ interactions: headers: Test-Request-Attempt: - "0" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 method: GET response: body: "" @@ -125,7 +125,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 Pragma: - no-cache Retry-After: @@ -145,7 +145,7 @@ interactions: headers: Test-Request-Attempt: - "1" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 method: GET response: body: "" @@ -159,7 +159,7 @@ interactions: Expires: - "-1" Location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 Pragma: - no-cache Retry-After: @@ -179,7 +179,41 @@ interactions: headers: Test-Request-Attempt: - "2" - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/4387a8b0-f6c2-44e2-8eda-101afef6f075?monitor=true&api-version=2021-04-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 + method: GET + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Content-Type: + - text/plain; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 + Pragma: + - no-cache + Retry-After: + - "3" + Server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + 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: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus2/asyncoperations/be09050d-3ce8-495c-bc7d-175f73a61381?monitor=true&api-version=2021-04-01 method: GET response: body: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-vpiycg/providers/Microsoft.Storage/storageAccounts/asoteststordumepp","name":"asoteststordumepp","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"keyCreationTime":{"key1":"2001-02-03T04:05:06Z","key2":"2001-02-03T04:05:06Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2001-02-03T04:05:06Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2001-02-03T04:05:06Z","primaryEndpoints":{"dfs":"https://asoteststordumepp.dfs.core.windows.net/","web":"https://asoteststordumepp.z5.web.core.windows.net/","blob":"https://asoteststordumepp.blob.core.windows.net/","queue":"https://asoteststordumepp.queue.core.windows.net/","table":"https://asoteststordumepp.table.core.windows.net/","file":"https://asoteststordumepp.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' diff --git a/v2/internal/reconcilers/arm/azure_generic_arm_reconciler_instance.go b/v2/internal/reconcilers/arm/azure_generic_arm_reconciler_instance.go index aa999d9578..95af1a02e8 100644 --- a/v2/internal/reconcilers/arm/azure_generic_arm_reconciler_instance.go +++ b/v2/internal/reconcilers/arm/azure_generic_arm_reconciler_instance.go @@ -47,8 +47,8 @@ func newAzureDeploymentReconcilerInstance( log logr.Logger, recorder record.EventRecorder, connection Connection, - reconciler AzureDeploymentReconciler) *azureDeploymentReconcilerInstance { - + reconciler AzureDeploymentReconciler, +) *azureDeploymentReconcilerInstance { return &azureDeploymentReconcilerInstance{ Obj: metaObj, Log: log, @@ -357,7 +357,7 @@ func (r *azureDeploymentReconcilerInstance) preReconciliationCheck(ctx context.C } // Run our pre-reconciliation checker - check, checkErr := checker(ctx, r.Obj, owner, r.KubeClient, r.ARMConnection.Client(), r.Log) + check, checkErr := checker(ctx, r.Obj, owner, r.ResourceResolver, r.ARMConnection.Client(), r.Log) if checkErr != nil { // Something went wrong running the check. return extensions.PreReconcileCheckResult{}, checkErr @@ -487,7 +487,7 @@ func (r *azureDeploymentReconcilerInstance) postReconciliationCheck(ctx context. } // Run our post-reconciliation checker - check, checkErr := checker(ctx, r.Obj, owner, r.KubeClient, r.ARMConnection.Client(), r.Log) + check, checkErr := checker(ctx, r.Obj, owner, r.ResourceResolver, r.ARMConnection.Client(), r.Log) if checkErr != nil { // Something went wrong running the check. return extensions.PostReconcileCheckResult{}, checkErr diff --git a/v2/pkg/genruntime/extensions/postreconciliation_checker.go b/v2/pkg/genruntime/extensions/postreconciliation_checker.go index e3fde2bcc5..e6bf91580a 100644 --- a/v2/pkg/genruntime/extensions/postreconciliation_checker.go +++ b/v2/pkg/genruntime/extensions/postreconciliation_checker.go @@ -7,13 +7,13 @@ package extensions import ( "context" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/go-logr/logr" "github.com/pkg/errors" "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/kubeclient" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" ) @@ -35,7 +35,7 @@ type PostReconciliationChecker interface { ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, next PostReconcileCheckFunc, @@ -46,7 +46,7 @@ type PostReconcileCheckFunc func( ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, ) (PostReconcileCheckResult, error) @@ -123,13 +123,13 @@ func CreatePostReconciliationChecker( ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, ) (PostReconcileCheckResult, error) { log.V(Status).Info("Extension post-reconcile check running") - result, err := impl.PostReconcileCheck(ctx, obj, owner, kubeClient, armClient, log, alwaysSucceed) + result, err := impl.PostReconcileCheck(ctx, obj, owner, resourceResolver, armClient, log, alwaysSucceed) if err != nil { log.V(Status).Info( "Extension post-reconcile check failed", @@ -152,7 +152,7 @@ func alwaysSucceed( _ context.Context, _ genruntime.MetaObject, _ genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, ) (PostReconcileCheckResult, error) { diff --git a/v2/pkg/genruntime/extensions/prereconciliation_checker.go b/v2/pkg/genruntime/extensions/prereconciliation_checker.go index 1dc2729b09..73d6f649c0 100644 --- a/v2/pkg/genruntime/extensions/prereconciliation_checker.go +++ b/v2/pkg/genruntime/extensions/prereconciliation_checker.go @@ -9,7 +9,7 @@ import ( "context" "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/kubeclient" + "github.com/Azure/azure-service-operator/v2/internal/resolver" "github.com/Azure/azure-service-operator/v2/pkg/genruntime" "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" "github.com/go-logr/logr" @@ -33,7 +33,7 @@ type PreReconciliationChecker interface { ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, next PreReconcileCheckFunc, @@ -44,7 +44,7 @@ type PreReconcileCheckFunc func( ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, ) (PreReconcileCheckResult, error) @@ -132,13 +132,13 @@ func CreatePreReconciliationChecker( ctx context.Context, obj genruntime.MetaObject, owner genruntime.MetaObject, - kubeClient kubeclient.Client, + resourceResolver *resolver.Resolver, armClient *genericarmclient.GenericClient, log logr.Logger, ) (PreReconcileCheckResult, error) { log.V(Status).Info("Extension pre-reconcile check running") - result, err := impl.PreReconcileCheck(ctx, obj, owner, kubeClient, armClient, log, alwaysReconcile) + result, err := impl.PreReconcileCheck(ctx, obj, owner, resourceResolver, armClient, log, alwaysReconcile) if err != nil { log.V(Status).Info( "Extension pre-reconcile check failed", @@ -164,7 +164,7 @@ func alwaysReconcile( _ context.Context, _ genruntime.MetaObject, _ genruntime.MetaObject, - _ kubeclient.Client, + _ *resolver.Resolver, _ *genericarmclient.GenericClient, _ logr.Logger, ) (PreReconcileCheckResult, error) { diff --git a/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401_storageaccount.yaml b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401_storageaccount.yaml new file mode 100644 index 0000000000..a005d1113c --- /dev/null +++ b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401_storageaccount.yaml @@ -0,0 +1,13 @@ +apiVersion: storage.azure.com/v1api20210401 +kind: StorageAccount +metadata: + name: asoworkspacestorageacct + namespace: default +spec: + location: westus3 + kind: BlobStorage + sku: + name: Standard_LRS + owner: + name: aso-sample-rg + accessTier: Hot diff --git a/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401preview_vault.yaml b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401preview_vault.yaml new file mode 100644 index 0000000000..0164d1dab4 --- /dev/null +++ b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210401preview_vault.yaml @@ -0,0 +1,27 @@ +apiVersion: keyvault.azure.com/v1api20210401preview +kind: Vault +metadata: + name: mlworkspaces-vault + namespace: default +spec: + location: westus3 + owner: + name: aso-sample-rg + properties: + tenantId: 00000000-0000-0000-0000-000000000000 + sku: + family: A + name: standard + accessPolicies: + - applicationId: 1C793267-c310-d4ae-7BD5-5Af5BEF875D3 + objectId: 1C793267-c310-d4ae-7BD5-5Af5BEF875D3 + tenantId: 00000000-0000-0000-0000-000000000000 + permissions: + certificates: + - get + keys: + - get + secrets: + - get + storage: + - get diff --git a/v2/samples/containerservice/v1api20230202preview/refs/v1api20210701_workspace.yaml b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210701_workspace.yaml new file mode 100644 index 0000000000..6b39603226 --- /dev/null +++ b/v2/samples/containerservice/v1api20230202preview/refs/v1api20210701_workspace.yaml @@ -0,0 +1,23 @@ +apiVersion: machinelearningservices.azure.com/v1api20210701 +kind: Workspace +metadata: + name: sampleworkspaces + namespace: default +spec: + location: westus3 + owner: + name: aso-sample-rg + sku: + name: Standard_S1 + tier: Basic + allowPublicAccessWhenBehindVnet: false + identity: + type: SystemAssigned + storageAccountReference: + group: storage.azure.com + kind: StorageAccount + name: asoworkspacestorageacct + keyVaultReference: + group: keyvault.azure.com + kind: Vault + name: mlworkspaces-vault diff --git a/v2/samples/containerservice/v1api20230202preview/v1api20230202preview_trustedaccessrolebinding.yaml b/v2/samples/containerservice/v1api20230202preview/v1api20230202preview_trustedaccessrolebinding.yaml new file mode 100644 index 0000000000..cf18d66dcf --- /dev/null +++ b/v2/samples/containerservice/v1api20230202preview/v1api20230202preview_trustedaccessrolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: containerservice.azure.com/v1api20230202preview +kind: TrustedAccessRoleBinding +metadata: + name: sample-tarb + namespace: default +spec: + owner: + name: samplemanagedcluster202221preview + roles: + - Microsoft.MachineLearningServices/workspaces/mlworkload + sourceResourceReference: + group: machinelearningservices.azure.com + kind: Workspace + name: sampleworkspaces diff --git a/v2/tools/generator/internal/armconversion/shared.go b/v2/tools/generator/internal/armconversion/shared.go index 45a39f8fa4..27b9daa5e2 100644 --- a/v2/tools/generator/internal/armconversion/shared.go +++ b/v2/tools/generator/internal/armconversion/shared.go @@ -37,13 +37,18 @@ const ( TypeKindStatus ) +const ( + ConversionTag = "conversion" + NoARMConversionValue = "noarmconversion" +) + func (builder conversionBuilder) propertyConversionHandler( toProp *astmodel.PropertyDefinition, fromType *astmodel.ObjectType, ) []dst.Stmt { for _, conversionHandler := range builder.propertyConversionHandlers { stmts, matched := conversionHandler(toProp, fromType) - if matched { + if matched || toProp.HasTagValue(ConversionTag, NoARMConversionValue) { return stmts } } diff --git a/v2/tools/generator/internal/codegen/embeddedresources/remover.go b/v2/tools/generator/internal/codegen/embeddedresources/remover.go index 17cfe749a6..8b27877301 100644 --- a/v2/tools/generator/internal/codegen/embeddedresources/remover.go +++ b/v2/tools/generator/internal/codegen/embeddedresources/remover.go @@ -347,7 +347,7 @@ func findResourcesEmbeddedInParent(configuration *config.Configuration, defs ast continue } - parentResource, err := configuration.ObjectModelConfiguration.LookupResourceEmbeddedInParent(name) + parentResource, err := configuration.ObjectModelConfiguration.ResourceEmbeddedInParent.Lookup(name) if err != nil { if config.IsNotConfiguredError(err) { // $isResource is not configured, skip this object @@ -380,7 +380,7 @@ func findResourcesEmbeddedInParent(configuration *config.Configuration, defs ast } // Ensure that all the $isResource properties were used - err = configuration.ObjectModelConfiguration.VerifyResourceEmbeddedInParentConsumed() + err = configuration.ObjectModelConfiguration.ResourceEmbeddedInParent.VerifyConsumed() if err != nil { return nil, err } diff --git a/v2/tools/generator/internal/codegen/pipeline/add_configmaps_test.go b/v2/tools/generator/internal/codegen/pipeline/add_configmaps_test.go index 0b9b6556cc..da0d53fde5 100644 --- a/v2/tools/generator/internal/codegen/pipeline/add_configmaps_test.go +++ b/v2/tools/generator/internal/codegen/pipeline/add_configmaps_test.go @@ -40,7 +40,7 @@ func TestAddConfigMaps_AddsSpecWithRequiredConfigMaps(t *testing.T) { spec.Name(), test.FullNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeRequired) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeRequired) return nil })). To(Succeed()) @@ -49,7 +49,7 @@ func TestAddConfigMaps_AddsSpecWithRequiredConfigMaps(t *testing.T) { spec.Name(), test.FamilyNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeOptional) return nil })). To(Succeed()) @@ -58,7 +58,7 @@ func TestAddConfigMaps_AddsSpecWithRequiredConfigMaps(t *testing.T) { spec.Name(), test.RestrictedNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeOptional) return nil })). To(Succeed()) diff --git a/v2/tools/generator/internal/codegen/pipeline/add_kubernetes_exporter_test.go b/v2/tools/generator/internal/codegen/pipeline/add_kubernetes_exporter_test.go index 25802db82b..82f7244a01 100644 --- a/v2/tools/generator/internal/codegen/pipeline/add_kubernetes_exporter_test.go +++ b/v2/tools/generator/internal/codegen/pipeline/add_kubernetes_exporter_test.go @@ -34,11 +34,10 @@ func TestAddKubernetesExporter_AutomaticallyGeneratesExportedConfigMaps(t *testi omc.ModifyType( resource.Name(), func(typ *config.TypeConfiguration) error { - typ.SetGeneratedConfigs( - map[string]string{ - "statusProp": "$.Status.Status", - "optionalStringProp": "$.Status.OptionalString", - }) + typ.GeneratedConfigs.Set(map[string]string{ + "statusProp": "$.Status.Status", + "optionalStringProp": "$.Status.OptionalString", + }) return nil }, )). diff --git a/v2/tools/generator/internal/codegen/pipeline/add_operator_spec.go b/v2/tools/generator/internal/codegen/pipeline/add_operator_spec.go index 5a38dd6d9c..f961f0fcd0 100644 --- a/v2/tools/generator/internal/codegen/pipeline/add_operator_spec.go +++ b/v2/tools/generator/internal/codegen/pipeline/add_operator_spec.go @@ -42,15 +42,15 @@ func AddOperatorSpec(configuration *config.Configuration, idFactory astmodel.Ide // confirm that all the Azure generated secrets were used. Note that this also indirectly confirms that // this property was only used on resources, since that's the only place we try to check it from. If it's // set on anything else it will be labeled unconsumed. - err := configuration.ObjectModelConfiguration.VerifyAzureGeneratedSecretsConsumed() + err := configuration.ObjectModelConfiguration.AzureGeneratedSecrets.VerifyConsumed() if err != nil { return nil, err } - err = configuration.ObjectModelConfiguration.VerifyGeneratedConfigsConsumed() + err = configuration.ObjectModelConfiguration.GeneratedConfigs.VerifyConsumed() if err != nil { return nil, err } - err = configuration.ObjectModelConfiguration.VerifyManualConfigsConsumed() + err = configuration.ObjectModelConfiguration.ManualConfigs.VerifyConsumed() if err != nil { return nil, err } @@ -73,7 +73,7 @@ func createOperatorSpecIfNeeded( } hasSecrets := false - secrets, err := configuration.ObjectModelConfiguration.AzureGeneratedSecrets(resolved.ResourceDef.Name()) + secrets, err := configuration.ObjectModelConfiguration.AzureGeneratedSecrets.Lookup(resolved.ResourceDef.Name()) if err == nil { hasSecrets = true } else if err != nil { @@ -257,7 +257,7 @@ func getConfigMapProperties( configuration *config.Configuration, resource astmodel.TypeDefinition) ([]string, ExportedProperties, error) { - configMapPaths, err := configuration.ObjectModelConfiguration.GeneratedConfigs(resource.Name()) + configMapPaths, err := configuration.ObjectModelConfiguration.GeneratedConfigs.Lookup(resource.Name()) if err != nil { // If error is just that there's no configured secrets, proceed if !config.IsNotConfiguredError(err) { @@ -265,7 +265,7 @@ func getConfigMapProperties( } } - additionalConfigMaps, err := configuration.ObjectModelConfiguration.ManualConfigs(resource.Name()) + additionalConfigMaps, err := configuration.ObjectModelConfiguration.ManualConfigs.Lookup(resource.Name()) if err != nil { // If error is just that there's no configured secrets, proceed if !config.IsNotConfiguredError(err) { diff --git a/v2/tools/generator/internal/codegen/pipeline/add_operator_spec_test.go b/v2/tools/generator/internal/codegen/pipeline/add_operator_spec_test.go index 123126468c..a1ade33e14 100644 --- a/v2/tools/generator/internal/codegen/pipeline/add_operator_spec_test.go +++ b/v2/tools/generator/internal/codegen/pipeline/add_operator_spec_test.go @@ -34,7 +34,7 @@ func TestGolden_AddOperatorSpec_AddsSpecWithConfiguredSecrets(t *testing.T) { omc.ModifyType( resource.Name(), func(tc *config.TypeConfiguration) error { - tc.SetAzureGeneratedSecrets([]string{"key1"}) + tc.AzureGeneratedSecrets.Set([]string{"key1"}) return nil })). To(Succeed()) @@ -71,10 +71,9 @@ func TestAddOperatorSpec_AddsSpecWithConfiguredConfigMaps(t *testing.T) { omc.ModifyType( resource.Name(), func(typ *config.TypeConfiguration) error { - typ.SetGeneratedConfigs( - map[string]string{ - "statusProp": "$.Status.Status", - }) + typ.GeneratedConfigs.Set(map[string]string{ + "statusProp": "$.Status.Status", + }) return nil }, )). @@ -112,7 +111,7 @@ func TestAddOperatorSpec_AddsSpecWithManualConfigMaps(t *testing.T) { omc.ModifyType( resource.Name(), func(tc *config.TypeConfiguration) error { - tc.SetManualConfigs([]string{"config1"}) + tc.ManualConfigs.Set([]string{"config1"}) return nil })). To(Succeed()) diff --git a/v2/tools/generator/internal/codegen/pipeline/apply_defaulter_and_validator_interfaces.go b/v2/tools/generator/internal/codegen/pipeline/apply_defaulter_and_validator_interfaces.go index c014579d5b..fc43ef0690 100644 --- a/v2/tools/generator/internal/codegen/pipeline/apply_defaulter_and_validator_interfaces.go +++ b/v2/tools/generator/internal/codegen/pipeline/apply_defaulter_and_validator_interfaces.go @@ -53,7 +53,7 @@ func ApplyDefaulterAndValidatorInterfaces(configuration *config.Configuration, i updatedDefs.Add(resource) } - err := configuration.ObjectModelConfiguration.VerifyDefaultAzureNameConsumed() + err := configuration.ObjectModelConfiguration.DefaultAzureName.VerifyConsumed() if err != nil { return nil, err } @@ -78,7 +78,7 @@ func getDefaults( return nil, errors.Wrapf(err, "unable to resolve resource %s", resourceDef.Name()) } - defaultAzureName, err := configuration.ObjectModelConfiguration.LookupDefaultAzureName(resourceDef.Name()) + defaultAzureName, err := configuration.ObjectModelConfiguration.DefaultAzureName.Lookup(resourceDef.Name()) if err != nil { if config.IsNotConfiguredError(err) { // Default to true if we have no explicit configuration @@ -160,7 +160,7 @@ func getValidations( } // Note: This isn't defined in the functions package because it has a dependency on getResourceSecretsType which -// doesn't make a lot of sense to put into astmodel. Functions can't import code from pipelines though so we just +// doesn't make a lot of sense to put into astmodel. Functions can't import code from pipelines though, so we just // define this function here. func NewValidateSecretDestinationsFunction(resource *astmodel.ResourceType, idFactory astmodel.IdentifierFactory) *functions.ResourceFunction { diff --git a/v2/tools/generator/internal/codegen/pipeline/apply_export_filters.go b/v2/tools/generator/internal/codegen/pipeline/apply_export_filters.go index 69c67d8870..d93e9ed284 100644 --- a/v2/tools/generator/internal/codegen/pipeline/apply_export_filters.go +++ b/v2/tools/generator/internal/codegen/pipeline/apply_export_filters.go @@ -72,16 +72,17 @@ func filterTypes( // Find and apply renames renames := make(map[astmodel.TypeName]astmodel.TypeName) for n := range typesToExport { - if as, asErr := configuration.ObjectModelConfiguration.LookupExportAs(n); asErr == nil { + if as, asErr := configuration.ObjectModelConfiguration.ExportAs.Lookup(n); asErr == nil { + configuration.ObjectModelConfiguration.AddTypeAlias(n, as) renames[n] = n.WithName(as) } } - if err = configuration.ObjectModelConfiguration.VerifyExportConsumed(); err != nil { + if err = configuration.ObjectModelConfiguration.Export.VerifyConsumed(); err != nil { return nil, err } - if err = configuration.ObjectModelConfiguration.VerifyExportAsConsumed(); err != nil { + if err = configuration.ObjectModelConfiguration.ExportAs.VerifyConsumed(); err != nil { return nil, err } @@ -97,7 +98,7 @@ func filterTypes( // shouldExport works out whether the specified Resource should be exported or not func shouldExport(defName astmodel.TypeName, configuration *config.Configuration) (bool, error) { - export, err := configuration.ObjectModelConfiguration.LookupExport(defName) + export, err := configuration.ObjectModelConfiguration.Export.Lookup(defName) if err == nil { // $export is configured, return that value return export, nil @@ -108,7 +109,7 @@ func shouldExport(defName astmodel.TypeName, configuration *config.Configuration return false, errors.Wrapf(err, "looking up export config for %s", defName) } - _, err = configuration.ObjectModelConfiguration.LookupExportAs(defName) + _, err = configuration.ObjectModelConfiguration.ExportAs.Lookup(defName) if err == nil { // $exportAs is configured, we DO want to export return true, nil diff --git a/v2/tools/generator/internal/codegen/pipeline/apply_is_resource_overrides.go b/v2/tools/generator/internal/codegen/pipeline/apply_is_resource_overrides.go index aee0fc88ec..973e07dec0 100644 --- a/v2/tools/generator/internal/codegen/pipeline/apply_is_resource_overrides.go +++ b/v2/tools/generator/internal/codegen/pipeline/apply_is_resource_overrides.go @@ -27,7 +27,7 @@ func ApplyIsResourceOverrides(configuration *config.Configuration) *Stage { continue } - isResource, err := configuration.ObjectModelConfiguration.LookupIsResource(name) + isResource, err := configuration.ObjectModelConfiguration.IsResource.Lookup(name) if err != nil { if config.IsNotConfiguredError(err) { // $isResource is not configured, skip this object @@ -51,7 +51,7 @@ func ApplyIsResourceOverrides(configuration *config.Configuration) *Stage { } // Ensure that all the $isResource properties were used - err = configuration.ObjectModelConfiguration.VerifyIsResourceConsumed() + err = configuration.ObjectModelConfiguration.IsResource.VerifyConsumed() if err != nil { return nil, err } diff --git a/v2/tools/generator/internal/codegen/pipeline/create_arm_types.go b/v2/tools/generator/internal/codegen/pipeline/create_arm_types.go index 42e3bcdd00..199cf53de1 100644 --- a/v2/tools/generator/internal/codegen/pipeline/create_arm_types.go +++ b/v2/tools/generator/internal/codegen/pipeline/create_arm_types.go @@ -40,7 +40,7 @@ func CreateARMTypes( newDefs := astmodel.TypesDisjointUnion(armTypes, state.Definitions()) - if err := configuration.VerifyPayloadTypeConsumed(); err != nil { + if err := configuration.PayloadType.VerifyConsumed(); err != nil { return nil, err } @@ -542,7 +542,7 @@ func (c *armTypeCreator) createSpecConversionContext(name astmodel.TypeName) (*a } func (c *armTypeCreator) createConversionContext(name astmodel.TypeName) (*armPropertyTypeConversionContext, error) { - payloadType, err := c.configuration.LookupPayloadType(name) + payloadType, err := c.configuration.PayloadType.Lookup(name.PackageReference) if err != nil { if config.IsNotConfiguredError(err) { // Default to 'omitempty' if not configured diff --git a/v2/tools/generator/internal/codegen/pipeline/create_arm_types_test.go b/v2/tools/generator/internal/codegen/pipeline/create_arm_types_test.go index c89fb166b8..8aac359270 100644 --- a/v2/tools/generator/internal/codegen/pipeline/create_arm_types_test.go +++ b/v2/tools/generator/internal/codegen/pipeline/create_arm_types_test.go @@ -92,7 +92,7 @@ func TestCreateFlattenedARMTypeWithResourceRef_CreatesExpectedConversions(t *tes specProperties.Name(), test.FamilyNameProperty.PropertyName(), func(propertyConfiguration *config.PropertyConfiguration) error { - propertyConfiguration.SetARMReference(true) + propertyConfiguration.ARMReference.Set(true) return nil })).To(Succeed()) @@ -150,7 +150,7 @@ func TestCreateFlattenedARMTypeWithConfigMap_CreatesExpectedConversions(t *testi specProperties.Name(), test.FullNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeRequired) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeRequired) return nil })). To(Succeed()) @@ -159,7 +159,7 @@ func TestCreateFlattenedARMTypeWithConfigMap_CreatesExpectedConversions(t *testi specProperties.Name(), test.FamilyNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeOptional) return nil })). To(Succeed()) @@ -217,7 +217,7 @@ func TestCreateARMTypeWithConfigMap_CreatesExpectedConversions(t *testing.T) { specProperties.Name(), test.FullNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeRequired) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeRequired) return nil })). To(Succeed()) @@ -226,7 +226,7 @@ func TestCreateARMTypeWithConfigMap_CreatesExpectedConversions(t *testing.T) { specProperties.Name(), test.FamilyNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeOptional) return nil })). To(Succeed()) @@ -235,7 +235,7 @@ func TestCreateARMTypeWithConfigMap_CreatesExpectedConversions(t *testing.T) { specProperties.Name(), test.RestrictedNameProperty.PropertyName(), func(pc *config.PropertyConfiguration) error { - pc.SetImportConfigMapMode(config.ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(config.ImportConfigMapModeOptional) return nil })). To(Succeed()) diff --git a/v2/tools/generator/internal/codegen/pipeline/create_types_for_backwards_compatibility.go b/v2/tools/generator/internal/codegen/pipeline/create_types_for_backwards_compatibility.go index d40d13210f..5c90ce3aae 100644 --- a/v2/tools/generator/internal/codegen/pipeline/create_types_for_backwards_compatibility.go +++ b/v2/tools/generator/internal/codegen/pipeline/create_types_for_backwards_compatibility.go @@ -113,7 +113,7 @@ func findResourcesRequiringCompatibilityVersion( for name, def := range resources { // Find out when we started supporting this resource - from, err := configuration.LookupSupportedFrom(name) + from, err := configuration.SupportedFrom.Lookup(name) if err != nil { if config.IsNotConfiguredError(err) { // $supportedFrom is not configured, skip this resource diff --git a/v2/tools/generator/internal/codegen/pipeline/inject_spec_initialization_functions.go b/v2/tools/generator/internal/codegen/pipeline/inject_spec_initialization_functions.go index 4e5c0e20f2..b8e8cdb6d3 100644 --- a/v2/tools/generator/internal/codegen/pipeline/inject_spec_initialization_functions.go +++ b/v2/tools/generator/internal/codegen/pipeline/inject_spec_initialization_functions.go @@ -166,7 +166,7 @@ func (s *specInitializationScanner) findResources() (astmodel.TypeDefinitionSet, } // Check configuration to see if this resource should be supported - importable, err := s.config.LookupImportable(def.Name()) + importable, err := s.config.Importable.Lookup(def.Name()) if err != nil { if config.IsNotConfiguredError(err) { // Default to true if we have no explicit configuration diff --git a/v2/tools/generator/internal/codegen/pipeline/prune_resources_with_lifecycle_owned_by_parent.go b/v2/tools/generator/internal/codegen/pipeline/prune_resources_with_lifecycle_owned_by_parent.go index 6213db01ae..d5a940962c 100644 --- a/v2/tools/generator/internal/codegen/pipeline/prune_resources_with_lifecycle_owned_by_parent.go +++ b/v2/tools/generator/internal/codegen/pipeline/prune_resources_with_lifecycle_owned_by_parent.go @@ -10,6 +10,7 @@ import ( "github.com/pkg/errors" + "github.com/Azure/azure-service-operator/v2/tools/generator/internal/armconversion" "github.com/Azure/azure-service-operator/v2/tools/generator/internal/astmodel" "github.com/Azure/azure-service-operator/v2/tools/generator/internal/config" ) @@ -32,7 +33,7 @@ func PruneResourcesWithLifecycleOwnedByParent(configuration *config.Configuratio return nil, err } - visitor := newMisbehavingEmbeddedTypeVisitor(configuration) + pruner := newMisbehavingEmbeddedTypeVisitor(configuration) // TODO: This is a hack placed here to protect future releases from include VNET but not // TODO: the corresponding Subnet. Each networking APIVersion that supports VNET must also @@ -50,13 +51,18 @@ func PruneResourcesWithLifecycleOwnedByParent(configuration *config.Configuratio for _, def := range state.Definitions() { var updatedDef astmodel.TypeDefinition - updatedDef, err = visitor.VisitDefinition(def, def.Name()) + updatedDef, err = pruner.visitor.VisitDefinition(def, def.Name()) if err != nil { return nil, errors.Wrapf(err, "failed to visit definition %s", def.Name()) } result.Add(updatedDef) } + result, err = flagPrunedEmptyProperties(result, pruner.emptyPrunedProperties) + if err != nil { + return nil, err + } + err = configuration.VerifyResourceLifecycleOwnedByParentConsumed() if err != nil { return nil, err @@ -69,19 +75,69 @@ func PruneResourcesWithLifecycleOwnedByParent(configuration *config.Configuratio return stage } +func flagPrunedEmptyProperties(defs astmodel.TypeDefinitionSet, emptyPrunedProps astmodel.TypeNameSet) (astmodel.TypeDefinitionSet, error) { + emptyObjectVisitor := astmodel.TypeVisitorBuilder{ + VisitObjectType: tagEmptyObjectARMProperty, + }.Build() + + emptyPrunedPropertiesArm := astmodel.NewTypeNameSet() + for emptyPrunedProp := range emptyPrunedProps { + // we need to add the noConversion tag on ARM type for the empty pruned property to relax the validation for convertToARM function. + armDef, err := GetARMTypeDefinition(defs, emptyPrunedProp) + if err != nil { + return nil, err + } + emptyPrunedPropertiesArm.Add(armDef.Name()) + } + + result, err := emptyObjectVisitor.VisitDefinitions(defs, emptyPrunedPropertiesArm) + if err != nil { + return nil, err + + } + + return result, nil +} + type misbehavingEmbeddedTypePruner struct { - configuration *config.Configuration + configuration *config.Configuration + emptyPrunedProperties astmodel.TypeNameSet + visitor astmodel.TypeVisitor } -func newMisbehavingEmbeddedTypeVisitor(configuration *config.Configuration) astmodel.TypeVisitor { +func newMisbehavingEmbeddedTypeVisitor(configuration *config.Configuration) *misbehavingEmbeddedTypePruner { pruner := &misbehavingEmbeddedTypePruner{ - configuration: configuration, + configuration: configuration, + emptyPrunedProperties: astmodel.NewTypeNameSet(), } visitor := astmodel.TypeVisitorBuilder{ VisitObjectType: pruner.pruneMisbehavingEmbeddedResourceProperties, + }.Build() + + pruner.visitor = visitor + return pruner +} + +// tagEmptyObjectARMProperty finds the empty properties in an Object and adds the ConversionTag:NoARMConversionValue property tag. +func tagEmptyObjectARMProperty(this *astmodel.TypeVisitor, it *astmodel.ObjectType, ctx interface{}) (astmodel.Type, error) { + typeNameSet := ctx.(astmodel.TypeNameSet) + + prop, ok := it.Properties().Find(func(prop *astmodel.PropertyDefinition) bool { + typeName, ok := astmodel.ExtractTypeName(prop.PropertyType()) + if !ok { + return false + } + + return typeNameSet.Contains(typeName) + }) + + if ok { + prop = prop.WithTag(armconversion.ConversionTag, armconversion.NoARMConversionValue) + it = it.WithProperty(prop) } - return visitor.Build() + + return astmodel.IdentityVisitOfObjectType(this, it, ctx) } func (m *misbehavingEmbeddedTypePruner) pruneMisbehavingEmbeddedResourceProperties(this *astmodel.TypeVisitor, it *astmodel.ObjectType, ctx interface{}) (astmodel.Type, error) { @@ -97,6 +153,9 @@ func (m *misbehavingEmbeddedTypePruner) pruneMisbehavingEmbeddedResourceProperti } it = it.WithoutProperty(prop.PropertyName()) + if it.Properties().Len() == 0 { + m.emptyPrunedProperties.Add(typeName) + } } return astmodel.IdentityVisitOfObjectType(this, it, ctx) diff --git a/v2/tools/generator/internal/codegen/pipeline/report_resource_versions.go b/v2/tools/generator/internal/codegen/pipeline/report_resource_versions.go index df6c7cf094..8c30939693 100644 --- a/v2/tools/generator/internal/codegen/pipeline/report_resource_versions.go +++ b/v2/tools/generator/internal/codegen/pipeline/report_resource_versions.go @@ -59,7 +59,7 @@ func ReportResourceVersions(configuration *config.Configuration) *Stage { return nil, kerrors.NewAggregate(errs) } - err = configuration.ObjectModelConfiguration.VerifySupportedFromConsumed() + err = configuration.ObjectModelConfiguration.SupportedFrom.VerifyConsumed() return state, err }) } @@ -604,7 +604,7 @@ func (report *ResourceVersionsReport) generateSampleLink(name astmodel.TypeName, } func (report *ResourceVersionsReport) supportedFrom(typeName astmodel.TypeName) string { - supportedFrom, err := report.objectModelConfiguration.LookupSupportedFrom(typeName) + supportedFrom, err := report.objectModelConfiguration.SupportedFrom.Lookup(typeName) if err != nil { return "" // Leave it blank } diff --git a/v2/tools/generator/internal/codegen/pipeline/report_resource_versions_test.go b/v2/tools/generator/internal/codegen/pipeline/report_resource_versions_test.go index ae234ced0e..9c24b1f97f 100644 --- a/v2/tools/generator/internal/codegen/pipeline/report_resource_versions_test.go +++ b/v2/tools/generator/internal/codegen/pipeline/report_resource_versions_test.go @@ -68,7 +68,7 @@ func TestGolden_ReportAllResourceVersions(t *testing.T) { // utility function used to configure a which ASO version from which a resource was supported supportedFrom := func(from string) func(tc *config.TypeConfiguration) error { return func(tc *config.TypeConfiguration) error { - tc.SetSupportedFrom(from) + tc.SupportedFrom.Set(from) return nil } } diff --git a/v2/tools/generator/internal/codegen/storage/conversion_graph_test.go b/v2/tools/generator/internal/codegen/storage/conversion_graph_test.go index 7c2346e3b7..f951e57559 100644 --- a/v2/tools/generator/internal/codegen/storage/conversion_graph_test.go +++ b/v2/tools/generator/internal/codegen/storage/conversion_graph_test.go @@ -154,7 +154,7 @@ func Test_ConversionGraph_WhenRenameConfigured_FindsRenamedType(t *testing.T) { omc.ModifyType( person2020.Name(), func(tc *config.TypeConfiguration) error { - tc.SetNameInNextVersion(party2021.Name().Name()) + tc.NameInNextVersion.Set(party2021.Name().Name()) return nil })). To(Succeed()) @@ -195,7 +195,7 @@ func Test_ConversionGraph_WhenRenameSpecifiesMissingType_ReturnsError(t *testing omc.ModifyType( person2020.Name(), func(tc *config.TypeConfiguration) error { - tc.SetNameInNextVersion("Phantom") + tc.NameInNextVersion.Set("Phantom") return nil })). To(Succeed()) @@ -239,7 +239,7 @@ func Test_ConversionGraph_WhenRenameSpecifiesConflictingType_ReturnsError(t *tes omc.ModifyType( person2020.Name(), func(tc *config.TypeConfiguration) error { - tc.SetNameInNextVersion(party2021.Name().Name()) + tc.NameInNextVersion.Set(party2021.Name().Name()) return nil })). To(Succeed()) diff --git a/v2/tools/generator/internal/codegen/storage/group_conversion_graph.go b/v2/tools/generator/internal/codegen/storage/group_conversion_graph.go index af2660d155..a773b6eb62 100644 --- a/v2/tools/generator/internal/codegen/storage/group_conversion_graph.go +++ b/v2/tools/generator/internal/codegen/storage/group_conversion_graph.go @@ -56,7 +56,7 @@ func (graph *GroupConversionGraph) searchForRenamedType( return astmodel.EmptyTypeName, nil } - rename, err := graph.configuration.LookupNameInNextVersion(name) + rename, err := graph.configuration.TypeNameInNextVersion.Lookup(name) if config.IsNotConfiguredError(err) { // We found no configured rename, nothing to do return astmodel.EmptyTypeName, nil diff --git a/v2/tools/generator/internal/config/configurable.go b/v2/tools/generator/internal/config/configurable.go index 95efadfce5..1723a19032 100644 --- a/v2/tools/generator/internal/config/configurable.go +++ b/v2/tools/generator/internal/config/configurable.go @@ -5,11 +5,56 @@ package config +import ( + "fmt" + "github.com/pkg/errors" +) + // configurable represents a value that may be configured. // Includes tracking for whether we consume the configured value or not, allowing us to flag unnecessary configuration type configurable[T any] struct { value *T consumed bool + tag string + scope string +} + +// makeConfigurable creates a new configurable[T] with the given tag and scope +func makeConfigurable[T any](tag string, scope string) configurable[T] { + return configurable[T]{ + tag: tag, + scope: scope, + } +} + +// Lookup returns the value configured, or an error if not configured. +func (c *configurable[T]) Lookup() (T, error) { + if v, ok := c.read(); ok { + return v, nil + } + + msg := fmt.Sprintf("%s not specified for %s", c.tag, c.scope) + return *new(T), NewNotConfiguredError(msg) +} + +// VerifyConsumed returns an error if the value is configured but not consumed. +func (c *configurable[T]) VerifyConsumed() error { + if c.isUnconsumed() { + return errors.Errorf("%s specified for %s but not consumed", c.tag, c.scope) + } + + return nil +} + +// MarkUnconsumed resets the consumption flag so that the value can be reused +func (c *configurable[T]) MarkUnconsumed() { + c.consumed = false +} + +// Set writes the value configured and marks it as unconsumed +func (c *configurable[T]) Set(v T) { + c.value = &v + c.consumed = false } // Read returns the value configured and true, if configured; otherwise returns default(T) and false. @@ -23,18 +68,7 @@ func (c *configurable[T]) read() (T, bool) { return *new(T), false } -// Write sets the value configured and marks it as unconsumed -func (c *configurable[T]) write(v T) { - c.value = &v - c.consumed = false -} - // isUnconsumed returns true if we have a configured value that hasn't been consumed func (c *configurable[T]) isUnconsumed() bool { return c.value != nil && !c.consumed } - -// markUnconsumed marks this as unconsumed -func (c *configurable[T]) markUnconsumed() { - c.consumed = false -} diff --git a/v2/tools/generator/internal/config/configurable_test.go b/v2/tools/generator/internal/config/configurable_test.go index 8e264768b6..9cc25ac3ab 100644 --- a/v2/tools/generator/internal/config/configurable_test.go +++ b/v2/tools/generator/internal/config/configurable_test.go @@ -33,7 +33,7 @@ func TestConfigurable_WhenConfiguredValue_ReportsUnconsumed(t *testing.T) { g := NewGomegaWithT(t) const expected = true var s configurable[bool] - s.write(expected) + s.Set(expected) g.Expect(s.isUnconsumed()).To(BeTrue()) } @@ -42,7 +42,7 @@ func TestConfigurable_WhenConfiguredValue_ReadMarksAsConsumed(t *testing.T) { g := NewGomegaWithT(t) const expected = true var s configurable[bool] - s.write(expected) + s.Set(expected) actual, ok := s.read() g.Expect(actual).To(Equal(expected)) @@ -50,12 +50,12 @@ func TestConfigurable_WhenConfiguredValue_ReadMarksAsConsumed(t *testing.T) { g.Expect(s.isUnconsumed()).To(BeFalse()) } -func TestConfigurable_WhenValueWritten_MarkedAsUnconsumed(t *testing.T) { +func TestConfigurable_WhenValueSet_MarkedAsUnconsumed(t *testing.T) { t.Parallel() g := NewGomegaWithT(t) const v = true var s configurable[bool] - s.write(v) + s.Set(v) g.Expect(s.isUnconsumed()).To(BeTrue()) } diff --git a/v2/tools/generator/internal/config/configuration.go b/v2/tools/generator/internal/config/configuration.go index 81f3f89e6f..92056086b8 100644 --- a/v2/tools/generator/internal/config/configuration.go +++ b/v2/tools/generator/internal/config/configuration.go @@ -208,53 +208,53 @@ func (config *Configuration) TypeRename(name astmodel.TypeName) (string, error) return "", errors.Errorf("no configuration: no rename available for %s", name) } - return config.ObjectModelConfiguration.LookupNameInNextVersion(name) + return config.ObjectModelConfiguration.TypeNameInNextVersion.Lookup(name) } // ARMReference looks up a property to determine whether it may be an ARM reference or not. func (config *Configuration) ARMReference(name astmodel.TypeName, property astmodel.PropertyName) (bool, error) { - return config.ObjectModelConfiguration.ARMReference(name, property) + return config.ObjectModelConfiguration.ARMReference.Lookup(name, property) } // VerifyARMReferencesConsumed returns an error if any configured ARM References were not consumed func (config *Configuration) VerifyARMReferencesConsumed() error { - return config.ObjectModelConfiguration.VerifyARMReferencesConsumed() + return config.ObjectModelConfiguration.ARMReference.VerifyConsumed() } // IsSecret looks up a property to determine whether it is a secret. func (config *Configuration) IsSecret(name astmodel.TypeName, property astmodel.PropertyName) (bool, error) { - return config.ObjectModelConfiguration.IsSecret(name, property) + return config.ObjectModelConfiguration.IsSecret.Lookup(name, property) } // VerifyIsSecretConsumed returns an error if any configured Secret References were not consumed func (config *Configuration) VerifyIsSecretConsumed() error { - return config.ObjectModelConfiguration.VerifyIsSecretConsumed() + return config.ObjectModelConfiguration.IsSecret.VerifyConsumed() } // ResourceLifecycleOwnedByParent looks up a property to determine if represents a subresource whose lifecycle is owned // by the parent resource. func (config *Configuration) ResourceLifecycleOwnedByParent(name astmodel.TypeName, property astmodel.PropertyName) (string, error) { - return config.ObjectModelConfiguration.ResourceLifecycleOwnedByParent(name, property) + return config.ObjectModelConfiguration.ResourceLifecycleOwnedByParent.Lookup(name, property) } // MarkResourceLifecycleOwnedByParentUnconsumed marks all ResourceLifecycleOwnedByParent as unconsumed func (config *Configuration) MarkResourceLifecycleOwnedByParentUnconsumed() error { - return config.ObjectModelConfiguration.MarkResourceLifecycleOwnedByParentUnconsumed() + return config.ObjectModelConfiguration.ResourceLifecycleOwnedByParent.MarkUnconsumed() } // VerifyResourceLifecycleOwnedByParentConsumed returns an error if any ResourceLifecycleOwnedByParent flag is not consumed func (config *Configuration) VerifyResourceLifecycleOwnedByParentConsumed() error { - return config.ObjectModelConfiguration.VerifyResourceLifecycleOwnedByParentConsumed() + return config.ObjectModelConfiguration.ResourceLifecycleOwnedByParent.VerifyConsumed() } // ImportConfigMapMode looks up a property to determine its import configMap mode. func (config *Configuration) ImportConfigMapMode(name astmodel.TypeName, property astmodel.PropertyName) (ImportConfigMapMode, error) { - return config.ObjectModelConfiguration.ImportConfigMapMode(name, property) + return config.ObjectModelConfiguration.ImportConfigMapMode.Lookup(name, property) } // VerifyImportConfigMapModeConsumed returns an error if any configured ImportConfigMapMode values were not consumed func (config *Configuration) VerifyImportConfigMapModeConsumed() error { - return config.ObjectModelConfiguration.VerifyImportConfigMapModeConsumed() + return config.ObjectModelConfiguration.ImportConfigMapMode.VerifyConsumed() } // initialize checks for common errors and initializes structures inside the configuration diff --git a/v2/tools/generator/internal/config/group_configuration.go b/v2/tools/generator/internal/config/group_configuration.go index 1a62ff38b0..5e23a4807d 100644 --- a/v2/tools/generator/internal/config/group_configuration.go +++ b/v2/tools/generator/internal/config/group_configuration.go @@ -28,10 +28,11 @@ import ( // │ │1 1..n║ ║1 1..n│ │1 1..n│ │1 1..n│ │ // └──────────────────────────┘ ╚════════════════════╝ └──────────────────────┘ └───────────────────┘ └───────────────────────┘ type GroupConfiguration struct { - name string - versions map[string]*VersionConfiguration - advisor *typo.Advisor - payloadType configurable[PayloadType] + name string + versions map[string]*VersionConfiguration + advisor *typo.Advisor + // Configurable properties here (alphabetical, please) + PayloadType configurable[PayloadType] } type PayloadType string @@ -48,34 +49,16 @@ const ( // NewGroupConfiguration returns a new (empty) GroupConfiguration func NewGroupConfiguration(name string) *GroupConfiguration { + scope := "group " + name return &GroupConfiguration{ name: name, versions: make(map[string]*VersionConfiguration), advisor: typo.NewAdvisor(), + // Initialize configurable properties here (alphabetical, please) + PayloadType: makeConfigurable[PayloadType](payloadTypeTag, scope), } } -// LookupPayloadType returns the configured payload type for this group, or an error if not configured -func (gc *GroupConfiguration) LookupPayloadType() (PayloadType, error) { - pt, ok := gc.payloadType.read() - if !ok { - msg := fmt.Sprintf(payloadTypeTag+" not specified for group %s", gc.name) - return "", NewNotConfiguredError(msg) - } - - return pt, nil -} - -// VerifyPayloadTypeConsumed returns an error if the payload type has not been consumed -func (gc *GroupConfiguration) VerifyPayloadTypeConsumed() error { - if gc.payloadType.isUnconsumed() { - v, _ := gc.payloadType.read() - return errors.Errorf("group %s: "+payloadTypeTag+": %s not consumed", gc.name, v) - } - - return nil -} - // Add includes configuration for the specified version as a part of this group configuration // In addition to indexing by the name of the version, we also index by the local-package-name and storage-package-name // of the version, so we can do lookups via TypeName. All indexing is lower-case to allow case-insensitive lookups (this @@ -207,11 +190,11 @@ func (gc *GroupConfiguration) UnmarshalYAML(value *yaml.Node) error { if strings.EqualFold(lastId, payloadTypeTag) && c.Kind == yaml.ScalarNode { switch strings.ToLower(c.Value) { case string(OmitEmptyProperties): - gc.payloadType.write(OmitEmptyProperties) + gc.PayloadType.Set(OmitEmptyProperties) case string(ExplicitCollections): - gc.payloadType.write(ExplicitCollections) + gc.PayloadType.Set(ExplicitCollections) case string(ExplicitProperties): - gc.payloadType.write(ExplicitProperties) + gc.PayloadType.Set(ExplicitProperties) default: return errors.Errorf("unknown %s value: %s.", payloadTypeTag, c.Value) } diff --git a/v2/tools/generator/internal/config/group_configuration_test.go b/v2/tools/generator/internal/config/group_configuration_test.go index 47141abc2e..96ad0d4942 100644 --- a/v2/tools/generator/internal/config/group_configuration_test.go +++ b/v2/tools/generator/internal/config/group_configuration_test.go @@ -110,7 +110,7 @@ func TestGroupConfiguration_WhenVersionConfigurationNotConsumed_ReturnsErrorWith // Create configuration with the wrong version typeConfig := NewTypeConfiguration("Person") - typeConfig.SetSupportedFrom("vNext") + typeConfig.SupportedFrom.Set("vNext") versionConfig := NewVersionConfiguration("2022-01-01") versionConfig.addType(typeConfig.name, typeConfig) @@ -126,10 +126,10 @@ func TestGroupConfiguration_WhenVersionConfigurationNotConsumed_ReturnsErrorWith test.MakeLocalPackageReference(groupConfig.name, "2021-01-01"), "Person") - _, err := omConfig.LookupSupportedFrom(tn) + _, err := omConfig.SupportedFrom.Lookup(tn) g.Expect(err).NotTo(BeNil()) // We expect this error - err = omConfig.VerifySupportedFromConsumed() + err = omConfig.SupportedFrom.VerifyConsumed() g.Expect(err).NotTo(BeNil()) // We expect an error, config hasn't been used g.Expect(err.Error()).To(ContainSubstring("did you mean")) // We want to receive a tip g.Expect(err.Error()).To(ContainSubstring(versionConfig.name)) // and we want the correct version to be suggested @@ -143,9 +143,9 @@ func TestGroupConfiguration_LookupPayloadType_WhenConfigured_ReturnsExpectedResu t.Parallel() g := NewGomegaWithT(t) groupConfig := NewGroupConfiguration("Network") - groupConfig.payloadType.write(ExplicitProperties) + groupConfig.PayloadType.Set(ExplicitProperties) - payloadType, err := groupConfig.LookupPayloadType() + payloadType, err := groupConfig.PayloadType.Lookup() g.Expect(payloadType).To(Equal(ExplicitProperties)) g.Expect(err).To(Succeed()) @@ -156,7 +156,7 @@ func TestGroupConfiguration_LookupPayloadType_WhenNotConfigured_ReturnsExpectedE g := NewGomegaWithT(t) groupConfig := NewGroupConfiguration("Network") - name, err := groupConfig.LookupPayloadType() + name, err := groupConfig.PayloadType.Lookup() g.Expect(name).To(Equal(PayloadType(""))) g.Expect(err).NotTo(Succeed()) g.Expect(err.Error()).To(ContainSubstring(groupConfig.name)) @@ -168,11 +168,11 @@ func TestGroupConfiguration_VerifyPayloadTypeConsumed_WhenConsumed_ReturnsNoErro g := NewGomegaWithT(t) groupConfig := NewGroupConfiguration("Network") - groupConfig.payloadType.write(OmitEmptyProperties) + groupConfig.PayloadType.Set(OmitEmptyProperties) - _, err := groupConfig.LookupPayloadType() + _, err := groupConfig.PayloadType.Lookup() g.Expect(err).To(Succeed()) - g.Expect(groupConfig.VerifyPayloadTypeConsumed()).To(Succeed()) + g.Expect(groupConfig.PayloadType.VerifyConsumed()).To(Succeed()) } func TestGroupConfiguration_VerifyPayloadTypeConsumed_WhenNotConsumed_ReturnsExpectedError(t *testing.T) { @@ -180,9 +180,9 @@ func TestGroupConfiguration_VerifyPayloadTypeConsumed_WhenNotConsumed_ReturnsExp g := NewGomegaWithT(t) groupConfig := NewGroupConfiguration("Network") - groupConfig.payloadType.write(ExplicitProperties) + groupConfig.PayloadType.Set(ExplicitProperties) - err := groupConfig.VerifyPayloadTypeConsumed() + err := groupConfig.PayloadType.VerifyConsumed() g.Expect(err).NotTo(BeNil()) g.Expect(err.Error()).To(ContainSubstring(groupConfig.name)) } diff --git a/v2/tools/generator/internal/config/object_model_configuration.go b/v2/tools/generator/internal/config/object_model_configuration.go index 042416b071..72508dbb94 100644 --- a/v2/tools/generator/internal/config/object_model_configuration.go +++ b/v2/tools/generator/internal/config/object_model_configuration.go @@ -29,14 +29,92 @@ import ( type ObjectModelConfiguration struct { groups map[string]*GroupConfiguration // nested configuration for individual groups typoAdvisor *typo.Advisor + + // Group access fields here (alphabetical, please) + PayloadType groupAccess[PayloadType] + + // Type access fields here (alphabetical, please) + AzureGeneratedSecrets typeAccess[[]string] + DefaultAzureName typeAccess[bool] + Export typeAccess[bool] + ExportAs typeAccess[string] + GeneratedConfigs typeAccess[map[string]string] + Importable typeAccess[bool] + IsResource typeAccess[bool] + ManualConfigs typeAccess[[]string] + + ResourceEmbeddedInParent typeAccess[string] + SupportedFrom typeAccess[string] + TypeNameInNextVersion typeAccess[string] + + // Property access fields here (alphabetical, please) + ARMReference propertyAccess[bool] + ImportConfigMapMode propertyAccess[ImportConfigMapMode] + IsSecret propertyAccess[bool] + ResourceLifecycleOwnedByParent propertyAccess[string] +} + +type groupAccess[T any] struct { + model *ObjectModelConfiguration + accessor func(*GroupConfiguration) *configurable[T] +} + +type typeAccess[T any] struct { + model *ObjectModelConfiguration + accessor func(*TypeConfiguration) *configurable[T] +} + +type propertyAccess[T any] struct { + model *ObjectModelConfiguration + accessor func(*PropertyConfiguration) *configurable[T] } // NewObjectModelConfiguration returns a new (empty) ObjectModelConfiguration func NewObjectModelConfiguration() *ObjectModelConfiguration { - return &ObjectModelConfiguration{ + result := &ObjectModelConfiguration{ groups: make(map[string]*GroupConfiguration), typoAdvisor: typo.NewAdvisor(), } + + // Initialize group access fields here (alphabetical, please) + result.PayloadType = makeGroupAccess[PayloadType]( + result, func(c *GroupConfiguration) *configurable[PayloadType] { return &c.PayloadType }) + + // Initialize type access fields here (alphabetical, please) + result.AzureGeneratedSecrets = makeTypeAccess[[]string]( + result, func(c *TypeConfiguration) *configurable[[]string] { return &c.AzureGeneratedSecrets }) + result.DefaultAzureName = makeTypeAccess[bool]( + result, func(c *TypeConfiguration) *configurable[bool] { return &c.DefaultAzureName }) + result.Export = makeTypeAccess[bool]( + result, func(c *TypeConfiguration) *configurable[bool] { return &c.Export }) + result.ExportAs = makeTypeAccess[string]( + result, func(c *TypeConfiguration) *configurable[string] { return &c.ExportAs }) + result.GeneratedConfigs = makeTypeAccess[map[string]string]( + result, func(c *TypeConfiguration) *configurable[map[string]string] { return &c.GeneratedConfigs }) + result.Importable = makeTypeAccess[bool]( + result, func(c *TypeConfiguration) *configurable[bool] { return &c.Importable }) + result.IsResource = makeTypeAccess[bool]( + result, func(c *TypeConfiguration) *configurable[bool] { return &c.IsResource }) + result.ManualConfigs = makeTypeAccess[[]string]( + result, func(c *TypeConfiguration) *configurable[[]string] { return &c.ManualConfigs }) + result.ResourceEmbeddedInParent = makeTypeAccess[string]( + result, func(c *TypeConfiguration) *configurable[string] { return &c.ResourceEmbeddedInParent }) + result.SupportedFrom = makeTypeAccess[string]( + result, func(c *TypeConfiguration) *configurable[string] { return &c.SupportedFrom }) + result.TypeNameInNextVersion = makeTypeAccess[string]( + result, func(c *TypeConfiguration) *configurable[string] { return &c.NameInNextVersion }) + + // Initialize property access fields here (alphabetical, please) + result.ARMReference = makePropertyAccess[bool]( + result, func(c *PropertyConfiguration) *configurable[bool] { return &c.ARMReference }) + result.ImportConfigMapMode = makePropertyAccess[ImportConfigMapMode]( + result, func(c *PropertyConfiguration) *configurable[ImportConfigMapMode] { return &c.ImportConfigMapMode }) + result.IsSecret = makePropertyAccess[bool]( + result, func(c *PropertyConfiguration) *configurable[bool] { return &c.IsSecret }) + result.ResourceLifecycleOwnedByParent = makePropertyAccess[string]( + result, func(c *PropertyConfiguration) *configurable[string] { return &c.ResourceLifecycleOwnedByParent }) + + return result } // IsEmpty returns true if we have no configuration at all, false if we have some groups configured. @@ -66,450 +144,20 @@ func (omc *ObjectModelConfiguration) IsGroupConfigured(pkg astmodel.PackageRefer return result } -// LookupNameInNextVersion checks whether we have an alternative name for the specified type, returning the name if -// found. Returns a NotConfiguredError if no rename is available. -func (omc *ObjectModelConfiguration) LookupNameInNextVersion(name astmodel.TypeName) (string, error) { - var newName string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - n, err := configuration.LookupNameInNextVersion() - newName = n - return err - }) - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return newName, nil -} - -// VerifyNameInNextVersionConsumed returns an error if any configured type renames were not consumed -func (omc *ObjectModelConfiguration) VerifyNameInNextVersionConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyNameInNextVersionConsumed() - }) - return visitor.Visit(omc) -} - -// LookupExport checks to see whether a specified type is configured for export, returning the value if found. Returns a -// NotConfiguredError if no export is configured. -func (omc *ObjectModelConfiguration) LookupExport(name astmodel.TypeName) (bool, error) { - var export bool - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - ex, err := configuration.LookupExport() - export = ex - return err - }) - err := visitor.Visit(omc) - if err != nil { - return false, err - } - - return export, nil -} - -// VerifyExportConsumed returns an error if our configured export flag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyExportConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyExportConsumed() - }) - return visitor.Visit(omc) -} - -// LookupExportAs checks to see whether a specified type is configured for export with an alternative name, returning the -// name if found. Returns a NotConfiguredError if no export is configured. -func (omc *ObjectModelConfiguration) LookupExportAs(name astmodel.TypeName) (string, error) { - var exportAs string - typeVisitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - ea, err := configuration.LookupExportAs() - exportAs = ea - return err - }) - err := typeVisitor.Visit(omc) - if err != nil { - // No need to wrap this error, it already has all the details - return "", err - } - - // Add an alias so that any existing configuration can be found via the new name +// AddTypeAlias adds a type alias for the specified type name, +// allowing configuration related to the type to be accessed via the new name. +func (omc *ObjectModelConfiguration) AddTypeAlias(name astmodel.TypeName, alias string) { versionVisitor := newSingleVersionConfigurationVisitor( name.PackageReference, func(configuration *VersionConfiguration) error { - return configuration.addTypeAlias(name.Name(), exportAs) - }) - err = versionVisitor.Visit(omc) - if err != nil { - // No need to wrap this error, it already has all the details - return "", err - } - - return exportAs, nil -} - -// VerifyExportAsConsumed returns an error if our configured export name was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyExportAsConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyExportAsConsumed() - }) - return visitor.Visit(omc) -} - -// ARMReference looks up a property to determine whether it may be an ARM reference or not. -// Returns true or false if configured, or a NotConfiguredError if not. -func (omc *ObjectModelConfiguration) ARMReference(name astmodel.TypeName, property astmodel.PropertyName) (bool, error) { - var result bool - visitor := newSinglePropertyConfigurationVisitor( - name, - property, - func(configuration *PropertyConfiguration) error { - isArmReference, err := configuration.ARMReference() - result = isArmReference - return err - }) - err := visitor.Visit(omc) - if err != nil { - return false, err - } - - return result, nil -} - -// VerifyARMReferencesConsumed returns an error if any ARM Reference configuration was not consumed -func (omc *ObjectModelConfiguration) VerifyARMReferencesConsumed() error { - visitor := newEveryPropertyConfigurationVisitor( - func(configuration *PropertyConfiguration) error { - return configuration.VerifyARMReferenceConsumed() - }) - return visitor.Visit(omc) -} - -// AzureGeneratedSecrets looks up a type to determine if it has any Azure generated secrets -func (omc *ObjectModelConfiguration) AzureGeneratedSecrets(name astmodel.TypeName) ([]string, error) { - var result []string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - var err error - result, err = configuration.AzureGeneratedSecrets() - return err - }) - err := visitor.Visit(omc) - if err != nil { - return nil, err - } - - return result, nil -} - -// VerifyAzureGeneratedSecretsConsumed returns an error if Azure generated secrets were not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyAzureGeneratedSecretsConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyAzureGeneratedSecretsConsumed() - }) - return visitor.Visit(omc) -} - -// GeneratedConfigs looks up a type to determine if it has any generated configs -func (omc *ObjectModelConfiguration) GeneratedConfigs(name astmodel.TypeName) (map[string]string, error) { - var result map[string]string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - var err error - result, err = configuration.GeneratedConfigs() - return err - }) - err := visitor.Visit(omc) - if err != nil { - return nil, err - } - - return result, nil -} - -// VerifyGeneratedConfigsConsumed returns an error if generated configs were not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyGeneratedConfigsConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyGeneratedConfigsConsumed() - }) - return visitor.Visit(omc) -} - -// ManualConfigs looks up a type to determine if it has any manual configs -func (omc *ObjectModelConfiguration) ManualConfigs(name astmodel.TypeName) ([]string, error) { - var result []string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - var err error - result, err = configuration.ManualConfigs() - return err - }) - err := visitor.Visit(omc) - if err != nil { - return nil, err - } - - return result, nil -} - -// VerifyManualConfigsConsumed returns an error if manual configs were not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyManualConfigsConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyManualConfigsConsumed() - }) - return visitor.Visit(omc) -} - -// IsSecret looks up a property to determine whether it is a secret. -func (omc *ObjectModelConfiguration) IsSecret(name astmodel.TypeName, property astmodel.PropertyName) (bool, error) { - var result bool - visitor := newSinglePropertyConfigurationVisitor( - name, - property, - func(configuration *PropertyConfiguration) error { - isSecret, err := configuration.IsSecret() - result = isSecret - return err - }) - - err := visitor.Visit(omc) - if err != nil { - return false, err - } - - return result, nil -} - -// VerifyIsSecretConsumed returns an error if any IsSecret configuration was not consumed -func (omc *ObjectModelConfiguration) VerifyIsSecretConsumed() error { - visitor := newEveryPropertyConfigurationVisitor( - func(configuration *PropertyConfiguration) error { - return configuration.VerifyIsSecretConsumed() - }) - return visitor.Visit(omc) -} - -// ResourceLifecycleOwnedByParent returns the name of the parent resource if the property represents a subresource whose resource lifecycle is owned by the parent resource. -// An empty string + error is returned if this is not configured for the property in question -func (omc *ObjectModelConfiguration) ResourceLifecycleOwnedByParent(name astmodel.TypeName, property astmodel.PropertyName) (string, error) { - var result string - visitor := newSinglePropertyConfigurationVisitor( - name, - property, - func(configuration *PropertyConfiguration) error { - resourceLifecycleOwnedByParent, err := configuration.ResourceLifecycleOwnedByParent() - result = resourceLifecycleOwnedByParent - return err - }) - - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return result, nil -} - -// MarkResourceLifecycleOwnedByParentUnconsumed marks all ResourceLifecycleOwnedByParent as unconsumed -func (omc *ObjectModelConfiguration) MarkResourceLifecycleOwnedByParentUnconsumed() error { - visitor := newEveryPropertyConfigurationVisitor( - func(configuration *PropertyConfiguration) error { - configuration.ClearResourceLifecycleOwnedByParentConsumed() - return nil - }) - return visitor.Visit(omc) -} - -// VerifyResourceLifecycleOwnedByParentConsumed returns an error if any ResourceLifecycleOwnedByParent configuration -// was not consumed -func (omc *ObjectModelConfiguration) VerifyResourceLifecycleOwnedByParentConsumed() error { - visitor := newEveryPropertyConfigurationVisitor( - func(configuration *PropertyConfiguration) error { - return configuration.VerifyResourceLifecycleOwnedByParentConsumed() - }) - return visitor.Visit(omc) -} - -// LookupSupportedFrom checks to see whether a specified type has its first ASO release configured, returning either -// that release or a NotConfiguredError. -func (omc *ObjectModelConfiguration) LookupSupportedFrom(name astmodel.TypeName) (string, error) { - var result string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - var err error - result, err = configuration.LookupSupportedFrom() - return err - }) - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return result, nil -} - -// VerifySupportedFromConsumed returns an error if any configured supportedFrom tag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifySupportedFromConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifySupportedFromConsumed() - }) - return visitor.Visit(omc) -} - -// ImportConfigMapMode looks up a property to determine its ImportConfigMapMode. -// Returns the ImportConfigMapMode, or a NotConfiguredError if not configured. -func (omc *ObjectModelConfiguration) ImportConfigMapMode(name astmodel.TypeName, property astmodel.PropertyName) (ImportConfigMapMode, error) { - var result ImportConfigMapMode - visitor := newSinglePropertyConfigurationVisitor( - name, - property, - func(configuration *PropertyConfiguration) error { - mode, err := configuration.ImportConfigMapMode() - result = mode - return err - }) - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return result, nil -} - -// VerifyImportConfigMapModeConsumed returns an error if any ImportConfigMapMode configuration was not consumed -func (omc *ObjectModelConfiguration) VerifyImportConfigMapModeConsumed() error { - visitor := newEveryPropertyConfigurationVisitor( - func(configuration *PropertyConfiguration) error { - return configuration.VerifyImportConfigMapModeConsumed() - }) - return visitor.Visit(omc) -} - -// LookupResourceEmbeddedInParent checks to see whether a specified type is labelled as a resource that is embedded -// inside its parent. Returns a NotConfiguredError if no $resourceEmbeddedInParent flag is configured. -func (omc *ObjectModelConfiguration) LookupResourceEmbeddedInParent(name astmodel.TypeName) (string, error) { - var embeddedInParent string - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - embedded, err := configuration.LookupResourceEmbeddedInParent() - embeddedInParent = embedded - return err - }) - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return embeddedInParent, nil -} - -// VerifyResourceEmbeddedInParentConsumed returns an error if our configured $resourceEmbeddedInParent flag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyResourceEmbeddedInParentConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyResourceEmbeddedInParentConsumed() - }) - return visitor.Visit(omc) -} - -// LookupIsResource checks to see whether a specified type is labelled as a resource. -// Returns a NotConfiguredError if no $resourceEmbeddedInParent flag is configured. -func (omc *ObjectModelConfiguration) LookupIsResource(name astmodel.TypeName) (bool, error) { - var isResource bool - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - is, err := configuration.LookupIsResource() - isResource = is - return err - }) - err := visitor.Visit(omc) - if err != nil { - return false, err - } - - return isResource, nil -} - -// VerifyIsResourceConsumed returns an error if our configured $isResource flag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyIsResourceConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyIsResourceConsumed() + return configuration.addTypeAlias(name.Name(), alias) }) - return visitor.Visit(omc) -} -// LookupImportable checks to see whether a specified type is labelled as importable. -// Returns a NotConfiguredError if no $importable flag is configured. -func (omc *ObjectModelConfiguration) LookupImportable(name astmodel.TypeName) (bool, error) { - var importable bool - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - im, err := configuration.LookupImportable() - importable = im - return err - }) - err := visitor.Visit(omc) + err := versionVisitor.Visit(omc) if err != nil { - return false, err + // Should never have an error in this case, but if we do make sure we know + panic(err) } - - return importable, nil -} - -// VerifyImportableConsumed returns an error if our configured $importable flag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyImportableConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyImportableConsumed() - }) - return visitor.Visit(omc) -} - -// LookupDefaultAzureName checks to see whether a specified type should default the Azure Name property. -// Returns a NotConfiguredError if no $defaultAzureName flag is configured. -func (omc *ObjectModelConfiguration) LookupDefaultAzureName(name astmodel.TypeName) (bool, error) { - var defaultAzureName bool - visitor := newSingleTypeConfigurationVisitor( - name, - func(configuration *TypeConfiguration) error { - defAzure, err := configuration.LookupDefaultAzureName() - defaultAzureName = defAzure - return err - }) - err := visitor.Visit(omc) - if err != nil { - return false, err - } - - return defaultAzureName, nil -} - -// VerifyDefaultAzureNameConsumed returns an error if our configured $defaultAzureName flag was not used, nil otherwise. -func (omc *ObjectModelConfiguration) VerifyDefaultAzureNameConsumed() error { - visitor := newEveryTypeConfigurationVisitor( - func(configuration *TypeConfiguration) error { - return configuration.VerifyDefaultAzureNameConsumed() - }) - return visitor.Visit(omc) } var VersionRegex = regexp.MustCompile(`^v\d\d?$`) @@ -560,32 +208,6 @@ func (omc *ObjectModelConfiguration) FindHandCraftedTypeNames(localPath string) return result, nil } -// LookupPayloadType checks to see whether a specified type has a configured payload type -func (omc *ObjectModelConfiguration) LookupPayloadType(name astmodel.TypeName) (PayloadType, error) { - var payloadType PayloadType - visitor := newSingleGroupConfigurationVisitor( - name.PackageReference, - func(configuration *GroupConfiguration) error { - pt, err := configuration.LookupPayloadType() - payloadType = pt - return err - }) - err := visitor.Visit(omc) - if err != nil { - return "", err - } - - return payloadType, nil -} - -func (omc *ObjectModelConfiguration) VerifyPayloadTypeConsumed() error { - visitor := newEveryGroupConfigurationVisitor( - func(configuration *GroupConfiguration) error { - return configuration.VerifyPayloadTypeConsumed() - }) - return visitor.Visit(omc) -} - // addGroup includes the provided GroupConfiguration in this model configuration func (omc *ObjectModelConfiguration) addGroup(name string, group *GroupConfiguration) { if omc.groups == nil { @@ -785,3 +407,165 @@ func (omc *ObjectModelConfiguration) ModifyProperty( return action(prop) }) } + +/* + * groupAccess + */ + +func makeGroupAccess[T any]( + model *ObjectModelConfiguration, + accessor func(*GroupConfiguration, + ) *configurable[T]) groupAccess[T] { + return groupAccess[T]{ + model: model, + accessor: accessor} +} + +func (a *groupAccess[T]) Lookup(ref astmodel.PackageReference) (T, error) { + var c *configurable[T] + visitor := newSingleGroupConfigurationVisitor( + ref, + func(configuration *GroupConfiguration) error { + c = a.accessor(configuration) + return nil + }) + + err := visitor.Visit(a.model) + if err != nil { + return *new(T), err + } + + return c.Lookup() +} + +func (a *groupAccess[T]) VerifyConsumed() error { + visitor := newEveryGroupConfigurationVisitor( + func(configuration *GroupConfiguration) error { + c := a.accessor(configuration) + return c.VerifyConsumed() + }) + return visitor.Visit(a.model) +} + +func (a *groupAccess[T]) MarkUnconsumed() error { + visitor := newEveryGroupConfigurationVisitor( + func(configuration *GroupConfiguration) error { + c := a.accessor(configuration) + c.MarkUnconsumed() + return nil + }) + + return visitor.Visit(a.model) +} + +/* + * typeAccess + */ + +// makeTypeAccess creates a new typeAccess[T] for the given model and accessor function +func makeTypeAccess[T any]( + model *ObjectModelConfiguration, + accessor func(*TypeConfiguration, + ) *configurable[T]) typeAccess[T] { + return typeAccess[T]{ + model: model, + accessor: accessor} +} + +// Lookup returns the configured value for the given type name +func (a *typeAccess[T]) Lookup(name astmodel.TypeName) (T, error) { + var c *configurable[T] + visitor := newSingleTypeConfigurationVisitor( + name, + func(configuration *TypeConfiguration) error { + c = a.accessor(configuration) + return nil + }) + + err := visitor.Visit(a.model) + if err != nil { + return *new(T), err + } + + return c.Lookup() +} + +// VerifyConsumed ensures that all configured values have been consumed +func (a *typeAccess[T]) VerifyConsumed() error { + visitor := newEveryTypeConfigurationVisitor( + func(configuration *TypeConfiguration) error { + c := a.accessor(configuration) + return c.VerifyConsumed() + }) + return visitor.Visit(a.model) +} + +// MarkUnconsumed marks all configured values as unconsumed +func (a *typeAccess[T]) MarkUnconsumed() error { + visitor := newEveryTypeConfigurationVisitor( + func(configuration *TypeConfiguration) error { + c := a.accessor(configuration) + c.MarkUnconsumed() + return nil + }) + + return visitor.Visit(a.model) +} + +/* + * PropertyAccess + */ + +// makePropertyAccess creates a new propertyAccess[T] for the given model and accessor function +func makePropertyAccess[T any]( + model *ObjectModelConfiguration, + accessor func(*PropertyConfiguration, + ) *configurable[T]) propertyAccess[T] { + return propertyAccess[T]{ + model: model, + accessor: accessor} +} + +// Lookup returns the configured value for the given type name and property name +func (a *propertyAccess[T]) Lookup( + name astmodel.TypeName, + property astmodel.PropertyName, +) (T, error) { + var c *configurable[T] + visitor := newSinglePropertyConfigurationVisitor( + name, + property, + func(configuration *PropertyConfiguration) error { + c = a.accessor(configuration) + return nil + }) + + err := visitor.Visit(a.model) + if err != nil { + return *new(T), err + } + + return c.Lookup() +} + +// VerifyConsumed ensures that all configured values have been consumed +func (a *propertyAccess[T]) VerifyConsumed() error { + visitor := newEveryPropertyConfigurationVisitor( + func(configuration *PropertyConfiguration) error { + c := a.accessor(configuration) + return c.VerifyConsumed() + }) + return visitor.Visit(a.model) +} + +// MarkUnconsumed marks all configured values as unconsumed +func (a *propertyAccess[T]) MarkUnconsumed() error { + visitor := newEveryPropertyConfigurationVisitor( + func(configuration *PropertyConfiguration) error { + c := a.accessor(configuration) + c.MarkUnconsumed() + return nil + }) + + return visitor.Visit(a.model) +} diff --git a/v2/tools/generator/internal/config/object_model_configuration_test.go b/v2/tools/generator/internal/config/object_model_configuration_test.go index 26747b8899..16ef8c3969 100644 --- a/v2/tools/generator/internal/config/object_model_configuration_test.go +++ b/v2/tools/generator/internal/config/object_model_configuration_test.go @@ -57,12 +57,12 @@ func TestObjectModelConfiguration_TypeRename_WhenTypeFound_ReturnsExpectedResult omc.ModifyType( typeName, func(tc *TypeConfiguration) error { - tc.nameInNextVersion.write("Party") + tc.NameInNextVersion.Set("Party") return nil })). To(Succeed()) - nextName, err := omc.LookupNameInNextVersion(typeName) + nextName, err := omc.TypeNameInNextVersion.Lookup(typeName) g.Expect(err).To(Succeed()) g.Expect(nextName).To(Equal("Party")) } @@ -77,13 +77,13 @@ func TestObjectModelConfiguration_TypeRename_WhenTypeNotFound_ReturnsExpectedErr omc.ModifyType( typeName, func(tc *TypeConfiguration) error { - tc.nameInNextVersion.write("Party") + tc.NameInNextVersion.Set("Party") return nil })). To(Succeed()) otherName := astmodel.MakeTypeName(test.Pkg2020, "Location") - nextName, err := omc.LookupNameInNextVersion(otherName) + nextName, err := omc.TypeNameInNextVersion.Lookup(otherName) g.Expect(err).NotTo(Succeed()) g.Expect(nextName).To(Equal("")) @@ -100,14 +100,14 @@ func TestObjectModelConfiguration_VerifyTypeRenamesConsumed_WhenRenameUsed_Retur omc.ModifyType( typeName, func(tc *TypeConfiguration) error { - tc.nameInNextVersion.write("Party") + tc.NameInNextVersion.Set("Party") return nil })). To(Succeed()) - _, err := omc.LookupNameInNextVersion(typeName) + _, err := omc.TypeNameInNextVersion.Lookup(typeName) g.Expect(err).To(Succeed()) - g.Expect(omc.VerifyNameInNextVersionConsumed()).To(Succeed()) + g.Expect(omc.TypeNameInNextVersion.VerifyConsumed()).To(Succeed()) } func TestObjectModelConfiguration_VerifyTypeRenamesConsumed_WhenRenameUnused_ReturnsExpectedError(t *testing.T) { @@ -120,12 +120,12 @@ func TestObjectModelConfiguration_VerifyTypeRenamesConsumed_WhenRenameUnused_Ret omc.ModifyType( typeName, func(tc *TypeConfiguration) error { - tc.nameInNextVersion.write("Party") + tc.NameInNextVersion.Set("Party") return nil })). To(Succeed()) - g.Expect(omc.VerifyNameInNextVersionConsumed()).NotTo(Succeed()) + g.Expect(omc.TypeNameInNextVersion.VerifyConsumed()).NotTo(Succeed()) } /* @@ -143,12 +143,12 @@ func TestObjectModelConfiguration_ARMReference_WhenSpousePropertyFound_ReturnsEx typeName, "Spouse", func(pc *PropertyConfiguration) error { - pc.armReference.write(true) + pc.ARMReference.Set(true) return nil })). To(Succeed()) - isReference, err := omc.ARMReference(typeName, "Spouse") + isReference, err := omc.ARMReference.Lookup(typeName, "Spouse") g.Expect(err).To(BeNil()) g.Expect(isReference).To(BeTrue()) } @@ -164,12 +164,12 @@ func TestObjectModelConfiguration_ARMReference_WhenFullNamePropertyFound_Returns typeName, "FullName", func(pc *PropertyConfiguration) error { - pc.armReference.write(false) + pc.ARMReference.Set(false) return nil })). To(Succeed()) - isReference, err := omc.ARMReference(typeName, "FullName") + isReference, err := omc.ARMReference.Lookup(typeName, "FullName") g.Expect(err).To(BeNil()) g.Expect(isReference).To(BeFalse()) } @@ -185,12 +185,12 @@ func TestObjectModelConfiguration_ARMReference_WhenPropertyNotFound_ReturnsExpec typeName, "Spouse", func(pc *PropertyConfiguration) error { - pc.armReference.write(true) + pc.ARMReference.Set(true) return nil })). To(Succeed()) - _, err := omc.ARMReference(typeName, "KnownAs") + _, err := omc.ARMReference.Lookup(typeName, "KnownAs") g.Expect(err).NotTo(Succeed()) g.Expect(err.Error()).To(ContainSubstring("KnownAs")) } @@ -206,15 +206,15 @@ func TestObjectModelConfiguration_VerifyARMReferencesConsumed_WhenReferenceUsed_ typeName, "Spouse", func(pc *PropertyConfiguration) error { - pc.armReference.write(true) + pc.ARMReference.Set(true) return nil })). To(Succeed()) - ref, err := omc.ARMReference(typeName, "Spouse") + ref, err := omc.ARMReference.Lookup(typeName, "Spouse") g.Expect(ref).To(BeTrue()) g.Expect(err).To(Succeed()) - g.Expect(omc.VerifyARMReferencesConsumed()).To(Succeed()) + g.Expect(omc.ARMReference.VerifyConsumed()).To(Succeed()) } func TestObjectModelConfiguration_VerifyARMReferencesConsumed_WhenReferenceNotUsed_ReturnsExpectedError(t *testing.T) { @@ -228,13 +228,13 @@ func TestObjectModelConfiguration_VerifyARMReferencesConsumed_WhenReferenceNotUs typeName, "Spouse", func(pc *PropertyConfiguration) error { - pc.armReference.write(true) + pc.ARMReference.Set(true) return nil })). To(Succeed()) g.Expect( - omc.VerifyARMReferencesConsumed()).NotTo(Succeed()) + omc.ARMReference.VerifyConsumed()).NotTo(Succeed()) } /* @@ -251,19 +251,20 @@ func TestObjectModelConfiguration_LookupExportAs_AfterConsumption_CanLookupUsing omc.ModifyType( typeName, func(tc *TypeConfiguration) error { - tc.exportAs.write("Person") - tc.nameInNextVersion.write("Party") + tc.ExportAs.Set("Person") + tc.NameInNextVersion.Set("Party") return nil })). To(Succeed()) // Lookup the new name for the type - exportAs, err := omc.LookupExportAs(typeName) + exportAs, err := omc.ExportAs.Lookup(typeName) g.Expect(err).To(BeNil()) // Lookup the name in next version using the new name of the type + omc.AddTypeAlias(typeName, exportAs) newTypeName := typeName.WithName(exportAs) - nextName, err := omc.LookupNameInNextVersion(newTypeName) + nextName, err := omc.TypeNameInNextVersion.Lookup(newTypeName) g.Expect(err).To(BeNil()) g.Expect(nextName).To(Equal("Party")) } @@ -485,17 +486,17 @@ func TestObjectModelConfiguration_LookupSupportedFrom_WhenConfigured_ReturnsExpe omc.ModifyType( name, func(tc *TypeConfiguration) error { - tc.supportedFrom.write("beta.5") + tc.SupportedFrom.Set("beta.5") return nil })). To(Succeed()) - supportedFrom, err := omc.LookupSupportedFrom(name) + supportedFrom, err := omc.SupportedFrom.Lookup(name) g.Expect(err).To(Succeed()) g.Expect(supportedFrom).To(Equal("beta.5")) } -func TestObjectModelConfiguration_LookupSupportedFrom_WhenUnconfigured_ReturnsExpectedResult(t *testing.T) { +func TestObjectModelConfiguration_LookupSupportedFrom_WhenNotConfigured_ReturnsExpectedResult(t *testing.T) { t.Parallel() g := NewGomegaWithT(t) @@ -510,7 +511,7 @@ func TestObjectModelConfiguration_LookupSupportedFrom_WhenUnconfigured_ReturnsEx })). To(Succeed()) - _, err := omc.LookupSupportedFrom(name) + _, err := omc.SupportedFrom.Lookup(name) g.Expect(err).NotTo(Succeed()) } @@ -524,15 +525,15 @@ func TestObjectModelConfiguration_LookupSupportedFrom_WhenConsumed_ReturnsNoErro omc.ModifyType( name, func(tc *TypeConfiguration) error { - tc.supportedFrom.write("beta.5") + tc.SupportedFrom.Set("beta.5") return nil })). To(Succeed()) - _, err := omc.LookupSupportedFrom(name) + _, err := omc.SupportedFrom.Lookup(name) g.Expect(err).To(Succeed()) - err = omc.VerifySupportedFromConsumed() + err = omc.SupportedFrom.VerifyConsumed() g.Expect(err).To(Succeed()) } @@ -546,12 +547,12 @@ func TestObjectModelConfiguration_LookupSupportedFrom_WhenUnconsumed_ReturnsErro omc.ModifyType( name, func(tc *TypeConfiguration) error { - tc.supportedFrom.write("beta.5") + tc.SupportedFrom.Set("beta.5") return nil })). To(Succeed()) - err := omc.VerifySupportedFromConsumed() + err := omc.SupportedFrom.VerifyConsumed() g.Expect(err).NotTo(Succeed()) } @@ -569,17 +570,17 @@ func TestObjectModelConfiguration_LookupPayloadType_WhenConfigured_ReturnsExpect omc.ModifyGroup( name.PackageReference, func(gc *GroupConfiguration) error { - gc.payloadType.write(ExplicitProperties) + gc.PayloadType.Set(ExplicitProperties) return nil })). To(Succeed()) - payloadType, err := omc.LookupPayloadType(name) + payloadType, err := omc.PayloadType.Lookup(name.PackageReference) g.Expect(err).To(Succeed()) g.Expect(payloadType).To(Equal(ExplicitProperties)) } -func TestObjectModelConfiguration_LookupPayloadType_WhenUnconfigured_ReturnsExpectedResult(t *testing.T) { +func TestObjectModelConfiguration_LookupPayloadType_WhenNotConfigured_ReturnsExpectedResult(t *testing.T) { t.Parallel() g := NewGomegaWithT(t) @@ -594,7 +595,7 @@ func TestObjectModelConfiguration_LookupPayloadType_WhenUnconfigured_ReturnsExpe })). To(Succeed()) - _, err := omc.LookupPayloadType(name) + _, err := omc.PayloadType.Lookup(name.PackageReference) g.Expect(err).NotTo(Succeed()) } @@ -608,15 +609,15 @@ func TestObjectModelConfiguration_VerifyPayloadTypeConsumed_WhenConsumed_Returns omc.ModifyGroup( name.PackageReference, func(gc *GroupConfiguration) error { - gc.payloadType.write(OmitEmptyProperties) + gc.PayloadType.Set(OmitEmptyProperties) return nil })). To(Succeed()) - _, err := omc.LookupPayloadType(name) + _, err := omc.PayloadType.Lookup(name.PackageReference) g.Expect(err).To(Succeed()) - err = omc.VerifyPayloadTypeConsumed() + err = omc.PayloadType.VerifyConsumed() g.Expect(err).To(Succeed()) } @@ -630,11 +631,11 @@ func TestObjectModelConfiguration_VerifyPayloadTypeConsumed_WhenUnconsumed_Retur omc.ModifyGroup( name.PackageReference, func(gc *GroupConfiguration) error { - gc.payloadType.write(ExplicitProperties) + gc.PayloadType.Set(ExplicitProperties) return nil })). To(Succeed()) - err := omc.VerifyPayloadTypeConsumed() + err := omc.PayloadType.VerifyConsumed() g.Expect(err).NotTo(Succeed()) } diff --git a/v2/tools/generator/internal/config/property_configuration.go b/v2/tools/generator/internal/config/property_configuration.go index fb2020d350..1411ac5814 100644 --- a/v2/tools/generator/internal/config/property_configuration.go +++ b/v2/tools/generator/internal/config/property_configuration.go @@ -6,7 +6,6 @@ package config import ( - "fmt" "strings" "github.com/pkg/errors" @@ -22,12 +21,13 @@ import ( // │ │1 1..n│ │1 1..n│ │1 1..n│ │1 1..n║ ║ // └──────────────────────────┘ └────────────────────┘ └──────────────────────┘ └───────────────────┘ ╚═══════════════════════╝ type PropertyConfiguration struct { - name string - nameInNextVersion configurable[string] // Name this property has in the next version - armReference configurable[bool] // Specify whether this property is an ARM reference - isSecret configurable[bool] // Specify whether this property is a secret - resourceLifecycleOwnedByParent configurable[string] - importConfigMapMode configurable[ImportConfigMapMode] // The config map mode + name string + // Configurable properties here (alphabetical, please) + ARMReference configurable[bool] // Specify whether this property is an ARM reference + ImportConfigMapMode configurable[ImportConfigMapMode] // The config map mode + IsSecret configurable[bool] // Specify whether this property is a secret + NameInNextVersion configurable[string] // Name this property has in the next version + ResourceLifecycleOwnedByParent configurable[string] } type ImportConfigMapMode string @@ -42,137 +42,23 @@ const ( isSecretTag = "$isSecret" // Bool specifying whether a property contains a secret resourceLifecycleOwnedByParentTag = "$resourceLifecycleOwnedByParent" // String specifying whether a property represents a subresource whose lifecycle is owned by the parent resource (and what that parent resource is) exportAsConfigMapPropertyNameTag = "$exportAsConfigMapPropertyName" // String specifying the name of the property set to export this property as a config map. - importConfigMapModeTag = "$importConfigMapMode" // string specifying the importConfigMapMode mode + importConfigMapModeTag = "$importConfigMapMode" // string specifying the ImportConfigMapMode mode ) // NewPropertyConfiguration returns a new (empty) property configuration func NewPropertyConfiguration(name string) *PropertyConfiguration { + scope := "property " + name return &PropertyConfiguration{ name: name, + // Initialize configurable properties here (alphabetical, please) + ARMReference: makeConfigurable[bool](armReferenceTag, scope), + ImportConfigMapMode: makeConfigurable[ImportConfigMapMode](importConfigMapModeTag, scope), + IsSecret: makeConfigurable[bool](isSecretTag, scope), + NameInNextVersion: makeConfigurable[string](nameInNextVersionTag, scope), + ResourceLifecycleOwnedByParent: makeConfigurable[string](resourceLifecycleOwnedByParentTag, scope), } } -// ARMReference looks up a property to determine whether it may be an ARM reference or not. -func (pc *PropertyConfiguration) ARMReference() (bool, error) { - armReference, ok := pc.armReference.read() - if !ok { - msg := fmt.Sprintf(armReferenceTag+" not specified for property %s", pc.name) - return false, NewNotConfiguredError(msg) - } - - return armReference, nil -} - -// VerifyARMReferenceConsumed returns an error if our configuration as an ARM reference was not consumed. -func (pc *PropertyConfiguration) VerifyARMReferenceConsumed() error { - if pc.armReference.isUnconsumed() { - v, _ := pc.armReference.read() - return errors.Errorf("property %s: "+armReferenceTag+": %t not consumed", pc.name, v) - } - - return nil -} - -// SetARMReference sets the ARM reference property -func (pc *PropertyConfiguration) SetARMReference(value bool) { - pc.armReference.write(value) -} - -// IsSecret looks up a property to determine if it's a secret -func (pc *PropertyConfiguration) IsSecret() (bool, error) { - isSecret, ok := pc.isSecret.read() - if !ok { - msg := fmt.Sprintf(isSecretTag+" not specified for property %s", pc.name) - return false, NewNotConfiguredError(msg) - } - - return isSecret, nil -} - -// VerifyIsSecretConsumed returns an error if our configuration as a secret was not consumed. -func (pc *PropertyConfiguration) VerifyIsSecretConsumed() error { - if pc.isSecret.isUnconsumed() { - v, _ := pc.isSecret.read() - return errors.Errorf("property %s: "+isSecretTag+": %t not consumed", pc.name, v) - } - - return nil -} - -// NameInNextVersion looks up a property to determine whether it is being renamed in the next version -func (pc *PropertyConfiguration) NameInNextVersion() (string, error) { - name, ok := pc.nameInNextVersion.read() - if !ok { - msg := fmt.Sprintf(nameInNextVersionTag+" not specified for property %s", pc.name) - return "", NewNotConfiguredError(msg) - } - - return name, nil -} - -func (pc *PropertyConfiguration) VerifyRenamedInNextVersionConsumed() error { - if pc.nameInNextVersion.isUnconsumed() { - v, _ := pc.nameInNextVersion.read() - return errors.Errorf("property %s: "+nameInNextVersionTag+": %s not consumed", pc.name, v) - } - - return nil -} - -// ResourceLifecycleOwnedByParent looks up a property to determine what parent owns this resource lifecycle -func (pc *PropertyConfiguration) ResourceLifecycleOwnedByParent() (string, error) { - resourceLifecycleOwnedByParent, ok := pc.resourceLifecycleOwnedByParent.read() - if !ok { - msg := fmt.Sprintf(resourceLifecycleOwnedByParentTag+" not specified for property %s", pc.name) - return "", NewNotConfiguredError(msg) - } - - return resourceLifecycleOwnedByParent, nil -} - -// ClearResourceLifecycleOwnedByParentConsumed clears the consumed bit for this flag so that it can be reused -func (pc *PropertyConfiguration) ClearResourceLifecycleOwnedByParentConsumed() { - pc.resourceLifecycleOwnedByParent.markUnconsumed() -} - -// VerifyResourceLifecycleOwnedByParentConsumed returns an error if our configuration has the -// $resourceLifecycleOwnedByParent flag, and was not consumed. -func (pc *PropertyConfiguration) VerifyResourceLifecycleOwnedByParentConsumed() error { - if pc.resourceLifecycleOwnedByParent.isUnconsumed() { - v, _ := pc.resourceLifecycleOwnedByParent.read() - return errors.Errorf("property %s: "+resourceLifecycleOwnedByParentTag+": %s not consumed", pc.name, v) - } - - return nil -} - -// SetImportConfigMapMode sets the import configMap mode -func (pc *PropertyConfiguration) SetImportConfigMapMode(mode ImportConfigMapMode) *PropertyConfiguration { - pc.importConfigMapMode.write(mode) - return pc -} - -// ImportConfigMapMode looks up a property to determine its ImportConfigMapMode -func (pc *PropertyConfiguration) ImportConfigMapMode() (ImportConfigMapMode, error) { - mode, ok := pc.importConfigMapMode.read() - if !ok { - msg := fmt.Sprintf(importConfigMapModeTag+" not specified for property %s", pc.name) - return mode, NewNotConfiguredError(msg) - } - - return mode, nil -} - -// VerifyImportConfigMapModeConsumed returns an error if our configuration had the importConfigMapMode set and was not consumed. -func (pc *PropertyConfiguration) VerifyImportConfigMapModeConsumed() error { - if pc.importConfigMapMode.isUnconsumed() { - v, _ := pc.importConfigMapMode.read() - return errors.Errorf("property %s: "+importConfigMapModeTag+": %s not consumed", pc.name, v) - } - - return nil -} - // UnmarshalYAML populates our instance from the YAML. // The slice node.Content contains pairs of nodes, first one for an ID, then one for the value. func (pc *PropertyConfiguration) UnmarshalYAML(value *yaml.Node) error { @@ -190,7 +76,7 @@ func (pc *PropertyConfiguration) UnmarshalYAML(value *yaml.Node) error { // $nameInNextVersion: if strings.EqualFold(lastId, nameInNextVersionTag) && c.Kind == yaml.ScalarNode { - pc.nameInNextVersion.write(c.Value) + pc.NameInNextVersion.Set(c.Value) continue } @@ -202,7 +88,7 @@ func (pc *PropertyConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", isSecretTag) } - pc.isSecret.write(isSecret) + pc.IsSecret.Set(isSecret) continue } @@ -214,7 +100,7 @@ func (pc *PropertyConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", resourceLifecycleOwnedByParentTag) } - pc.resourceLifecycleOwnedByParent.write(resourceLifecycleOwnedByParent) + pc.ResourceLifecycleOwnedByParent.Set(resourceLifecycleOwnedByParent) continue } @@ -226,17 +112,17 @@ func (pc *PropertyConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", armReferenceTag) } - pc.armReference.write(isARMRef) + pc.ARMReference.Set(isARMRef) continue } - // $importConfigMapMode: + // $ImportConfigMapMode: if strings.EqualFold(lastId, importConfigMapModeTag) && c.Kind == yaml.ScalarNode { switch strings.ToLower(c.Value) { case ImportConfigMapModeOptional: - pc.importConfigMapMode.write(ImportConfigMapModeOptional) + pc.ImportConfigMapMode.Set(ImportConfigMapModeOptional) case ImportConfigMapModeRequired: - pc.importConfigMapMode.write(ImportConfigMapModeRequired) + pc.ImportConfigMapMode.Set(ImportConfigMapModeRequired) default: return errors.Errorf("unknown %s value: %s.", importConfigMapModeTag, c.Value) } diff --git a/v2/tools/generator/internal/config/property_configuration_test.go b/v2/tools/generator/internal/config/property_configuration_test.go index 08753c6a4c..0009e4766a 100644 --- a/v2/tools/generator/internal/config/property_configuration_test.go +++ b/v2/tools/generator/internal/config/property_configuration_test.go @@ -21,8 +21,8 @@ func TestPropertyConfiguration_WhenYAMLWellFormed_ReturnsExpectedResult(t *testi var property PropertyConfiguration err := yaml.Unmarshal(yamlBytes, &property) g.Expect(err).To(Succeed()) - g.Expect(*property.nameInNextVersion.value).To(Equal("DemoProperty")) - g.Expect(*property.armReference.value).To(BeTrue()) + g.Expect(*property.NameInNextVersion.value).To(Equal("DemoProperty")) + g.Expect(*property.ARMReference.value).To(BeTrue()) } func TestPropertyConfiguration_WhenYAMLBadlyFormed_ReturnsError(t *testing.T) { @@ -41,9 +41,9 @@ func TestPropertyConfiguration_ARMReference_WhenSpecified_ReturnsExpectedResult( g := NewGomegaWithT(t) property := NewPropertyConfiguration("Property") - property.armReference.write(true) + property.ARMReference.Set(true) - isReference, err := property.ARMReference() + isReference, err := property.ARMReference.Lookup() g.Expect(err).To(Succeed()) g.Expect(isReference).To(BeTrue()) } @@ -54,7 +54,7 @@ func TestPropertyConfiguration_ARMReference_WhenNotSpecified_ReturnsExpectedResu property := NewPropertyConfiguration("Property") - _, err := property.ARMReference() + _, err := property.ARMReference.Lookup() g.Expect(err).NotTo(Succeed()) g.Expect(err.Error()).To(ContainSubstring(property.name)) } @@ -64,9 +64,9 @@ func TestPropertyConfiguration_VerifyARMReferenceConsumed_WhenNotConfigured_Retu g := NewGomegaWithT(t) property := NewPropertyConfiguration("Property") - _, _ = property.ARMReference() + _, _ = property.ARMReference.Lookup() - g.Expect(property.VerifyARMReferenceConsumed()).To(Succeed()) + g.Expect(property.ARMReference.VerifyConsumed()).To(Succeed()) } func TestPropertyConfiguration_VerifyARMReferenceConsumed_WhenReferenceUsed_ReturnsNil(t *testing.T) { @@ -74,11 +74,11 @@ func TestPropertyConfiguration_VerifyARMReferenceConsumed_WhenReferenceUsed_Retu g := NewGomegaWithT(t) property := NewPropertyConfiguration("Property") - property.armReference.write(true) + property.ARMReference.Set(true) - _, _ = property.ARMReference() + _, _ = property.ARMReference.Lookup() - g.Expect(property.VerifyARMReferenceConsumed()).To(Succeed()) + g.Expect(property.ARMReference.VerifyConsumed()).To(Succeed()) } func TestPropertyConfiguration_VerifyARMReferenceConsumed_WhenReferenceNotUsed_ReturnsExpectedError(t *testing.T) { @@ -86,9 +86,9 @@ func TestPropertyConfiguration_VerifyARMReferenceConsumed_WhenReferenceNotUsed_R g := NewGomegaWithT(t) property := NewPropertyConfiguration("Property") - property.armReference.write(true) + property.ARMReference.Set(true) - err := property.VerifyARMReferenceConsumed() + err := property.ARMReference.VerifyConsumed() g.Expect(err).NotTo(BeNil()) g.Expect(err.Error()).To(ContainSubstring(property.name)) } @@ -98,9 +98,9 @@ func TestPropertyConfiguration_IsSecret_WhenSpecified_ReturnsExpectedResult(t *t g := NewGomegaWithT(t) property := NewPropertyConfiguration("Property") - property.isSecret.write(true) + property.IsSecret.Set(true) - g.Expect(property.IsSecret()).To(BeTrue()) + g.Expect(property.IsSecret.Lookup()).To(BeTrue()) } func TestPropertyConfiguration_IsSecret_WhenNotSpecified_ReturnsExpectedResult(t *testing.T) { @@ -109,7 +109,7 @@ func TestPropertyConfiguration_IsSecret_WhenNotSpecified_ReturnsExpectedResult(t property := NewPropertyConfiguration("Property") - isSecret, err := property.IsSecret() + isSecret, err := property.IsSecret.Lookup() g.Expect(err.Error()).To(ContainSubstring(property.name)) g.Expect(isSecret).To(BeFalse()) diff --git a/v2/tools/generator/internal/config/type_configuration.go b/v2/tools/generator/internal/config/type_configuration.go index 6a0e7b97af..1f231f901c 100644 --- a/v2/tools/generator/internal/config/type_configuration.go +++ b/v2/tools/generator/internal/config/type_configuration.go @@ -26,20 +26,21 @@ import ( // │ │1 1..n│ │1 1..n│ │1 1..n║ ║1 1..n│ │ // └──────────────────────────┘ └────────────────────┘ └──────────────────────┘ ╚═══════════════════╝ └───────────────────────┘ type TypeConfiguration struct { - name string - properties map[string]*PropertyConfiguration - nameInNextVersion configurable[string] - export configurable[bool] - exportAs configurable[string] - azureGeneratedSecrets configurable[[]string] - generatedConfigs configurable[map[string]string] - manualConfigs configurable[[]string] - supportedFrom configurable[string] - isResource configurable[bool] - resourceEmbeddedInParent configurable[string] - importable configurable[bool] - defaultAzureName configurable[bool] - advisor *typo.Advisor + name string + properties map[string]*PropertyConfiguration + advisor *typo.Advisor + // Configurable properties here (alphabetical, please) + AzureGeneratedSecrets configurable[[]string] + DefaultAzureName configurable[bool] + Export configurable[bool] + ExportAs configurable[string] + GeneratedConfigs configurable[map[string]string] + Importable configurable[bool] + IsResource configurable[bool] + ManualConfigs configurable[[]string] + NameInNextVersion configurable[string] + ResourceEmbeddedInParent configurable[string] + SupportedFrom configurable[string] } const ( @@ -57,277 +58,26 @@ const ( ) func NewTypeConfiguration(name string) *TypeConfiguration { + scope := "type " + name return &TypeConfiguration{ name: name, properties: make(map[string]*PropertyConfiguration), advisor: typo.NewAdvisor(), + // Initialize configurable properties here (alphabetical, please) + AzureGeneratedSecrets: makeConfigurable[[]string](azureGeneratedSecretsTag, scope), + DefaultAzureName: makeConfigurable[bool](defaultAzureNameTag, scope), + Export: makeConfigurable[bool](exportTag, scope), + ExportAs: makeConfigurable[string](exportAsTag, scope), + Importable: makeConfigurable[bool](importableTag, scope), + IsResource: makeConfigurable[bool](isResourceTag, scope), + GeneratedConfigs: makeConfigurable[map[string]string](generatedConfigsTag, scope), + ManualConfigs: makeConfigurable[[]string](manualConfigsTag, scope), + NameInNextVersion: makeConfigurable[string](nameInNextVersionTag, scope), + ResourceEmbeddedInParent: makeConfigurable[string](resourceEmbeddedInParentTag, scope), + SupportedFrom: makeConfigurable[string](supportedFromTag, scope), } } -// LookupNameInNextVersion checks to see whether the name of this type in the next version is configured, returning -// either that name or a NotConfiguredError. -func (tc *TypeConfiguration) LookupNameInNextVersion() (string, error) { - name, ok := tc.nameInNextVersion.read() - if !ok { - msg := fmt.Sprintf(nameInNextVersionTag+" not specified for type %s", tc.name) - return "", NewNotConfiguredError(msg) - } - - return name, nil -} - -// VerifyNameInNextVersionConsumed returns an error if our configured rename was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyNameInNextVersionConsumed() error { - if tc.nameInNextVersion.isUnconsumed() { - v, _ := tc.nameInNextVersion.read() - return errors.Errorf("type %s: "+nameInNextVersionTag+": %s not consumed", tc.name, v) - } - - return nil -} - -// SetNameInNextVersion sets the configured $nameInNextVersion for this type -func (tc *TypeConfiguration) SetNameInNextVersion(name string) { - tc.nameInNextVersion.write(name) -} - -// LookupExport checks to see whether this type is configured for export, returning either that value or a -// NotConfiguredError. -func (tc *TypeConfiguration) LookupExport() (bool, error) { - v, ok := tc.export.read() - if !ok { - msg := fmt.Sprintf(exportTag+" not specified for type %s", tc.name) - return false, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyExportConsumed returns an error if our configured export flag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyExportConsumed() error { - if tc.export.isUnconsumed() { - v, _ := tc.export.read() - return errors.Errorf("type %s: "+exportTag+": %t not consumed", tc.name, v) - } - - return nil -} - -// LookupExportAs checks to see whether this type has a custom name configured for export, returning either that name -// or a NotConfiguredError. -func (tc *TypeConfiguration) LookupExportAs() (string, error) { - v, ok := tc.exportAs.read() - if !ok { - msg := fmt.Sprintf(exportAsTag+" not specified for type %s", tc.name) - return "", NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyExportAsConsumed returns an error if our configured export name was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyExportAsConsumed() error { - if tc.exportAs.isUnconsumed() { - v, _ := tc.exportAs.read() - return errors.Errorf("type %s: "+exportAsTag+": %s not consumed", tc.name, v) - } - - return nil -} - -// SetAzureGeneratedSecrets sets the list of Azure Generated secrets this type supports -func (tc *TypeConfiguration) SetAzureGeneratedSecrets(secrets []string) *TypeConfiguration { - tc.azureGeneratedSecrets.write(secrets) - return tc -} - -// AzureGeneratedSecrets gets the list of Azure Generated secrets this type supports -func (tc *TypeConfiguration) AzureGeneratedSecrets() ([]string, error) { - v, ok := tc.azureGeneratedSecrets.read() - if !ok { - msg := fmt.Sprintf("%s not specified for type %s", azureGeneratedSecretsTag, tc.name) - return nil, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyAzureGeneratedSecretsConsumed returns an error if our configured azureGeneratedSecrets were not used, -// nil otherwise. -func (tc *TypeConfiguration) VerifyAzureGeneratedSecretsConsumed() error { - if tc.azureGeneratedSecrets.isUnconsumed() { - return errors.Errorf("type %s: "+azureGeneratedSecretsTag+": not consumed", tc.name) - } - - return nil -} - -// SetGeneratedConfigs sets the list of Azure Generated configmaps this type supports -func (tc *TypeConfiguration) SetGeneratedConfigs(configMaps map[string]string) *TypeConfiguration { - tc.generatedConfigs.write(configMaps) - return tc -} - -// GeneratedConfigs gets the list of Azure Generated config maps this type supports -func (tc *TypeConfiguration) GeneratedConfigs() (map[string]string, error) { - v, ok := tc.generatedConfigs.read() - if !ok { - msg := fmt.Sprintf("%s not specified for type %s", generatedConfigsTag, tc.name) - return nil, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyGeneratedConfigsConsumed returns an error if our configured generatedConfigs were not used, -// nil otherwise. -func (tc *TypeConfiguration) VerifyGeneratedConfigsConsumed() error { - if tc.generatedConfigs.isUnconsumed() { - return errors.Errorf("type %s: "+generatedConfigsTag+": not consumed", tc.name) - } - - return nil -} - -// SetManualConfigs sets the list of manual configmaps this type supports -func (tc *TypeConfiguration) SetManualConfigs(configMaps []string) *TypeConfiguration { - tc.manualConfigs.write(configMaps) - return tc -} - -// ManualConfigs gets the list of Azure Generated config maps this type supports -func (tc *TypeConfiguration) ManualConfigs() ([]string, error) { - v, ok := tc.manualConfigs.read() - if !ok { - msg := fmt.Sprintf("%s not specified for type %s", manualConfigsTag, tc.name) - return nil, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyManualConfigsConsumed returns an error if our configured azureGeneratedConfigs were not used, -// nil otherwise. -func (tc *TypeConfiguration) VerifyManualConfigsConsumed() error { - if tc.manualConfigs.isUnconsumed() { - return errors.Errorf("type %s: "+manualConfigsTag+": not consumed", tc.name) - } - - return nil -} - -// LookupSupportedFrom checks to see whether this type has its first ASO release configured, returning either that -// release or a NotConfiguredError. -func (tc *TypeConfiguration) LookupSupportedFrom() (string, error) { - v, ok := tc.supportedFrom.read() - if !ok { - msg := fmt.Sprintf(supportedFromTag+" not specified for type %s", tc.name) - return "", NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifySupportedFromConsumed returns an error if our configured supportedFrom tag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifySupportedFromConsumed() error { - if tc.supportedFrom.isUnconsumed() { - v, _ := tc.supportedFrom.read() - return errors.Errorf("type %s: "+supportedFromTag+": %s not consumed", tc.name, v) - } - - return nil -} - -// SetSupportedFrom sets the configured $supportedFrom for this type -func (tc *TypeConfiguration) SetSupportedFrom(from string) { - tc.supportedFrom.write(from) -} - -// LookupResourceEmbeddedInParent checks to see whether this type is a resource embedded in its parent -func (tc *TypeConfiguration) LookupResourceEmbeddedInParent() (string, error) { - v, ok := tc.resourceEmbeddedInParent.read() - if !ok { - msg := fmt.Sprintf(resourceEmbeddedInParentTag+" not specified for type %s", tc.name) - return "", NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyResourceEmbeddedInParentConsumed returns an error if our configured isResource flag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyResourceEmbeddedInParentConsumed() error { - if tc.resourceEmbeddedInParent.isUnconsumed() { - v, _ := tc.export.read() - return errors.Errorf("type %s: "+resourceEmbeddedInParentTag+": %t not consumed", tc.name, v) - } - - return nil -} - -// LookupIsResource checks to see whether this type is a resource embedded in its parent -func (tc *TypeConfiguration) LookupIsResource() (bool, error) { - v, ok := tc.isResource.read() - if !ok { - msg := fmt.Sprintf(isResourceTag+" not specified for type %s", tc.name) - return false, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyIsResourceConsumed returns an error if our configured isResource flag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyIsResourceConsumed() error { - if tc.isResource.isUnconsumed() { - v, _ := tc.export.read() - return errors.Errorf("type %s: "+isResourceTag+": %t not consumed", tc.name, v) - } - - return nil -} - -// LookupImportable checks to see whether this resource type is importable via asoctl -func (tc *TypeConfiguration) LookupImportable() (bool, error) { - v, ok := tc.importable.read() - if !ok { - msg := fmt.Sprintf(importableTag+" not specified for type %s", tc.name) - return false, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyImportable consumed returns an error if our configured importable flag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyImportableConsumed() error { - if tc.importable.isUnconsumed() { - v, _ := tc.importable.read() - return errors.Errorf("type %s: "+importableTag+": %t not consumed", tc.name, v) - } - - return nil -} - -// LookupDefaultAzureName checks to see whether this type should default AzureName. If not specified, returns -// NotConfiguredError. -func (tc *TypeConfiguration) LookupDefaultAzureName() (bool, error) { - v, ok := tc.defaultAzureName.read() - if !ok { - msg := fmt.Sprintf(defaultAzureNameTag+" not specified for type %s", tc.name) - return false, NewNotConfiguredError(msg) - } - - return v, nil -} - -// VerifyDefaultAzureNameConsumed returns an error if our configured DefaultAzureName flag was not used, nil otherwise. -func (tc *TypeConfiguration) VerifyDefaultAzureNameConsumed() error { - if tc.defaultAzureName.isUnconsumed() { - v, _ := tc.defaultAzureName.read() - return errors.Errorf("type %s: "+defaultAzureNameTag+": %t not consumed", tc.name, v) - } - - return nil -} - // Add includes configuration for the specified property as a part of this type configuration func (tc *TypeConfiguration) addProperty(name string, property *PropertyConfiguration) { // Indexed by lowercase name of the property to allow case-insensitive lookups @@ -437,7 +187,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { // TODO: Check we had an even number of nodes - tc.SetGeneratedConfigs(azureGeneratedConfigs) + tc.GeneratedConfigs.Set(azureGeneratedConfigs) continue } @@ -455,7 +205,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { // $nameInNextVersion: if strings.EqualFold(lastId, nameInNextVersionTag) && c.Kind == yaml.ScalarNode { - tc.nameInNextVersion.write(c.Value) + tc.NameInNextVersion.Set(c.Value) continue } @@ -467,17 +217,17 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", exportTag) } - tc.export.write(export) + tc.Export.Set(export) continue } // $exportAs: if strings.EqualFold(lastId, exportAsTag) && c.Kind == yaml.ScalarNode { - tc.exportAs.write(c.Value) + tc.ExportAs.Set(c.Value) continue } - // $azureGeneratedSecrets: + // $AzureGeneratedSecrets: // - secret1 // - secret2 if strings.EqualFold(lastId, azureGeneratedSecretsTag) && c.Kind == yaml.SequenceNode { @@ -494,7 +244,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { } } - tc.SetAzureGeneratedSecrets(azureGeneratedSecrets) + tc.AzureGeneratedSecrets.Set(azureGeneratedSecrets) continue } @@ -512,13 +262,13 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { } } - tc.SetManualConfigs(manualAzureGeneratedConfigs) + tc.ManualConfigs.Set(manualAzureGeneratedConfigs) continue } - // $supportedFrom + // $SupportedFrom if strings.EqualFold(lastId, supportedFromTag) && c.Kind == yaml.ScalarNode { - tc.supportedFrom.write(c.Value) + tc.SupportedFrom.Set(c.Value) continue } @@ -530,7 +280,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", resourceEmbeddedInParentTag) } - tc.resourceEmbeddedInParent.write(resourceEmbeddedInParent) + tc.ResourceEmbeddedInParent.Set(resourceEmbeddedInParent) continue } @@ -542,7 +292,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", isResourceTag) } - tc.isResource.write(isResource) + tc.IsResource.Set(isResource) continue } @@ -554,7 +304,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", importableTag) } - tc.importable.write(importable) + tc.Importable.Set(importable) continue } @@ -566,7 +316,7 @@ func (tc *TypeConfiguration) UnmarshalYAML(value *yaml.Node) error { return errors.Wrapf(err, "decoding %s", defaultAzureNameTag) } - tc.defaultAzureName.write(defaultAzureName) + tc.DefaultAzureName.Set(defaultAzureName) continue } diff --git a/v2/tools/generator/internal/config/type_configuration_test.go b/v2/tools/generator/internal/config/type_configuration_test.go index dab627961d..16ea2bc680 100644 --- a/v2/tools/generator/internal/config/type_configuration_test.go +++ b/v2/tools/generator/internal/config/type_configuration_test.go @@ -23,23 +23,23 @@ func TestTypeConfiguration_WhenYAMLWellFormed_ReturnsExpectedResult(t *testing.T g.Expect(err).To(Succeed()) g.Expect(typeConfig.properties).To(HaveLen(4)) - name, ok := typeConfig.nameInNextVersion.read() + name, ok := typeConfig.NameInNextVersion.read() g.Expect(name).To(Equal("Demo")) g.Expect(ok).To(BeTrue()) - export, ok := typeConfig.export.read() + export, ok := typeConfig.Export.read() g.Expect(export).To(BeTrue()) g.Expect(ok).To(BeTrue()) - exportAs, ok := typeConfig.exportAs.read() + exportAs, ok := typeConfig.ExportAs.read() g.Expect(exportAs).To(Equal("Demo")) g.Expect(ok).To(BeTrue()) - azureGeneratedSecrets, ok := typeConfig.azureGeneratedSecrets.read() + azureGeneratedSecrets, ok := typeConfig.AzureGeneratedSecrets.read() g.Expect(azureGeneratedSecrets).To(HaveLen(2)) g.Expect(ok).To(BeTrue()) - supportedFrom, ok := typeConfig.supportedFrom.read() + supportedFrom, ok := typeConfig.SupportedFrom.read() g.Expect(supportedFrom).To(Equal("beta.3")) g.Expect(ok).To(BeTrue()) } @@ -75,9 +75,9 @@ func TestTypeConfiguration_TypeRename_WhenRenameConfigured_ReturnsExpectedResult t.Parallel() g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.nameInNextVersion.write("Address") + typeConfig.NameInNextVersion.Set("Address") - name, err := typeConfig.LookupNameInNextVersion() + name, err := typeConfig.NameInNextVersion.Lookup() g.Expect(name).To(Equal("Address")) g.Expect(err).To(Succeed()) @@ -88,7 +88,7 @@ func TestTypeConfiguration_TypeRename_WhenRenameNotConfigured_ReturnsExpectedRes g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - name, err := typeConfig.LookupNameInNextVersion() + name, err := typeConfig.NameInNextVersion.Lookup() g.Expect(name).To(Equal("")) g.Expect(err).NotTo(Succeed()) g.Expect(err.Error()).To(ContainSubstring(typeConfig.name)) @@ -100,11 +100,11 @@ func TestTypeConfiguration_VerifyTypeRenameConsumed_WhenRenameUsed_ReturnsNoErro g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.nameInNextVersion.write("Party") + typeConfig.NameInNextVersion.Set("Party") - _, err := typeConfig.LookupNameInNextVersion() + _, err := typeConfig.NameInNextVersion.Lookup() g.Expect(err).To(Succeed()) - g.Expect(typeConfig.VerifyNameInNextVersionConsumed()).To(Succeed()) + g.Expect(typeConfig.NameInNextVersion.VerifyConsumed()).To(Succeed()) } func TestTypeConfiguration_VerifyTypeRenameConsumed_WhenRenameUnused_ReturnsExpectedError(t *testing.T) { @@ -112,9 +112,9 @@ func TestTypeConfiguration_VerifyTypeRenameConsumed_WhenRenameUnused_ReturnsExpe g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.nameInNextVersion.write("Party") + typeConfig.NameInNextVersion.Set("Party") - err := typeConfig.VerifyNameInNextVersionConsumed() + err := typeConfig.NameInNextVersion.VerifyConsumed() g.Expect(err).NotTo(BeNil()) g.Expect(err.Error()).To(ContainSubstring(typeConfig.name)) } @@ -127,9 +127,9 @@ func TestTypeConfiguration_LookupSupportedFrom_WhenConfigured_ReturnsExpectedRes t.Parallel() g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.supportedFrom.write("beta.0") + typeConfig.SupportedFrom.Set("beta.0") - from, err := typeConfig.LookupSupportedFrom() + from, err := typeConfig.SupportedFrom.Lookup() g.Expect(from).To(Equal("beta.0")) g.Expect(err).To(Succeed()) @@ -140,7 +140,7 @@ func TestTypeConfiguration_LookupSupportedFrom_WhenNotConfigured_ReturnsExpected g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - name, err := typeConfig.LookupSupportedFrom() + name, err := typeConfig.SupportedFrom.Lookup() g.Expect(name).To(Equal("")) g.Expect(err).NotTo(Succeed()) g.Expect(err.Error()).To(ContainSubstring(typeConfig.name)) @@ -152,11 +152,11 @@ func TestTypeConfiguration_VerifySupportedFromConsumed_WhenConsumed_ReturnsNoErr g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.supportedFrom.write("beta.0") + typeConfig.SupportedFrom.Set("beta.0") - _, err := typeConfig.LookupSupportedFrom() + _, err := typeConfig.SupportedFrom.Lookup() g.Expect(err).To(Succeed()) - g.Expect(typeConfig.VerifySupportedFromConsumed()).To(Succeed()) + g.Expect(typeConfig.SupportedFrom.VerifyConsumed()).To(Succeed()) } func TestTypeConfiguration_VerifySupportedFromConsumed_WhenNotConsumed_ReturnsExpectedError(t *testing.T) { @@ -164,9 +164,9 @@ func TestTypeConfiguration_VerifySupportedFromConsumed_WhenNotConsumed_ReturnsEx g := NewGomegaWithT(t) typeConfig := NewTypeConfiguration("Person") - typeConfig.supportedFrom.write("beta.0") + typeConfig.SupportedFrom.Set("beta.0") - err := typeConfig.VerifySupportedFromConsumed() + err := typeConfig.SupportedFrom.VerifyConsumed() g.Expect(err).NotTo(BeNil()) g.Expect(err.Error()).To(ContainSubstring(typeConfig.name)) } diff --git a/v2/tools/generator/internal/conversions/property_conversion_context.go b/v2/tools/generator/internal/conversions/property_conversion_context.go index 90526586fe..3707c0ea8c 100644 --- a/v2/tools/generator/internal/conversions/property_conversion_context.go +++ b/v2/tools/generator/internal/conversions/property_conversion_context.go @@ -132,7 +132,7 @@ func (c *PropertyConversionContext) TypeRename(name astmodel.TypeName) (string, return "", config.NewNotConfiguredError("No configuration available") } - return c.configuration.LookupNameInNextVersion(name) + return c.configuration.TypeNameInNextVersion.Lookup(name) } // FindNextType returns the next type in the storage conversion graph, if any. diff --git a/v2/tools/generator/internal/functions/property_assignment_function_test.go b/v2/tools/generator/internal/functions/property_assignment_function_test.go index c07c8a7b45..826c5a27ba 100644 --- a/v2/tools/generator/internal/functions/property_assignment_function_test.go +++ b/v2/tools/generator/internal/functions/property_assignment_function_test.go @@ -383,7 +383,7 @@ func TestGolden_PropertyAssignmentFunction_WhenTypeRenamed(t *testing.T) { omc.ModifyType( location.Name(), func(tc *config.TypeConfiguration) error { - tc.SetNameInNextVersion(venue.Name().Name()) + tc.NameInNextVersion.Set(venue.Name().Name()) return nil })). To(Succeed())