// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT.

package armresiliencemanagement_test

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resiliencemanagement/armresiliencemanagement"
	"log"
)

// Generated from example definition: 2026-04-01-preview/Drills_AddOrUpdateResources_MaximumSet_Gen.json
func ExampleDrillsClient_BeginAddOrUpdateResources() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginAddOrUpdateResources(ctx, "sampleServiceGroupName", "qmn", "drill1", armresiliencemanagement.AddOrUpdateResourcesRequest{
		FaultDurationInMin: to.Ptr[int32](0),
		ResourceLists: &armresiliencemanagement.ResourceLists{
			IncludeResources: []*armresiliencemanagement.IncludeOrUpdateResource{
				{
					FaultProperties: &armresiliencemanagement.FaultProperties{
						CustomFault: &armresiliencemanagement.CustomFaultDetails{
							FaultName:        to.Ptr("umofuzwgczqwyzcoakmrdrkjknykdonhypxibwrweggltsmjayvnlzroxdfalwkfsqvuqtfwhhzcnemndbgxdiciqs"),
							ScriptResourceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/abhinkRG/providers/Microsoft.Automation/automationAccounts/abhinkAcc/runbooks/viveksi"),
						},
						DefaultFault: &armresiliencemanagement.FaultDetails{
							FaultUrn:         to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
							FaultName:        to.Ptr("shutdown"),
							TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
						},
						OverriddenDefaultFault: &armresiliencemanagement.FaultDetails{
							FaultUrn:         to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
							FaultName:        to.Ptr("shutdown"),
							TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
						},
					},
					ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/2c9b3a1f-f96e-42c2-98fe-15005da8a133"),
				},
			},
			ExcludeResources: []*string{
				to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/c2191964-be24-4849-8faf-d9569576c708"),
			},
			UpdateResources: []*armresiliencemanagement.IncludeOrUpdateResource{
				{
					FaultProperties: &armresiliencemanagement.FaultProperties{
						CustomFault: &armresiliencemanagement.CustomFaultDetails{
							FaultName:        to.Ptr("umofuzwgczqwyzcoakmrdrkjknykdonhypxibwrweggltsmjayvnlzroxdfalwkfsqvuqtfwhhzcnemndbgxdiciqs"),
							ScriptResourceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/abhinkRG/providers/Microsoft.Automation/automationAccounts/abhinkAcc/runbooks/viveksi"),
						},
						DefaultFault: &armresiliencemanagement.FaultDetails{
							FaultUrn:         to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
							FaultName:        to.Ptr("shutdown"),
							TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
						},
						OverriddenDefaultFault: &armresiliencemanagement.FaultDetails{
							FaultUrn:         to.Ptr("urn:csci:microsoft:virtualMachine:shutdown/1.0"),
							FaultName:        to.Ptr("shutdown"),
							TargetResourceID: to.Ptr("/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/testRG/providers/Microsoft.Compute/virtualMachines/vm1"),
						},
					},
					ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1/drillResources/c26bea42-c34c-4e6f-8cf4-15043e18c8bc"),
				},
			},
		},
		ForceInclusionAndUpdate: to.Ptr(armresiliencemanagement.ForceInclusionAndUpdateEnable),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
}

// Generated from example definition: 2026-04-01-preview/Drills_Create_MaximumSet_Gen.json
func ExampleDrillsClient_BeginCreate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginCreate(ctx, "sampleServiceGroupName", "drill1", armresiliencemanagement.Drill{
		Properties: &armresiliencemanagement.DrillProperties{
			ExecutionState: to.Ptr(armresiliencemanagement.ExecutionStateNotRunning),
			RbacSetupMode:  to.Ptr(armresiliencemanagement.RBACSetupModeAutomatedCustomRole),
			AttentionReason: &armresiliencemanagement.AttentionReason{
				RoReadiness:             to.Ptr(armresiliencemanagement.RecoveryPlanStateUnderEdit),
				DrillUserMsi:            to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
				DrillRbacOnRecoveryPlan: to.Ptr(armresiliencemanagement.RBACStateSet),
				RbacNeededForDrillOnRecoveryPlan: []*string{
					to.Ptr("ayfyepziwdyxuwuexlamaadey"),
				},
				RecoveryPlanAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
				ServiceGroupAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
				RunbookFaultRbacOnTargets:          to.Ptr(armresiliencemanagement.RBACStateSet),
				IncludedResourceInDrill:            to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
				DrillRbacOnMonitoringResources:     to.Ptr(armresiliencemanagement.RBACStateSet),
				DrillMonitoringErrors: []*armresiliencemanagement.ErrorDetails{
					{
						Code:    to.Ptr("14123903"),
						Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
					},
				},
				DrillMonitoringResources:       to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
				MonitoringRbacOnDrillResources: to.Ptr(armresiliencemanagement.RBACStateSet),
				RbacNeededForDrillOnDrillMonitoringResources: []*string{
					to.Ptr("lyffvljvuhwvxcuzyzlyo"),
				},
				RbacNeededForDrillOnDrillResources: []*string{
					to.Ptr("sajsgcweakvzfunxfzzxe"),
				},
				MissingRequiredResourceProviders: []*string{
					to.Ptr("Microsoft.Chaos"),
					to.Ptr("Microsoft.Automation"),
				},
				DrillRbacOnChaosResource: to.Ptr(armresiliencemanagement.RBACStateSet),
				RbacNeededForDrillOnChaosResource: []*string{
					to.Ptr("zabszxqjflfjgifyrtttvdpipw"),
				},
				ChaosResource:         to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
				ChaosResourceUserMsi:  to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
				RbacOnTargetResources: to.Ptr(armresiliencemanagement.RBACStateSet),
				ChaosResourceCreationFailureReasons: []*string{
					to.Ptr("cjqkzeqcktfqcpmdwoloqb"),
				},
			},
			SystemMetadata: &armresiliencemanagement.SystemMetadata{
				InitialConfig: to.Ptr(armresiliencemanagement.InitialConfigPending),
			},
			DrillType: to.Ptr(armresiliencemanagement.DrillType("DrillProperties")),
			LastRunProperties: &armresiliencemanagement.LastRunProperties{
				LastRunState:       to.Ptr(armresiliencemanagement.JobStatusNotStarted),
				LastRunAttestation: to.Ptr(armresiliencemanagement.DrillAttestationAttestedSuccess),
			},
			ExecutionReadinessState:        to.Ptr(armresiliencemanagement.ExecutionReadinessStateReady),
			ManagedOnBehalfOfConfiguration: &armresiliencemanagement.ManagedOnBehalfOfConfiguration{},
			RecoveryPlanProperties: &armresiliencemanagement.RecoveryPlanPropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
			MonitoringProperties: &armresiliencemanagement.MonitoringPropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
			DrillAssetProperties: &armresiliencemanagement.AssetPropertiesOfDrill{
				Subscription:  to.Ptr("4e88bed3-114f-443d-9975-28f64122ec5e"),
				Region:        to.Ptr("eastus"),
				ResourceGroup: to.Ptr("customDrillResourceGroup"),
			},
			ChaosResourceProperties: &armresiliencemanagement.ChaosResourcePropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
				ChaosResourceIdentityForFaults: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
		},
		Identity: &armresiliencemanagement.ManagedServiceIdentity{
			Type:                   to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armresiliencemanagement.UserAssignedIdentity{},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientCreateResponse{
	// 	Drill: armresiliencemanagement.Drill{
	// 		Properties: &armresiliencemanagement.DrillProperties{
	// 			ExecutionState: to.Ptr(armresiliencemanagement.ExecutionStateNotRunning),
	// 			RbacSetupMode: to.Ptr(armresiliencemanagement.RBACSetupModeAutomatedCustomRole),
	// 			AttentionReason: &armresiliencemanagement.AttentionReason{
	// 				RoReadiness: to.Ptr(armresiliencemanagement.RecoveryPlanStateUnderEdit),
	// 				DrillUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				DrillRbacOnRecoveryPlan: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnRecoveryPlan: []*string{
	// 					to.Ptr("ayfyepziwdyxuwuexlamaadey"),
	// 				},
	// 				RecoveryPlanAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
	// 				ServiceGroupAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
	// 				RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				IncludedResourceInDrill: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				DrillRbacOnMonitoringResources: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				DrillMonitoringErrors: []*armresiliencemanagement.ErrorDetails{
	// 					{
	// 						Code: to.Ptr("14123903"),
	// 						Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
	// 					},
	// 				},
	// 				DrillMonitoringResources: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				MonitoringRbacOnDrillResources: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnDrillMonitoringResources: []*string{
	// 					to.Ptr("lyffvljvuhwvxcuzyzlyo"),
	// 				},
	// 				RbacNeededForDrillOnDrillResources: []*string{
	// 					to.Ptr("sajsgcweakvzfunxfzzxe"),
	// 				},
	// 				MissingRequiredResourceProviders: []*string{
	// 					to.Ptr("Microsoft.Chaos"),
	// 					to.Ptr("Microsoft.Automation"),
	// 				},
	// 				DrillRbacOnChaosResource: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnChaosResource: []*string{
	// 					to.Ptr("zabszxqjflfjgifyrtttvdpipw"),
	// 				},
	// 				ChaosResource: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				ChaosResourceUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				RbacOnTargetResources: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				ChaosResourceCreationFailureReasons: []*string{
	// 					to.Ptr("cjqkzeqcktfqcpmdwoloqb"),
	// 				},
	// 			},
	// 			SystemMetadata: &armresiliencemanagement.SystemMetadata{
	// 				InitialConfig: to.Ptr(armresiliencemanagement.InitialConfigPending),
	// 				ResourceTypeCategories: []*armresiliencemanagement.ResourceTypeCategories{
	// 					to.Ptr(armresiliencemanagement.ResourceTypeCategoriesAzureSiteRecoveryVMsPresent),
	// 				},
	// 			},
	// 			DrillType: to.Ptr(armresiliencemanagement.DrillType("DrillProperties")),
	// 			LastRunProperties: &armresiliencemanagement.LastRunProperties{
	// 				LastRunState: to.Ptr(armresiliencemanagement.JobStatusNotStarted),
	// 				LastRunAttestation: to.Ptr(armresiliencemanagement.DrillAttestationAttestedSuccess),
	// 				LastRunTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-05T05:36:37.151Z"); return t}()),
	// 				LastRunDuration: to.Ptr("PT6M"),
	// 			},
	// 			ExecutionReadinessState: to.Ptr(armresiliencemanagement.ExecutionReadinessStateReady),
	// 			ManagedOnBehalfOfConfiguration: &armresiliencemanagement.ManagedOnBehalfOfConfiguration{
	// 				MoboBrokerResources: []*armresiliencemanagement.MoboBrokerResource{
	// 					{
	// 						ID: to.Ptr("lvukttgzvssiupnypauorkyzvzf"),
	// 					},
	// 				},
	// 			},
	// 			RecoveryPlanProperties: &armresiliencemanagement.RecoveryPlanPropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				RecoveryPlanID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/recoveryPlans/rePlan1"),
	// 				RecoveryPlanResourceExcludedCount: to.Ptr[int32](29),
	// 			},
	// 			MonitoringProperties: &armresiliencemanagement.MonitoringPropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				LogAnalyticsWorkspaceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/microsoft.operationalinsights/workspaces/default-law-cid"),
	// 				RawMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRuleHealthName"),
	// 				ServiceGroupMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRawRuleHealthName"),
	// 				DataCollectionEndpointID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionEndpoints/DrillDataCollectionEndpoint"),
	// 			},
	// 			DrillAssetProperties: &armresiliencemanagement.AssetPropertiesOfDrill{
	// 				Subscription: to.Ptr("4e88bed3-114f-443d-9975-28f64122ec5e"),
	// 				Region: to.Ptr("eastus"),
	// 				ResourceGroup: to.Ptr("customDrillResourceGroup"),
	// 			},
	// 			ChaosResourceProperties: &armresiliencemanagement.ChaosResourcePropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				ChaosResourceIdentityForFaults: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				ChaosResourceID: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourceGroups/resourceGroup1/providers/Microsoft.Chaos/workspaces/asdas"),
	// 				FaultDurationInMin: to.Ptr[int32](0),
	// 			},
	// 			ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
	// 			ServiceGroupID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName"),
	// 			LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:45:16.573Z"); return t}()),
	// 			LastResyncReadinessCheckTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:29:02.037Z"); return t}()),
	// 		},
	// 		Identity: &armresiliencemanagement.ManagedServiceIdentity{
	// 			Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armresiliencemanagement.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("b958c8d6-705d-4581-8cee-5120b43b0b16"),
	// 			TenantID: to.Ptr("0ddf1a8d-cd80-412e-b414-cdc9de46c7bf"),
	// 		},
	// 		ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1"),
	// 		Name: to.Ptr("drill1"),
	// 		Type: to.Ptr("Microsoft.AzureResilienceManagement/drills"),
	// 		SystemData: &armresiliencemanagement.SystemData{
	// 			CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
	// 			CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("lndhhaimomorael"),
	// 			LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-04-01-preview/Drills_Delete_MaximumSet_Gen.json
func ExampleDrillsClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginDelete(ctx, "sampleServiceGroupName", "drill1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
}

// Generated from example definition: 2026-04-01-preview/Drills_End_MaximumSet_Gen.json
func ExampleDrillsClient_BeginEnd() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginEnd(ctx, "sampleServiceGroupName", "qmn", "drill1", armresiliencemanagement.DrillEndRequest{
		Attestation:      to.Ptr(armresiliencemanagement.DrillAttestationAttestedSuccess),
		AttestationNotes: to.Ptr("ycnqvrgduotohgycsapckhixwqwgp"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientEndResponse{
	// }
}

// Generated from example definition: 2026-04-01-preview/Drills_Get_MaximumSet_Gen.json
func ExampleDrillsClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDrillsClient().Get(ctx, "sampleServiceGroupName", "drill1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientGetResponse{
	// 	Drill: armresiliencemanagement.Drill{
	// 		Properties: &armresiliencemanagement.DrillProperties{
	// 			ExecutionState: to.Ptr(armresiliencemanagement.ExecutionStateNotRunning),
	// 			RbacSetupMode: to.Ptr(armresiliencemanagement.RBACSetupModeAutomatedCustomRole),
	// 			AttentionReason: &armresiliencemanagement.AttentionReason{
	// 				RoReadiness: to.Ptr(armresiliencemanagement.RecoveryPlanStateUnderEdit),
	// 				DrillUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				DrillRbacOnRecoveryPlan: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnRecoveryPlan: []*string{
	// 					to.Ptr("ayfyepziwdyxuwuexlamaadey"),
	// 				},
	// 				RecoveryPlanAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
	// 				ServiceGroupAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
	// 				RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				IncludedResourceInDrill: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				DrillRbacOnMonitoringResources: to.Ptr(armresiliencemanagement.RBACStateNotSet),
	// 				DrillMonitoringErrors: []*armresiliencemanagement.ErrorDetails{
	// 					{
	// 						Code: to.Ptr("14123903"),
	// 						Message: to.Ptr("Unable to assign Monitoring RBAC on target resource."),
	// 					},
	// 				},
	// 				DrillMonitoringResources: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				MonitoringRbacOnDrillResources: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnDrillMonitoringResources: []*string{
	// 					to.Ptr("lyffvljvuhwvxcuzyzlyo"),
	// 				},
	// 				RbacNeededForDrillOnDrillResources: []*string{
	// 					to.Ptr("sajsgcweakvzfunxfzzxe"),
	// 				},
	// 				MissingRequiredResourceProviders: []*string{
	// 					to.Ptr("Microsoft.Chaos"),
	// 					to.Ptr("Microsoft.Automation"),
	// 				},
	// 				DrillRbacOnChaosResource: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				RbacNeededForDrillOnChaosResource: []*string{
	// 					to.Ptr("zabszxqjflfjgifyrtttvdpipw"),
	// 				},
	// 				ChaosResource: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				ChaosResourceUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
	// 				RbacOnTargetResources: to.Ptr(armresiliencemanagement.RBACStateSet),
	// 				ChaosResourceCreationFailureReasons: []*string{
	// 					to.Ptr("cjqkzeqcktfqcpmdwoloqb"),
	// 				},
	// 			},
	// 			SystemMetadata: &armresiliencemanagement.SystemMetadata{
	// 				InitialConfig: to.Ptr(armresiliencemanagement.InitialConfigPending),
	// 				ResourceTypeCategories: []*armresiliencemanagement.ResourceTypeCategories{
	// 					to.Ptr(armresiliencemanagement.ResourceTypeCategoriesAzureSiteRecoveryVMsPresent),
	// 				},
	// 			},
	// 			DrillType: to.Ptr(armresiliencemanagement.DrillType("DrillProperties")),
	// 			LastRunProperties: &armresiliencemanagement.LastRunProperties{
	// 				LastRunState: to.Ptr(armresiliencemanagement.JobStatusNotStarted),
	// 				LastRunAttestation: to.Ptr(armresiliencemanagement.DrillAttestationAttestedSuccess),
	// 				LastRunTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-05T05:36:37.151Z"); return t}()),
	// 				LastRunDuration: to.Ptr("PT6M"),
	// 			},
	// 			ExecutionReadinessState: to.Ptr(armresiliencemanagement.ExecutionReadinessStateReady),
	// 			ManagedOnBehalfOfConfiguration: &armresiliencemanagement.ManagedOnBehalfOfConfiguration{
	// 				MoboBrokerResources: []*armresiliencemanagement.MoboBrokerResource{
	// 					{
	// 						ID: to.Ptr("lvukttgzvssiupnypauorkyzvzf"),
	// 					},
	// 				},
	// 			},
	// 			RecoveryPlanProperties: &armresiliencemanagement.RecoveryPlanPropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				RecoveryPlanID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/recoveryPlans/rePlan1"),
	// 				RecoveryPlanResourceExcludedCount: to.Ptr[int32](29),
	// 			},
	// 			MonitoringProperties: &armresiliencemanagement.MonitoringPropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				LogAnalyticsWorkspaceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/microsoft.operationalinsights/workspaces/default-law-cid"),
	// 				RawMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRuleHealthName"),
	// 				ServiceGroupMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRawRuleHealthName"),
	// 				DataCollectionEndpointID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionEndpoints/DrillDataCollectionEndpoint"),
	// 			},
	// 			DrillAssetProperties: &armresiliencemanagement.AssetPropertiesOfDrill{
	// 				Subscription: to.Ptr("4e88bed3-114f-443d-9975-28f64122ec5e"),
	// 				Region: to.Ptr("eastus"),
	// 				ResourceGroup: to.Ptr("customDrillResourceGroup"),
	// 			},
	// 			ChaosResourceProperties: &armresiliencemanagement.ChaosResourcePropertiesOfDrill{
	// 				Identity: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				ChaosResourceIdentityForFaults: &armresiliencemanagement.AssociatedIdentity{
	// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
	// 					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
	// 				},
	// 				ChaosResourceID: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourceGroups/resourceGroup1/providers/Microsoft.Chaos/workspaces/asdas"),
	// 				FaultDurationInMin: to.Ptr[int32](0),
	// 			},
	// 			ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
	// 			ServiceGroupID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName"),
	// 			LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:45:16.573Z"); return t}()),
	// 			LastResyncReadinessCheckTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:29:02.037Z"); return t}()),
	// 		},
	// 		Identity: &armresiliencemanagement.ManagedServiceIdentity{
	// 			Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armresiliencemanagement.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("b958c8d6-705d-4581-8cee-5120b43b0b16"),
	// 			TenantID: to.Ptr("0ddf1a8d-cd80-412e-b414-cdc9de46c7bf"),
	// 		},
	// 		ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1"),
	// 		Name: to.Ptr("drill1"),
	// 		Type: to.Ptr("Microsoft.AzureResilienceManagement/drills"),
	// 		SystemData: &armresiliencemanagement.SystemData{
	// 			CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
	// 			CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("lndhhaimomorael"),
	// 			LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-04-01-preview/Drills_List_MaximumSet_Gen.json
func ExampleDrillsClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDrillsClient().NewListPager("sampleServiceGroupName", &armresiliencemanagement.DrillsClientListOptions{
		SkipToken: to.Ptr("xntbyoswztnmvitj"),
		Top:       to.Ptr[int32](69)})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armresiliencemanagement.DrillsClientListResponse{
		// 	DrillListResult: armresiliencemanagement.DrillListResult{
		// 		Value: []*armresiliencemanagement.Drill{
		// 			{
		// 				Properties: &armresiliencemanagement.DrillProperties{
		// 					ProvisioningState: to.Ptr(armresiliencemanagement.ProvisioningStateSucceeded),
		// 					ExecutionState: to.Ptr(armresiliencemanagement.ExecutionStateNotRunning),
		// 					RbacSetupMode: to.Ptr(armresiliencemanagement.RBACSetupModeAutomatedCustomRole),
		// 					AttentionReason: &armresiliencemanagement.AttentionReason{
		// 						RoReadiness: to.Ptr(armresiliencemanagement.RecoveryPlanStateUnderEdit),
		// 						DrillUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
		// 						DrillRbacOnRecoveryPlan: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						RbacNeededForDrillOnRecoveryPlan: []*string{
		// 							to.Ptr("giyenueocputjwie"),
		// 						},
		// 						RecoveryPlanAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
		// 						ServiceGroupAndDrillResourcesState: to.Ptr(armresiliencemanagement.RelativeResourceCompositionStateInSync),
		// 						RunbookFaultRbacOnTargets: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						IncludedResourceInDrill: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
		// 						DrillRbacOnMonitoringResources: to.Ptr(armresiliencemanagement.RBACStateNotSet),
		// 						DrillMonitoringErrors: []*armresiliencemanagement.ErrorDetails{
		// 							{
		// 								Code: to.Ptr("f"),
		// 								Message: to.Ptr("dztysoxb"),
		// 							},
		// 						},
		// 						DrillMonitoringResources: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
		// 						MonitoringRbacOnDrillResources: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						RbacNeededForDrillOnDrillMonitoringResources: []*string{
		// 							to.Ptr("qhcrchgrnxa"),
		// 						},
		// 						RbacNeededForDrillOnDrillResources: []*string{
		// 							to.Ptr("bkfdwlhqpitbjwruvheowtgyqjusa"),
		// 						},
		// 						MissingRequiredResourceProviders: []*string{
		// 							to.Ptr("Microsoft.Chaos"),
		// 							to.Ptr("Microsoft.Automation"),
		// 						},
		// 						DrillRbacOnChaosResource: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						RbacNeededForDrillOnChaosResource: []*string{
		// 							to.Ptr("dhzmbwgftsa"),
		// 						},
		// 						ChaosResource: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
		// 						ChaosResourceUserMsi: to.Ptr(armresiliencemanagement.ExtensionObjectStateExists),
		// 						RbacOnTargetResources: to.Ptr(armresiliencemanagement.RBACStateSet),
		// 						ChaosResourceCreationFailureReasons: []*string{
		// 							to.Ptr("tpngufudxyoim"),
		// 						},
		// 					},
		// 					SystemMetadata: &armresiliencemanagement.SystemMetadata{
		// 						InitialConfig: to.Ptr(armresiliencemanagement.InitialConfigPending),
		// 						ResourceTypeCategories: []*armresiliencemanagement.ResourceTypeCategories{
		// 							to.Ptr(armresiliencemanagement.ResourceTypeCategoriesAzureSiteRecoveryVMsPresent),
		// 						},
		// 					},
		// 					DrillType: to.Ptr(armresiliencemanagement.DrillType("DrillProperties")),
		// 					LastRunProperties: &armresiliencemanagement.LastRunProperties{
		// 						LastRunTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-05-05T05:36:37.151Z"); return t}()),
		// 						LastRunState: to.Ptr(armresiliencemanagement.JobStatusNotStarted),
		// 						LastRunDuration: to.Ptr("PT6M"),
		// 						LastRunAttestation: to.Ptr(armresiliencemanagement.DrillAttestationAttestedSuccess),
		// 					},
		// 					ManagedOnBehalfOfConfiguration: &armresiliencemanagement.ManagedOnBehalfOfConfiguration{
		// 						MoboBrokerResources: []*armresiliencemanagement.MoboBrokerResource{
		// 							{
		// 								ID: to.Ptr("lvukttgzvssiupnypauorkyzvzf"),
		// 							},
		// 						},
		// 					},
		// 					ExecutionReadinessState: to.Ptr(armresiliencemanagement.ExecutionReadinessStateReady),
		// 					ServiceGroupID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName"),
		// 					RecoveryPlanProperties: &armresiliencemanagement.RecoveryPlanPropertiesOfDrill{
		// 						Identity: &armresiliencemanagement.AssociatedIdentity{
		// 							Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
		// 							UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
		// 						},
		// 						RecoveryPlanID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/recoveryPlans/rePlan1"),
		// 						RecoveryPlanResourceExcludedCount: to.Ptr[int32](29),
		// 					},
		// 					MonitoringProperties: &armresiliencemanagement.MonitoringPropertiesOfDrill{
		// 						Identity: &armresiliencemanagement.AssociatedIdentity{
		// 							Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
		// 							UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
		// 						},
		// 						LogAnalyticsWorkspaceID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/microsoft.operationalinsights/workspaces/default-law-cid"),
		// 						RawMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRuleHealthName"),
		// 						ServiceGroupMetricsDataCollectionRuleID: to.Ptr("/subscriptions/2427679b-6638-48e5-8774-6096cd849451/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionRules/DataCollectionRawRuleHealthName"),
		// 						DataCollectionEndpointID: to.Ptr("/subscriptions/191973cd-9c54-41e0-ac19-25dd9a92d5a8/resourceGroups/AzureResilienceManagementDrills/providers/Microsoft.Insights/dataCollectionEndpoints/DrillDataCollectionEndpoint"),
		// 					},
		// 					DrillAssetProperties: &armresiliencemanagement.AssetPropertiesOfDrill{
		// 						Subscription: to.Ptr("4e88bed3-114f-443d-9975-28f64122ec5e"),
		// 						Region: to.Ptr("eastus"),
		// 						ResourceGroup: to.Ptr("customDrillResourceGroup"),
		// 					},
		// 					ChaosResourceProperties: &armresiliencemanagement.ChaosResourcePropertiesOfDrill{
		// 						Identity: &armresiliencemanagement.AssociatedIdentity{
		// 							Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
		// 							UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
		// 						},
		// 						ChaosResourceIdentityForFaults: &armresiliencemanagement.AssociatedIdentity{
		// 							Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
		// 							UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
		// 						},
		// 						ChaosResourceID: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourceGroups/resourceGroup1/providers/Microsoft.Chaos/workspaces/asdas"),
		// 						FaultDurationInMin: to.Ptr[int32](0),
		// 					},
		// 					LastResyncReadinessCheckTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:29:02.037Z"); return t}()),
		// 					LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-02-02T10:45:16.573Z"); return t}()),
		// 				},
		// 				Identity: &armresiliencemanagement.ManagedServiceIdentity{
		// 					Type: to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armresiliencemanagement.UserAssignedIdentity{
		// 					},
		// 					PrincipalID: to.Ptr("b958c8d6-705d-4581-8cee-5120b43b0b16"),
		// 					TenantID: to.Ptr("0ddf1a8d-cd80-412e-b414-cdc9de46c7bf"),
		// 				},
		// 				ID: to.Ptr("/providers/Microsoft.Management/serviceGroups/sampleServiceGroupName/providers/Microsoft.AzureResilienceManagement/drills/drill1"),
		// 				Name: to.Ptr("drill1"),
		// 				Type: to.Ptr("Microsoft.AzureResilienceManagement/drills"),
		// 				SystemData: &armresiliencemanagement.SystemData{
		// 					CreatedBy: to.Ptr("dvnfxbuyqhvivfjddjccdtlwajfht"),
		// 					CreatedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.796Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("lndhhaimomorael"),
		// 					LastModifiedByType: to.Ptr(armresiliencemanagement.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-06T15:03:42.797Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2026-04-01-preview/Drills_ResyncReadinessCheck_MaximumSet_Gen.json
func ExampleDrillsClient_BeginResyncReadinessCheck() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginResyncReadinessCheck(ctx, "sampleServiceGroupName", "qmn", "drill1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
}

// Generated from example definition: 2026-04-01-preview/Drills_Start_MaximumSet_Gen.json
func ExampleDrillsClient_BeginStart() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginStart(ctx, "sampleServiceGroupName", "qmn", "drill1", armresiliencemanagement.DrillStartRequest{
		Mode: to.Ptr(armresiliencemanagement.DrillModeFailover),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientStartResponse{
	// }
}

// Generated from example definition: 2026-04-01-preview/Drills_Update_MaximumSet_Gen.json
func ExampleDrillsClient_BeginUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginUpdate(ctx, "sampleServiceGroupName", "drill1", armresiliencemanagement.DrillUpdate{
		Properties: &armresiliencemanagement.DrillUpdateProperties{
			RbacSetupMode: to.Ptr(armresiliencemanagement.RBACSetupModeAutomatedCustomRole),
			RecoveryPlanProperties: &armresiliencemanagement.RecoveryPlanPropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
			MonitoringProperties: &armresiliencemanagement.MonitoringPropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
			ChaosResourceProperties: &armresiliencemanagement.ChaosResourcePropertiesOfDrill{
				Identity: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
				ChaosResourceIdentityForFaults: &armresiliencemanagement.AssociatedIdentity{
					Type:                 to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeUserAssigned),
					UserAssignedIdentity: to.Ptr("/subscriptions/4e88bed3-114f-443d-9975-28f64122ec5e/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1"),
				},
			},
			DrillAssetProperties: &armresiliencemanagement.AssetPropertiesOfDrill{
				Subscription: to.Ptr("pxlmwjuhcif"),
				Region:       to.Ptr("zuvwzxnbqyzdkthrewruw"),
			},
		},
		Identity: &armresiliencemanagement.ManagedServiceIdentity{
			Type:                   to.Ptr(armresiliencemanagement.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armresiliencemanagement.UserAssignedIdentity{},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientUpdateResponse{
	// }
}

// Generated from example definition: 2026-04-01-preview/Drills_ValidateForExecution_MaximumSet_Gen.json
func ExampleDrillsClient_BeginValidateForExecution() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armresiliencemanagement.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDrillsClient().BeginValidateForExecution(ctx, "sampleServiceGroupName", "qmn", "drill1", armresiliencemanagement.ValidateForExecutionRequest{
		ValidateForExecutionProperties: &armresiliencemanagement.ValidateForExecutionProperties{
			SourceLocations: []*string{
				to.Ptr("eastus2-az1"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armresiliencemanagement.DrillsClientValidateForExecutionResponse{
	// }
}
