Skip to content

Mitigate MI breaking changes #24483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/CustomLocation/CustomLocation.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ For information on how to develop for `Az.CustomLocation`, see [how-to.md](how-t
commit: f1180941e238bc99ac71f9535ecd126bb8b77d8f
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
input-file:
- $(repo)/specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/customlocations.json

module-version: 0.1.0
title: CustomLocation
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

identity-correction-for-post: true

directive:
- from: swagger-document
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ExtendedLocation/customLocations/{resourceName}"].delete.responses
transform: >-
return {
Expand All @@ -64,7 +66,7 @@ directive:
}
}

- from: swagger-document
- from: swagger-document
where: $.definitions.customLocationProperties.properties.provisioningState
transform: >-
return {
Expand Down
20 changes: 11 additions & 9 deletions src/ElasticSan/ElasticSan.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ title: ElasticSan
# For new RP, the version is 0.1.0
module-version: 0.3.0
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

enable-parent-pipeline-input: true

# If there are post APIs for some kinds of actions in the RP, you may need to
# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: true

Expand All @@ -68,12 +70,12 @@ directive:
alias: ElasticSanName
- where:
subject: VolumeGroup
parameter-name: Name
parameter-name: Name
set:
alias: VolumeGroupName
- where:
subject: Volume
parameter-name: Name
parameter-name: Name
set:
alias: VolumeName
- where:
Expand All @@ -85,7 +87,7 @@ directive:
set:
parameter-name: ForceDelete
- where:
parameter-name: SnapshotName
parameter-name: SnapshotName
set:
parameter-name: Name
- where:
Expand All @@ -106,7 +108,7 @@ directive:
parameter-name: GroupName
set:
parameter-name: VolumeGroupName
- where:
- where:
subject: VolumeSnapshot
verb: Update
remove: true
Expand Down Expand Up @@ -139,14 +141,14 @@ directive:
- where:
subject: ^PrivateEndpointConnection$|^PrivateLinkResource$
hide: true
- where:
- where:
verb: ^New$|^Update$
subject: ^VolumeGroup$
hide: true
- where:
- where:
verb: New
subject: Volume
parameter-name: ManagedByResourceId
subject: Volume
parameter-name: ManagedByResourceId
hide: true
- from: IdentityUserAssignedIdentities.dictionary.cs
where: $
Expand Down
6 changes: 3 additions & 3 deletions src/KeyVault/KeyVault.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ input-file:
- $(repo)/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keyvault.json
- $(repo)/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/managedHsm.json
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
# - (this-folder)/relative-path-to-your-swagger
# - (this-folder)/relative-path-to-your-swagger

# For new RP, the version is 0.1.0
module-version: 0.1.0
# Normally, title is the service name
title: KeyVault
subject-prefix: $(service-name)

# If there are post APIs for some kinds of actions in the RP, you may need to
# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: true

Expand All @@ -64,7 +64,7 @@ directive:
- where:
verb: Set
remove: true
# Combine Test-AzKeyVaultNameAvailability and Test-AzKeyVaultManagedHsmNameAvailability
# Combine Test-AzKeyVaultNameAvailability and Test-AzKeyVaultManagedHsmNameAvailability
- from: swagger-document
where: $.paths..operationId
transform: return $.replace(/^ManagedHsms_CheckMhsmNameAvailability$/g, "ManagedHsms_CheckNameAvailability")
Expand Down
7 changes: 4 additions & 3 deletions src/PaloAltoNetworks/PaloAltoNetworks.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ input-file:
title: PaloAltoNetworks
module-version: 0.2.0
subject-prefix: $(service-name)

disable-transform-identity-type: true
flatten-userassignedidentity: false

directive:
- from: swagger-document
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/commit"].post.responses
transform: >-
return {
Expand All @@ -60,7 +61,7 @@ directive:
}
}

- from: swagger-document
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/revert"].post.responses
transform: >-
return {
Expand Down
8 changes: 4 additions & 4 deletions src/Storage/Storage.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ module-version: 5.9.1
title: Storage
subject-prefix: $(service-name)
nested-object-to-string: true
identity-correction-for-post: true
identity-correction-for-post: true

directive:
- where:
- where:
subject: ^StorageAccountCustomerInitiatedMigration$
set:
subject: StorageAccountMigration
- where:
verb: Invoke
verb: Invoke
subject: ^CustomerStorageAccountInitiatedMigration$
set:
verb: Start
Expand All @@ -64,7 +64,7 @@ directive:
parameter-name: StorageAccountMigrationDetailTargetSkuName
set:
parameter-name: TargetSku
- where:
- where:
subject: ^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Sku$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$
remove: true
```
10 changes: 6 additions & 4 deletions src/VMware/VMware.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ In this directory, run AutoRest:
commit: 0baf811c3c76c87b3c127d098519bd97141222dd
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
input-file:
- $(repo)/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/vmware.json

module-version: 0.4.0
title: VMware
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

support-json-input: false

directive:
- from: swagger-document
- from: swagger-document
where: $.definitions.AdminCredentials.properties.nsxtPassword
transform: >-
return {
Expand All @@ -70,7 +72,7 @@ directive:
"x-ms-secret": true,
"format": "password"
}
- from: swagger-document
- from: swagger-document
where: $.definitions.AdminCredentials.properties.vcenterPassword
transform: >-
return {
Expand Down Expand Up @@ -138,7 +140,7 @@ directive:
# verb: Test
# subject: ^LocationTrialAvailability$
# hide: true
# Remove the list variant as the workloadNetwork only have one enum value
# Remove the list variant as the workloadNetwork only have one enum value
- where:
verb: Get
subject: WorkloadNetwork
Expand Down