Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
16 changes: 16 additions & 0 deletions src/ResilienceManagement/ResilienceManagement.Autorest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
bin
obj
.vs
generated
internal
/exports
tools
test/*-TestResults.xml
/license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
/*.csproj
/*.nuspec
130 changes: 130 additions & 0 deletions src/ResilienceManagement/ResilienceManagement.Autorest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<!-- region Generated -->
# Az.ResilienceManagement
This directory contains the PowerShell module for the Resilience service.

---
## Status
[![Az.ResilienceManagement](https://img.shields.io/powershellgallery/v/Az.ResilienceManagement.svg?style=flat-square&label=Az.ResilienceManagement "Az.ResilienceManagement")](https://www.powershellgallery.com/packages/Az.ResilienceManagement/)

## Info
- Modifiable: yes
- Generated: all
- Committed: yes
- Packaged: yes

---
## Detail
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.

## Development
For information on how to develop for `Az.ResilienceManagement`, see [how-to.md](how-to.md).
<!-- endregion -->

### AutoRest Configuration
> see https://aka.ms/autorest
``` yaml
# NOTE: Swagger is still on krtcodee/azure-rest-api-specs branch krt/pwsh-cmd until it
# merges into Azure/azure-rest-api-specs. Once merged, replace `input-file` with a
# `commit:` pin + `$(repo)/specification/...` reference (see other modules).
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- https://raw.githubusercontent.com/krtcodee/azure-rest-api-specs/krt/pwsh-cmd/specification/azureresiliencemanagement/resource-manager/Microsoft.AzureResilienceManagement/AzureResilienceManagement/preview/2026-08-31-preview/openapi.json
Comment on lines +32 to +38

root-module-name: $(prefix).ResilienceManagement
title: AzureResilienceManagement
module-version: 0.1.0
service-name: ResilienceManagement
subject-prefix: ResilienceManagement
identity-correction-for-post: true

directive:
# Drop the unexpanded / JSON-only variants for Create/Update per Az conventions
- where:
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentityExpanded$
remove: true

# ---------------------------------------------------------------------
# Swagger fix: DrillProperties.errorDetails breaks codegen (see prior
# readme.powershell.md notes). Drop the flattened readOnly field.
# ---------------------------------------------------------------------
- from: swagger-document
where: $.definitions.DrillProperties.properties
transform: delete $["errorDetails"]

# ---------------------------------------------------------------------
# UsagePlans has two List endpoints (by-subscription, by-resource-group)
# that collapse to the same variant `_List`. Give the second one a
# distinct variant name.
# ---------------------------------------------------------------------
- where:
verb: Get
subject: UsagePlan
variant: List1
set:
variant: ListByResourceGroup

# ---------------------------------------------------------------------
# RecoveryPlanActions has 11 POST endpoints under the same operation
# group. Autorest tries to merge them into a single cmdlet whose -Body
# parameter has ~11 different types, which Export-ProxyCmdlet refuses.
#
# Rename each operationId to give it a distinct subject so autorest
# emits one cmdlet per action.
# ---------------------------------------------------------------------
# Action operations (each gets its own Invoke-* cmdlet)
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/failover"].post
transform: $.operationId = "RecoveryPlanFailover_Trigger";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/failoverCommit"].post
transform: $.operationId = "RecoveryPlanFailoverCommit_Trigger";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/reprotect"].post
transform: $.operationId = "RecoveryPlanReprotect_Trigger";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/testFailover"].post
transform: $.operationId = "RecoveryPlanTestFailover_Trigger";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/testFailoverCleanup"].post
transform: $.operationId = "RecoveryPlanTestFailoverCleanup_Trigger";

# Validation operations
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForFailover"].post
transform: $.operationId = "RecoveryPlanFailoverValidation_Validate";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForFailoverCommit"].post
transform: $.operationId = "RecoveryPlanFailoverCommitValidation_Validate";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForOperation"].post
transform: $.operationId = "RecoveryPlanOperationValidation_Validate";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForReprotect"].post
transform: $.operationId = "RecoveryPlanReprotectValidation_Validate";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForTestFailover"].post
transform: $.operationId = "RecoveryPlanTestFailoverValidation_Validate";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/recoveryPlans/{recoveryPlanName}/validateForTestFailoverCleanup"].post
transform: $.operationId = "RecoveryPlanTestFailoverCleanupValidation_Validate";

# ---------------------------------------------------------------------
# DrillRuns has FailOver + Reprotect endpoints — same collision pattern.
# ---------------------------------------------------------------------
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/drills/{drillName}/drillRuns/{drillRunName}/failOver"].post
transform: $.operationId = "DrillRunFailover_Trigger";
- from: swagger-document
where: $.paths["/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.AzureResilienceManagement/drills/{drillName}/drillRuns/{drillRunName}/reprotect"].post
transform: $.operationId = "DrillRunReprotect_Trigger";
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"resourceType": "locations/operationStatuses",
"apiVersion": "2026-08-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement"
},
"commands": [
{
"name": "Get-AzResilienceManagementOperationStatus",
"description": "Returns the current status of an async operation.",
"path": "/providers/Microsoft.AzureResilienceManagement/locations/{location}/operationStatuses/{operationId}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement/get-azresiliencemanagementoperationstatus"
},
"parameterSets": [
{
"parameters": [
"-Location <String>",
"-OperationId <String>"
]
}
]
},
"examples": [
{
"description": "Returns the current status of an async operation.",
"parameters": [
{
"name": "-Location",
"value": "[Path.location]"
},
{
"name": "-OperationId",
"value": "[Path.operationId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"resourceType": "usagePlans/enrollments",
"apiVersion": "2026-08-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement"
},
"commands": [
{
"name": "Get-AzResilienceManagementEnrollment",
"description": "Get an Enrollment.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureResilienceManagement/usagePlans/{usagePlanName}/enrollments/{enrollmentName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement/get-azresiliencemanagementenrollment"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]",
"-UsagePlanName <String>"
]
}
]
},
"examples": [
{
"description": "Get an Enrollment.",
"parameters": [
{
"name": "-Name",
"value": "[Path.enrollmentName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-UsagePlanName",
"value": "[Path.usagePlanName]"
}
]
}
]
},
{
"name": "Remove-AzResilienceManagementEnrollment",
"description": "Delete an Enrollment.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureResilienceManagement/usagePlans/{usagePlanName}/enrollments/{enrollmentName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement/remove-azresiliencemanagementenrollment"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]",
"-UsagePlanName <String>"
]
}
]
},
"examples": [
{
"description": "Delete an Enrollment.",
"parameters": [
{
"name": "-Name",
"value": "[Path.enrollmentName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-UsagePlanName",
"value": "[Path.usagePlanName]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "usagePlans",
"apiVersion": "2026-08-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement"
},
"commands": [
{
"name": "Get-AzResilienceManagementUsagePlan",
"description": "Get a UsagePlan",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureResilienceManagement/usagePlans/{usagePlanName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement/get-azresiliencemanagementusageplan"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a UsagePlan",
"parameters": [
{
"name": "-Name",
"value": "[Path.usagePlanName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzResilienceManagementUsagePlan",
"description": "Delete a UsagePlan",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureResilienceManagement/usagePlans/{usagePlanName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.resiliencemanagement/remove-azresiliencemanagementusageplan"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a UsagePlan",
"parameters": [
{
"name": "-Name",
"value": "[Path.usagePlanName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Loading
Loading