From 903b14a82e866b563b5c15da19604c4f9a715b65 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 27 Oct 2023 09:53:57 +0000 Subject: [PATCH] CodeGen from PR 23988 in Azure/azure-rest-api-specs Merge c601b0dadea35f3195c28f546a74d5fa71cb072f into 5ae522bc106bf8609c6cb379e584aa3e0e2639f3 --- .../Sample_AutomationAccountCollection.cs | 10 +- ...ample_AutomationAccountModuleCollection.cs | 10 +- .../Sample_AutomationAccountModuleResource.cs | 14 +- ...tomationAccountPython2PackageCollection.cs | 14 +- ...AutomationAccountPython2PackageResource.cs | 10 +- ...tomationAccountPython3PackageCollection.cs | 214 +++ ...AutomationAccountPython3PackageResource.cs | 119 ++ .../Sample_AutomationAccountResource.cs | 330 ++-- .../Sample_AutomationCertificateCollection.cs | 10 +- .../Sample_AutomationCertificateResource.cs | 6 +- .../Sample_AutomationConnectionCollection.cs | 12 +- .../Sample_AutomationConnectionResource.cs | 6 +- ...mple_AutomationConnectionTypeCollection.cs | 12 +- ...Sample_AutomationConnectionTypeResource.cs | 6 +- .../Sample_AutomationCredentialCollection.cs | 12 +- .../Sample_AutomationCredentialResource.cs | 6 +- .../Samples/Sample_AutomationJobCollection.cs | 12 +- .../Samples/Sample_AutomationJobResource.cs | 18 +- .../Sample_AutomationJobScheduleCollection.cs | 10 +- .../Sample_AutomationJobScheduleResource.cs | 6 +- ...tionPrivateEndpointConnectionCollection.cs | 20 +- ...mationPrivateEndpointConnectionResource.cs | 12 +- .../Sample_AutomationRunbookCollection.cs | 18 +- .../Sample_AutomationRunbookResource.cs | 31 +- .../Sample_AutomationScheduleCollection.cs | 12 +- .../Sample_AutomationScheduleResource.cs | 6 +- ...ample_AutomationSourceControlCollection.cs | 12 +- .../Sample_AutomationSourceControlResource.cs | 18 +- .../Sample_AutomationVariableCollection.cs | 12 +- .../Sample_AutomationVariableResource.cs | 6 +- .../Sample_AutomationWatcherCollection.cs | 10 +- .../Sample_AutomationWatcherResource.cs | 10 +- .../Sample_AutomationWebhookCollection.cs | 10 +- .../Sample_AutomationWebhookResource.cs | 6 +- .../Sample_DscCompilationJobCollection.cs | 10 +- .../Sample_DscCompilationJobResource.cs | 4 +- .../Sample_DscConfigurationCollection.cs | 14 +- .../Sample_DscConfigurationResource.cs | 8 +- .../Samples/Sample_DscNodeCollection.cs | 22 +- .../Sample_DscNodeConfigurationCollection.cs | 14 +- .../Sample_DscNodeConfigurationResource.cs | 6 +- .../Samples/Sample_DscNodeResource.cs | 14 +- .../Sample_HybridRunbookWorkerCollection.cs | 14 +- ...mple_HybridRunbookWorkerGroupCollection.cs | 10 +- ...Sample_HybridRunbookWorkerGroupResource.cs | 6 +- .../Sample_HybridRunbookWorkerResource.cs | 15 +- .../Samples/Sample_PackageCollection.cs | 214 +++ .../Samples/Sample_PackageResource.cs | 125 ++ .../Sample_RuntimeEnvironmentCollection.cs | 211 +++ .../Sample_RuntimeEnvironmentResource.cs | 120 ++ ...e_SoftwareUpdateConfigurationCollection.cs | 12 +- ...ple_SoftwareUpdateConfigurationResource.cs | 6 +- .../Sample_SubscriptionResourceExtensions.cs | 2 +- .../Generated/ArmAutomationModelFactory.cs | 977 ++++++------ ...tomationAccountPython2PackageCollection.cs | 20 +- ...AutomationAccountPython2PackageResource.cs | 32 +- ...tomationAccountPython3PackageCollection.cs | 416 +++++ ...AutomationAccountPython3PackageResource.cs | 601 +++++++ .../Generated/AutomationAccountResource.cs | 1410 +++++++++-------- .../src/Generated/AutomationJobData.cs | 18 +- .../src/Generated/AutomationRunbookData.cs | 6 +- .../Extensions/AutomationExtensions.cs | 413 ++--- .../SubscriptionResourceExtensionClient.cs | 68 +- .../HybridRunbookWorkerCollection.cs | 20 +- .../src/Generated/HybridRunbookWorkerData.cs | 10 +- .../Generated/HybridRunbookWorkerGroupData.cs | 10 +- .../Generated/HybridRunbookWorkerResource.cs | 40 +- .../Generated/Models/AutomationContentLink.cs | 4 +- ...tionJobCollectionItemData.Serialization.cs | 28 +- .../Models/AutomationJobCollectionItemData.cs | 22 +- .../Models/AutomationJobData.Serialization.cs | 17 +- .../AutomationJobStream.Serialization.cs | 5 + .../AutomationModuleData.Serialization.cs | 4 +- ...bookCreateOrUpdateContent.Serialization.cs | 5 + .../AutomationRunbookCreateOrUpdateContent.cs | 2 + .../AutomationRunbookData.Serialization.cs | 13 +- .../Generated/Models/AutomationRunbookType.cs | 3 + .../Models/DeletedRunbook.Serialization.cs | 111 ++ .../src/Generated/Models/DeletedRunbook.cs | 63 + .../DeletedRunbookListResult.Serialization.cs | 49 + .../Models/DeletedRunbookListResult.cs | 36 + ...okWorkerCreateParameters.Serialization.cs} | 7 +- ...=> HybridRunbookWorkerCreateParameters.cs} | 8 +- .../HybridRunbookWorkerData.Serialization.cs | 37 +- ...ridRunbookWorkerGroupData.Serialization.cs | 37 +- .../JobRuntimeEnvironment.Serialization.cs | 44 + .../Generated/Models/JobRuntimeEnvironment.cs | 28 + .../ModuleProvisioningState.Serialization.cs | 56 - .../Models/ModuleProvisioningState.cs | 81 +- ...kageCreateOrUpdateContent.Serialization.cs | 31 + .../Models/PackageCreateOrUpdateContent.cs | 31 + .../Models/PackageData.Serialization.cs | 204 +++ .../Models/PackageErrorInfo.Serialization.cs | 55 + .../src/Generated/Models/PackageErrorInfo.cs | 32 + .../Models/PackageListResult.Serialization.cs | 50 + .../src/Generated/Models/PackageListResult.cs | 37 + .../Models/PackagePatch.Serialization.cs | 34 + .../src/Generated/Models/PackagePatch.cs | 23 + .../Models/PackageProvisioningState.cs | 93 ++ ...nPackageCreateParameters.Serialization.cs} | 2 +- ...nt.cs => PythonPackageCreateParameters.cs} | 6 +- ...nPackageUpdateParameters.Serialization.cs} | 2 +- ...ch.cs => PythonPackageUpdateParameters.cs} | 6 +- ...nbookTestJobCreateContent.Serialization.cs | 5 + .../Models/RunbookTestJobCreateContent.cs | 2 + .../RuntimeEnvironmentData.Serialization.cs | 186 +++ ...timeEnvironmentListResult.Serialization.cs | 50 + .../Models/RuntimeEnvironmentListResult.cs | 37 + .../RuntimeEnvironmentPatch.Serialization.cs | 35 + .../Models/RuntimeEnvironmentPatch.cs | 28 + .../Models/TrackedResource.Serialization.cs | 97 ++ .../src/Generated/Models/TrackedResource.cs | 43 + .../src/Generated/PackageCollection.cs | 421 +++++ .../src/Generated/PackageData.cs | 67 + .../src/Generated/PackageResource.cs | 290 ++++ .../RestOperations/ActivityRestOperations.cs | 2 +- ...ntRegistrationInformationRestOperations.cs | 2 +- .../AutomationAccountRestOperations.cs | 157 +- .../AutomationRestOperations.cs | 2 +- .../CertificateRestOperations.cs | 2 +- .../ConnectionRestOperations.cs | 2 +- .../ConnectionTypeRestOperations.cs | 2 +- .../CredentialRestOperations.cs | 2 +- ...DeletedAutomationAccountsRestOperations.cs | 2 +- .../DscCompilationJobRestOperations.cs | 2 +- .../DscCompilationJobStreamRestOperations.cs | 2 +- .../DscConfigurationRestOperations.cs | 2 +- .../DscNodeConfigurationRestOperations.cs | 2 +- .../RestOperations/DscNodeRestOperations.cs | 2 +- .../RestOperations/FieldsRestOperations.cs | 2 +- .../HybridRunbookWorkerGroupRestOperations.cs | 4 +- .../HybridRunbookWorkersRestOperations.cs | 130 +- .../RestOperations/JobRestOperations.cs | 2 +- .../JobScheduleRestOperations.cs | 2 +- .../RestOperations/JobStreamRestOperations.cs | 2 +- .../RestOperations/KeysRestOperations.cs | 2 +- .../LinkedWorkspaceRestOperations.cs | 2 +- .../RestOperations/ModuleRestOperations.cs | 2 +- .../NodeCountInformationRestOperations.cs | 2 +- .../NodeReportsRestOperations.cs | 2 +- .../ObjectDataTypesRestOperations.cs | 2 +- .../RestOperations/PackageRestOperations.cs | 414 +++++ .../RestOperations/PackagesRestOperations.cs | 205 +++ ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../Python2PackageRestOperations.cs | 54 +- .../Python3PackageRestOperations.cs | 545 +++++++ .../RunbookDraftRestOperations.cs | 6 +- .../RestOperations/RunbookRestOperations.cs | 2 +- .../RuntimeEnvironmentsRestOperations.cs | 545 +++++++ .../RestOperations/ScheduleRestOperations.cs | 2 +- ...eConfigurationMachineRunsRestOperations.cs | 2 +- ...reUpdateConfigurationRunsRestOperations.cs | 2 +- ...twareUpdateConfigurationsRestOperations.cs | 2 +- .../SourceControlRestOperations.cs | 2 +- .../SourceControlSyncJobRestOperations.cs | 2 +- ...urceControlSyncJobStreamsRestOperations.cs | 2 +- .../StatisticsRestOperations.cs | 2 +- .../RestOperations/TestJobRestOperations.cs | 2 +- .../TestJobStreamsRestOperations.cs | 2 +- .../RestOperations/UsagesRestOperations.cs | 2 +- .../RestOperations/VariableRestOperations.cs | 2 +- .../RestOperations/WatcherRestOperations.cs | 2 +- .../RestOperations/WebhookRestOperations.cs | 2 +- .../Generated/RuntimeEnvironmentCollection.cs | 415 +++++ .../src/Generated/RuntimeEnvironmentData.cs | 55 + .../Generated/RuntimeEnvironmentResource.cs | 343 ++++ .../src/autorest.md | 2 +- 168 files changed, 9419 insertions(+), 1951 deletions(-) create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.cs rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{HybridRunbookWorkerCreateOrUpdateContent.Serialization.cs => HybridRunbookWorkerCreateParameters.Serialization.cs} (73%) rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{HybridRunbookWorkerCreateOrUpdateContent.cs => HybridRunbookWorkerCreateParameters.cs} (75%) create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.cs delete mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageData.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageProvisioningState.cs rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs => PythonPackageCreateParameters.Serialization.cs} (91%) rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{AutomationAccountPython2PackageCreateOrUpdateContent.cs => PythonPackageCreateParameters.cs} (77%) rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{AutomationAccountPython2PackagePatch.Serialization.cs => PythonPackageUpdateParameters.Serialization.cs} (90%) rename sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/{AutomationAccountPython2PackagePatch.cs => PythonPackageUpdateParameters.cs} (72%) create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentData.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.Serialization.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageData.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageResource.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackageRestOperations.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackagesRestOperations.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RuntimeEnvironmentsRestOperations.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentCollection.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentData.cs create mode 100644 sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentResource.cs diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountCollection.cs index 26099bc2c0b8..39bcb3fe0325 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_AutomationAccountCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/createOrUpdateAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateAutomationAccount.json // this example is just showing the usage of "AutomationAccount_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_GetAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetIfExists_GetAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutomationAccountsByResourceGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountsByResourceGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAutomationAccountsByResourceGroup.json // this example is just showing the usage of "AutomationAccount_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleCollection.cs index d124ea81d9c7..6d2a3868568b 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationAccountModuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getModule.json // this example is just showing the usage of "Module_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getModule.json // this example is just showing the usage of "Module_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getModule.json // this example is just showing the usage of "Module_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateModule.json // this example is just showing the usage of "Module_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListModulesByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listModulesByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listModulesByAutomationAccount.json // this example is just showing the usage of "Module_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleResource.cs index 8acc1c718a4f..fff28f6543e1 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountModuleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationAccountModuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetActivity_GetActivityInAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getActivityInAModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getActivityInAModule.json // this example is just showing the usage of "Activity_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetActivity_GetActivityInAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetActivities_ListActivitiesByAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listActivitiesByModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listActivitiesByModule.json // this example is just showing the usage of "Activity_ListByModule" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task GetActivities_ListActivitiesByAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteModule.json // this example is just showing the usage of "Module_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getModule.json // this example is just showing the usage of "Module_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task Get_GetAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateModule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateModule.json // this example is just showing the usage of "Module_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task Update_UpdateAModule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFieldsByModuleAndType_GetAListOfFieldsOfAGivenType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByModuleAndType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listFieldsByModuleAndType.json // this example is just showing the usage of "ObjectDataTypes_ListFieldsByModuleAndType" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetFieldsByModuleAndType_GetAListOfFieldsOfAGivenType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFieldsByType_GetAListOfFieldsOfAGivenType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByModuleAndType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listFieldsByModuleAndType.json // this example is just showing the usage of "Fields_ListByType" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageCollection.cs index 49260a129df8..4f910b256804 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationAccountPython2PackageCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getPython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython2Package.json // this example is just showing the usage of "Python2Package_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getPython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython2Package.json // this example is just showing the usage of "Python2Package_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getPython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython2Package.json // this example is just showing the usage of "Python2Package_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdatePython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdatePython2Package.json // this example is just showing the usage of "Python2Package_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAPython2Package() // invoke the operation string packageName = "OmsCompositeResources"; - AutomationAccountPython2PackageCreateOrUpdateContent content = new AutomationAccountPython2PackageCreateOrUpdateContent(new AutomationContentLink() + PythonPackageCreateParameters pythonPackageCreateParameters = new PythonPackageCreateParameters(new AutomationContentLink() { Uri = new Uri("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"), ContentHash = new AutomationContentHash("sha265", "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), @@ -164,7 +164,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAPython2Package() { }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packageName, content); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packageName, pythonPackageCreateParameters); AutomationAccountPython2PackageResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -179,7 +179,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPython2PackagesByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPython2PackagesByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPython2PackagesByAutomationAccount.json // this example is just showing the usage of "Python2Package_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageResource.cs index 6cdf5402a5c8..8f1420eebfe2 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython2PackageResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationAccountPython2PackageResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deletePython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deletePython2Package.json // this example is just showing the usage of "Python2Package_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPython2Package() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getPython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython2Package.json // this example is just showing the usage of "Python2Package_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetAPython2Package() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAModule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updatePython2Package.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updatePython2Package.json // this example is just showing the usage of "Python2Package_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,13 +101,13 @@ public async Task Update_UpdateAModule() AutomationAccountPython2PackageResource automationAccountPython2Package = client.GetAutomationAccountPython2PackageResource(automationAccountPython2PackageResourceId); // invoke the operation - AutomationAccountPython2PackagePatch patch = new AutomationAccountPython2PackagePatch() + PythonPackageUpdateParameters pythonPackageUpdateParameters = new PythonPackageUpdateParameters() { Tags = { }, }; - AutomationAccountPython2PackageResource result = await automationAccountPython2Package.UpdateAsync(patch); + AutomationAccountPython2PackageResource result = await automationAccountPython2Package.UpdateAsync(pythonPackageUpdateParameters); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageCollection.cs new file mode 100644 index 000000000000..401b561bf667 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageCollection.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_AutomationAccountPython3PackageCollection + { + // Get a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython3Package.json + // this example is just showing the usage of "Python3Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this AutomationAccountPython3PackageResource + AutomationAccountPython3PackageCollection collection = automationAccount.GetAutomationAccountPython3Packages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + AutomationAccountPython3PackageResource result = await collection.GetAsync(packageName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython3Package.json + // this example is just showing the usage of "Python3Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this AutomationAccountPython3PackageResource + AutomationAccountPython3PackageCollection collection = automationAccount.GetAutomationAccountPython3Packages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + bool result = await collection.ExistsAsync(packageName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython3Package.json + // this example is just showing the usage of "Python3Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this AutomationAccountPython3PackageResource + AutomationAccountPython3PackageCollection collection = automationAccount.GetAutomationAccountPython3Packages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + NullableResponse response = await collection.GetIfExistsAsync(packageName); + AutomationAccountPython3PackageResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdatePython3Package.json + // this example is just showing the usage of "Python3Package_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this AutomationAccountPython3PackageResource + AutomationAccountPython3PackageCollection collection = automationAccount.GetAutomationAccountPython3Packages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + PythonPackageCreateParameters pythonPackageCreateParameters = new PythonPackageCreateParameters(new AutomationContentLink() + { + Uri = new Uri("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"), + ContentHash = new AutomationContentHash("sha265", "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), + Version = "1.0.0.0", + }) + { + Tags = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packageName, pythonPackageCreateParameters); + AutomationAccountPython3PackageResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List python 3 packages by automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListPython3PackagesByAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPython3PackagesByAutomationAccount.json + // this example is just showing the usage of "Python3Package_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this AutomationAccountPython3PackageResource + AutomationAccountPython3PackageCollection collection = automationAccount.GetAutomationAccountPython3Packages(); + + // invoke the operation and iterate over the result + await foreach (AutomationAccountPython3PackageResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageResource.cs new file mode 100644 index 000000000000..d889cd922f69 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountPython3PackageResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_AutomationAccountPython3PackageResource + { + // Delete a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deletePython3Package.json + // this example is just showing the usage of "Python3Package_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountPython3PackageResource created on azure + // for more information of creating AutomationAccountPython3PackageResource, please refer to the document of AutomationAccountPython3PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string packageName = "OmsCompositeResources"; + ResourceIdentifier automationAccountPython3PackageResourceId = AutomationAccountPython3PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, packageName); + AutomationAccountPython3PackageResource automationAccountPython3Package = client.GetAutomationAccountPython3PackageResource(automationAccountPython3PackageResourceId); + + // invoke the operation + await automationAccountPython3Package.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get a python 3 package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPython3Package() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPython3Package.json + // this example is just showing the usage of "Python3Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountPython3PackageResource created on azure + // for more information of creating AutomationAccountPython3PackageResource, please refer to the document of AutomationAccountPython3PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string packageName = "OmsCompositeResources"; + ResourceIdentifier automationAccountPython3PackageResourceId = AutomationAccountPython3PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, packageName); + AutomationAccountPython3PackageResource automationAccountPython3Package = client.GetAutomationAccountPython3PackageResource(automationAccountPython3PackageResourceId); + + // invoke the operation + AutomationAccountPython3PackageResource result = await automationAccountPython3Package.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update a module + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAModule() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updatePython3Package.json + // this example is just showing the usage of "Python3Package_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountPython3PackageResource created on azure + // for more information of creating AutomationAccountPython3PackageResource, please refer to the document of AutomationAccountPython3PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "MyAutomationAccount"; + string packageName = "MyPython3Package"; + ResourceIdentifier automationAccountPython3PackageResourceId = AutomationAccountPython3PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, packageName); + AutomationAccountPython3PackageResource automationAccountPython3Package = client.GetAutomationAccountPython3PackageResource(automationAccountPython3PackageResourceId); + + // invoke the operation + PythonPackageUpdateParameters pythonPackageUpdateParameters = new PythonPackageUpdateParameters() + { + Tags = +{ +}, + }; + AutomationAccountPython3PackageResource result = await automationAccountPython3Package.UpdateAsync(pythonPackageUpdateParameters); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutomationModuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountResource.cs index 04c6946c6cd9..9b3d5147f8b5 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationAccountResource.cs @@ -19,13 +19,13 @@ namespace Azure.ResourceManager.Automation.Samples { public partial class Sample_AutomationAccountResource { - // Gets private endpoint connection. + // Get node's node configuration counts [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task AutomationPrivateLinkResources_GetsPrivateEndpointConnection() + public async Task GetAllNodeCountInformation_GetNodeSNodeConfigurationCounts() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateLinkResourceListGet.json - // this example is just showing the usage of "PrivateLinkResources_Automation" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodeConfigurationCounts.json + // this example is just showing the usage of "NodeCountInformation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -34,14 +34,15 @@ public async Task AutomationPrivateLinkResources_GetsPrivateEndpointConnection() // this example assumes you already have this AutomationAccountResource created on azure // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - await foreach (AutomationPrivateLinkResource item in automationAccount.AutomationPrivateLinkResourcesAsync()) + AutomationCountType countType = AutomationCountType.NodeConfiguration; + await foreach (DscNodeCount item in automationAccount.GetAllNodeCountInformationAsync(countType)) { Console.WriteLine($"Succeeded: {item}"); } @@ -49,68 +50,13 @@ public async Task AutomationPrivateLinkResources_GetsPrivateEndpointConnection() Console.WriteLine($"Succeeded"); } - // Get the agent registration information - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAgentRegistrationInformation_GetTheAgentRegistrationInformation() - { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAgentRegistration.json - // this example is just showing the usage of "AgentRegistrationInformation_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AutomationAccountResource created on azure - // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource - string subscriptionId = "subid"; - string resourceGroupName = "rg"; - string automationAccountName = "myAutomationAccount18"; - ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); - AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); - - // invoke the operation - AgentRegistration result = await automationAccount.GetAgentRegistrationInformationAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Regenerate registration key - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task RegenerateKeyAgentRegistrationInformation_RegenerateRegistrationKey() - { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/regenerateAgentRegistrationKey.json - // this example is just showing the usage of "AgentRegistrationInformation_RegenerateKey" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this AutomationAccountResource created on azure - // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource - string subscriptionId = "subid"; - string resourceGroupName = "rg"; - string automationAccountName = "myAutomationAccount18"; - ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); - AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); - - // invoke the operation - AgentRegistrationRegenerateKeyContent content = new AgentRegistrationRegenerateKeyContent(AgentRegistrationKeyName.Primary); - AgentRegistration result = await automationAccount.RegenerateKeyAgentRegistrationInformationAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get a DSC Compilation job stream by job stream id + // Get node's status counts [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetStreamDscCompilationJob_GetADSCCompilationJobStreamByJobStreamId() + public async Task GetAllNodeCountInformation_GetNodeSStatusCounts() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamByJobStreamId.json - // this example is just showing the usage of "DscCompilationJob_GetStream" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodeStatusCounts.json + // this example is just showing the usage of "NodeCountInformation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -125,21 +71,23 @@ public async Task GetStreamDscCompilationJob_GetADSCCompilationJobStreamByJobStr ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); - // invoke the operation - Guid jobId = Guid.Parse("836d4e06-2d88-46b4-8500-7febd4906838"); - string jobStreamId = "836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"; - AutomationJobStream result = await automationAccount.GetStreamDscCompilationJobAsync(jobId, jobStreamId); + // invoke the operation and iterate over the result + AutomationCountType countType = AutomationCountType.Status; + await foreach (DscNodeCount item in automationAccount.GetAllNodeCountInformationAsync(countType)) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine($"Succeeded"); } - // List DSC Compilation job streams + // Gets private endpoint connection. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetDscCompilationJobStreams_ListDSCCompilationJobStreams() + public async Task AutomationPrivateLinkResources_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamList.json - // this example is just showing the usage of "DscCompilationJobStream_ListByJob" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/PrivateLinkResourceListGet.json + // this example is just showing the usage of "PrivateLinkResources_Automation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -149,14 +97,13 @@ public async Task GetDscCompilationJobStreams_ListDSCCompilationJobStreams() // this example assumes you already have this AutomationAccountResource created on azure // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "subid"; - string resourceGroupName = "rg"; - string automationAccountName = "myAutomationAccount33"; + string resourceGroupName = "rg1"; + string automationAccountName = "testaccount"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - Guid jobId = Guid.Parse("836d4e06-2d88-46b4-8500-7febd4906838"); - await foreach (AutomationJobStream item in automationAccount.GetDscCompilationJobStreamsAsync(jobId)) + await foreach (AutomationPrivateLinkResource item in automationAccount.AutomationPrivateLinkResourcesAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -164,13 +111,13 @@ public async Task GetDscCompilationJobStreams_ListDSCCompilationJobStreams() Console.WriteLine($"Succeeded"); } - // Get node's node configuration counts + // Get the agent registration information [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAllNodeCountInformation_GetNodeSNodeConfigurationCounts() + public async Task GetAgentRegistrationInformation_GetTheAgentRegistrationInformation() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationCounts.json - // this example is just showing the usage of "NodeCountInformation_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAgentRegistration.json + // this example is just showing the usage of "AgentRegistrationInformation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -181,27 +128,23 @@ public async Task GetAllNodeCountInformation_GetNodeSNodeConfigurationCounts() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "subid"; string resourceGroupName = "rg"; - string automationAccountName = "myAutomationAccount33"; + string automationAccountName = "myAutomationAccount18"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); - // invoke the operation and iterate over the result - AutomationCountType countType = AutomationCountType.NodeConfiguration; - await foreach (DscNodeCount item in automationAccount.GetAllNodeCountInformationAsync(countType)) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + AgentRegistration result = await automationAccount.GetAgentRegistrationInformationAsync(); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } - // Get node's status counts + // Regenerate registration key [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAllNodeCountInformation_GetNodeSStatusCounts() + public async Task RegenerateKeyAgentRegistrationInformation_RegenerateRegistrationKey() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeStatusCounts.json - // this example is just showing the usage of "NodeCountInformation_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/regenerateAgentRegistrationKey.json + // this example is just showing the usage of "AgentRegistrationInformation_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -212,18 +155,15 @@ public async Task GetAllNodeCountInformation_GetNodeSStatusCounts() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "subid"; string resourceGroupName = "rg"; - string automationAccountName = "myAutomationAccount33"; + string automationAccountName = "myAutomationAccount18"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); - // invoke the operation and iterate over the result - AutomationCountType countType = AutomationCountType.Status; - await foreach (DscNodeCount item in automationAccount.GetAllNodeCountInformationAsync(countType)) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + AgentRegistrationRegenerateKeyContent content = new AgentRegistrationRegenerateKeyContent(AgentRegistrationKeyName.Primary); + AgentRegistration result = await automationAccount.RegenerateKeyAgentRegistrationInformationAsync(content); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Update an automation account @@ -231,7 +171,7 @@ public async Task GetAllNodeCountInformation_GetNodeSStatusCounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/updateAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +208,7 @@ public async Task Update_UpdateAnAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deleteAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -295,7 +235,7 @@ public async Task Delete_DeleteAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAutomationAccount.json // this example is just showing the usage of "AutomationAccount_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -326,7 +266,7 @@ public async Task Get_GetAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAutomationAccounts_ListAutomationAccountsByResourceGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountsBySubscription.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAutomationAccountsBySubscription.json // this example is just showing the usage of "AutomationAccount_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,12 +293,42 @@ public async Task GetAutomationAccounts_ListAutomationAccountsByResourceGroup() Console.WriteLine($"Succeeded"); } + // Get lists of deleted runbooks in an automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDeletedRunbooks_GetListsOfDeletedRunbooksInAnAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAutomationAccountDeletedRunbooks.json + // this example is just showing the usage of "AutomationAccount_ListDeletedRunbooks" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "MyAutomationAccount"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // invoke the operation and iterate over the result + await foreach (DeletedRunbook item in automationAccount.GetDeletedRunbooksAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // Get statistics of an automation account [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStatistics_GetStatisticsOfAnAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getStatisticsOfAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getStatisticsOfAutomationAccount.json // this example is just showing the usage of "Statistics_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -388,7 +358,7 @@ public async Task GetStatistics_GetStatisticsOfAnAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsages_GetUsagesOfAnAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getUsagesOfAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getUsagesOfAutomationAccount.json // this example is just showing the usage of "Usages_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -418,7 +388,7 @@ public async Task GetUsages_GetUsagesOfAnAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAutomationAccountKeys_GetListsOfAnAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listAutomationAccountKeys.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAutomationAccountKeys.json // this example is just showing the usage of "Keys_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -443,12 +413,72 @@ public async Task GetAutomationAccountKeys_GetListsOfAnAutomationAccount() Console.WriteLine($"Succeeded"); } + // Get a DSC Compilation job stream by job stream id + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetStreamDscCompilationJob_GetADSCCompilationJobStreamByJobStreamId() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/compilationJobStreamByJobStreamId.json + // this example is just showing the usage of "DscCompilationJob_GetStream" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // invoke the operation + Guid jobId = Guid.Parse("836d4e06-2d88-46b4-8500-7febd4906838"); + string jobStreamId = "836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008"; + AutomationJobStream result = await automationAccount.GetStreamDscCompilationJobAsync(jobId, jobStreamId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List DSC Compilation job streams + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDscCompilationJobStreams_ListDSCCompilationJobStreams() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/compilationJobStreamList.json + // this example is just showing the usage of "DscCompilationJobStream_ListByJob" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // invoke the operation and iterate over the result + Guid jobId = Guid.Parse("836d4e06-2d88-46b4-8500-7febd4906838"); + await foreach (AutomationJobStream item in automationAccount.GetDscCompilationJobStreamsAsync(jobId)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // Get the linked workspace of an automation account [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLinkedWorkspace_GetTheLinkedWorkspaceOfAnAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getLinkedWorkspace.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getLinkedWorkspace.json // this example is just showing the usage of "LinkedWorkspace_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -475,7 +505,7 @@ public async Task GetLinkedWorkspace_GetTheLinkedWorkspaceOfAnAutomationAccount( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFieldsByType_GetAListOfFieldsOfAGivenTypeAcrossAllAccessibleModules() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listFieldsByType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listFieldsByType.json // this example is just showing the usage of "ObjectDataTypes_ListFieldsByType" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -506,7 +536,7 @@ public async Task GetFieldsByType_GetAListOfFieldsOfAGivenTypeAcrossAllAccessibl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ConvertGraphRunbookContent_GetGraphicalRawRunbookContentFromGraphicalRunbookJSONObject() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/serializeGraphRunbookContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/serializeGraphRunbookContent.json // this example is just showing the usage of "convertGraphRunbookContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -537,7 +567,7 @@ public async Task ConvertGraphRunbookContent_GetGraphicalRawRunbookContentFromGr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ConvertGraphRunbookContent_GetGraphicalRunbookContentFromRawContent() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deserializeGraphRunbookContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deserializeGraphRunbookContent.json // this example is just showing the usage of "convertGraphRunbookContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -568,13 +598,13 @@ public async Task ConvertGraphRunbookContent_GetGraphicalRunbookContentFromRawCo Console.WriteLine($"Succeeded: {result}"); } - // Get software update configuration runs by Id + // Get software update configuration machine run [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationRun_GetSoftwareUpdateConfigurationRunsById() + public async Task GetSoftwareUpdateConfigurationMachineRun_GetSoftwareUpdateConfigurationMachineRun() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/getSoftwareUpdateConfigurationRunById.json - // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_GetById" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationMachineRun/getSoftwareUpdateConfigurationMachineRunById.json + // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_GetById" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -590,19 +620,19 @@ public async Task GetSoftwareUpdateConfigurationRun_GetSoftwareUpdateConfigurati AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation - Guid softwareUpdateConfigurationRunId = Guid.Parse("2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"); - SoftwareUpdateConfigurationRun result = await automationAccount.GetSoftwareUpdateConfigurationRunAsync(softwareUpdateConfigurationRunId); + Guid softwareUpdateConfigurationMachineRunId = Guid.Parse("ca440719-34a4-4234-a1a9-3f84faf7788f"); + SoftwareUpdateConfigurationMachineRun result = await automationAccount.GetSoftwareUpdateConfigurationMachineRunAsync(softwareUpdateConfigurationMachineRunId); Console.WriteLine($"Succeeded: {result}"); } - // List software update configuration machine run with status equal to 'Failed' + // List software update configuration machine runs [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigurationMachineRunWithStatusEqualToFailed() + public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateConfigurationMachineRuns() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/listFailedSoftwareUpdateConfigurationRuns.json - // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRuns.json + // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -618,8 +648,7 @@ public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigura AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - string filter = "properties/status%20eq%20'Failed'"; - await foreach (SoftwareUpdateConfigurationRun item in automationAccount.GetSoftwareUpdateConfigurationRunsAsync(filter: filter)) + await foreach (SoftwareUpdateConfigurationMachineRun item in automationAccount.GetSoftwareUpdateConfigurationMachineRunsAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -627,13 +656,13 @@ public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigura Console.WriteLine($"Succeeded"); } - // List software update configuration machine runs + // List software update configuration machine runs for a specific software update configuration run [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigurationMachineRuns() + public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateConfigurationMachineRunsForASpecificSoftwareUpdateConfigurationRun() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationRun/listSoftwareUpdateConfigurationRuns.json - // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRunsByRun.json + // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -649,7 +678,8 @@ public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigura AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - await foreach (SoftwareUpdateConfigurationRun item in automationAccount.GetSoftwareUpdateConfigurationRunsAsync()) + string filter = "$filter=properties/correlationId%20eq%200b943e57-44d3-4f05-898c-6e92aa617e59"; + await foreach (SoftwareUpdateConfigurationMachineRun item in automationAccount.GetSoftwareUpdateConfigurationMachineRunsAsync(filter: filter)) { Console.WriteLine($"Succeeded: {item}"); } @@ -657,13 +687,13 @@ public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigura Console.WriteLine($"Succeeded"); } - // Get software update configuration machine run + // Get software update configuration runs by Id [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationMachineRun_GetSoftwareUpdateConfigurationMachineRun() + public async Task GetSoftwareUpdateConfigurationRun_GetSoftwareUpdateConfigurationRunsById() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/getSoftwareUpdateConfigurationMachineRunById.json - // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_GetById" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationRun/getSoftwareUpdateConfigurationRunById.json + // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_GetById" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -679,19 +709,19 @@ public async Task GetSoftwareUpdateConfigurationMachineRun_GetSoftwareUpdateConf AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation - Guid softwareUpdateConfigurationMachineRunId = Guid.Parse("ca440719-34a4-4234-a1a9-3f84faf7788f"); - SoftwareUpdateConfigurationMachineRun result = await automationAccount.GetSoftwareUpdateConfigurationMachineRunAsync(softwareUpdateConfigurationMachineRunId); + Guid softwareUpdateConfigurationRunId = Guid.Parse("2bd77cfa-2e9c-41b4-a45b-684a77cfeca9"); + SoftwareUpdateConfigurationRun result = await automationAccount.GetSoftwareUpdateConfigurationRunAsync(softwareUpdateConfigurationRunId); Console.WriteLine($"Succeeded: {result}"); } - // List software update configuration machine runs + // List software update configuration machine run with status equal to 'Failed' [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateConfigurationMachineRuns() + public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigurationMachineRunWithStatusEqualToFailed() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRuns.json - // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationRun/listFailedSoftwareUpdateConfigurationRuns.json + // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -707,7 +737,8 @@ public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateCo AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - await foreach (SoftwareUpdateConfigurationMachineRun item in automationAccount.GetSoftwareUpdateConfigurationMachineRunsAsync()) + string filter = "properties/status%20eq%20'Failed'"; + await foreach (SoftwareUpdateConfigurationRun item in automationAccount.GetSoftwareUpdateConfigurationRunsAsync(filter: filter)) { Console.WriteLine($"Succeeded: {item}"); } @@ -715,13 +746,13 @@ public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateCo Console.WriteLine($"Succeeded"); } - // List software update configuration machine runs for a specific software update configuration run + // List software update configuration machine runs [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateConfigurationMachineRunsForASpecificSoftwareUpdateConfigurationRun() + public async Task GetSoftwareUpdateConfigurationRuns_ListSoftwareUpdateConfigurationMachineRuns() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRunsByRun.json - // this example is just showing the usage of "SoftwareUpdateConfigurationMachineRuns_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfigurationRun/listSoftwareUpdateConfigurationRuns.json + // this example is just showing the usage of "SoftwareUpdateConfigurationRuns_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -737,8 +768,7 @@ public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateCo AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); // invoke the operation and iterate over the result - string filter = "$filter=properties/correlationId%20eq%200b943e57-44d3-4f05-898c-6e92aa617e59"; - await foreach (SoftwareUpdateConfigurationMachineRun item in automationAccount.GetSoftwareUpdateConfigurationMachineRunsAsync(filter: filter)) + await foreach (SoftwareUpdateConfigurationRun item in automationAccount.GetSoftwareUpdateConfigurationRunsAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -751,7 +781,7 @@ public async Task GetSoftwareUpdateConfigurationMachineRuns_ListSoftwareUpdateCo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateUriWebhook_GenerateWebhookUri() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/webhookGenerateUri.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/webhookGenerateUri.json // this example is just showing the usage of "Webhook_GenerateUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateCollection.cs index 9a05e1ed34fb..a45e0064a77e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateCertificate.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_CreateOrUpdateACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCertificates() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCertificatesByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listCertificatesByAutomationAccount.json // this example is just showing the usage of "Certificate_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateResource.cs index 54f176c8c201..7ebaa85cb281 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCertificateResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteCertificate.json // this example is just showing the usage of "Certificate_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetACertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateACertificate() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateCertificate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateCertificate.json // this example is just showing the usage of "Certificate_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionCollection.cs index aa34ed29de84..27f653a7ca6b 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnection.json // this example is just showing the usage of "Connection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetAConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnection.json // this example is just showing the usage of "Connection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetAConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnection.json // this example is just showing the usage of "Connection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateConnection.json // this example is just showing the usage of "Connection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task CreateOrUpdate_CreateOrUpdateConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConnectionsByAutomationAccountFirst100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listConnectionsByAutomationAccount_First100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listConnectionsByAutomationAccount_First100.json // this example is just showing the usage of "Connection_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task GetAll_ListConnectionsByAutomationAccountFirst100() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConnectionsByAutomationAccountNext100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listConnectionsByAutomationAccount_Next100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listConnectionsByAutomationAccount_Next100.json // this example is just showing the usage of "Connection_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionResource.cs index a355ed9e50c4..075fb11f8e84 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnExistingConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteConnection.json // this example is just showing the usage of "Connection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteAnExistingConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnection.json // this example is just showing the usage of "Connection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetAConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateConnection.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateConnection.json // this example is just showing the usage of "Connection_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeCollection.cs index 8a3e97b0e89c..a3a78747fc3a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_AutomationConnectionTypeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnectionType.json // this example is just showing the usage of "ConnectionType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Get_GetConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnectionType.json // this example is just showing the usage of "ConnectionType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Exists_GetConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnectionType.json // this example is just showing the usage of "ConnectionType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task GetIfExists_GetConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateConnectionType.json // this example is just showing the usage of "ConnectionType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +190,7 @@ public async Task CreateOrUpdate_CreateOrUpdateConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetConnectionTypesFirst100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAllConnectionTypes_First100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAllConnectionTypes_First100.json // this example is just showing the usage of "ConnectionType_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task GetAll_GetConnectionTypesFirst100() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetConnectionTypesNext100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAllConnectionTypes_Next100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAllConnectionTypes_Next100.json // this example is just showing the usage of "ConnectionType_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeResource.cs index 78afa232871c..03ac3f769158 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationConnectionTypeResource.cs @@ -24,7 +24,7 @@ public partial class Sample_AutomationConnectionTypeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnExistingConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteConnectionType.json // this example is just showing the usage of "ConnectionType_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Delete_DeleteAnExistingConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getConnectionType.json // this example is just showing the usage of "ConnectionType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetConnectionType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateConnectionType() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateConnectionType.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateConnectionType.json // this example is just showing the usage of "ConnectionType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialCollection.cs index e2f3c7ce1883..a89cc35ed8e7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationCredentialCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCredential.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCredential.json // this example is just showing the usage of "Credential_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCredential.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCredential.json // this example is just showing the usage of "Credential_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCredential.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCredential.json // this example is just showing the usage of "Credential_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateCredential.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateCredential.json // this example is just showing the usage of "Credential_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_CreateACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCredentialsByAutomationAccountFirst100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCredentialsByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listCredentialsByAutomationAccount.json // this example is just showing the usage of "Credential_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task GetAll_ListCredentialsByAutomationAccountFirst100() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCredentialsByAutomationAccountNext100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCredentialsByAutomationAccount_next100_using_nextLink.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listCredentialsByAutomationAccount_next100_using_nextLink.json // this example is just showing the usage of "Credential_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialResource.cs index b94028d4f58f..69d7fd990fe7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationCredentialResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationCredentialResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteCredentialExisting.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteCredentialExisting.json // this example is just showing the usage of "Credential_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCredential.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCredential.json // this example is just showing the usage of "Credential_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetACredential() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateACredential() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateCredential_patch.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateCredential_patch.json // this example is just showing the usage of "Credential_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobCollection.cs index dcf2f91ef7c0..6b3670c0aa9f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationJobCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJob.json // this example is just showing the usage of "Job_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJob.json // this example is just showing the usage of "Job_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJob.json // this example is just showing the usage of "Job_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/createJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/createJob.json // this example is just showing the usage of "Job_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_CreateJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListJobsByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/listJobsByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/listJobsByAutomationAccount.json // this example is just showing the usage of "Job_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +190,7 @@ public async Task GetAll_ListJobsByAutomationAccount() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "51766542-3ed7-4a72-a187-0c8ab644ddab"; string resourceGroupName = "mygroup"; - string automationAccountName = "ContoseAutomationAccount"; + string automationAccountName = "ContosoAutomationAccount"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobResource.cs index c77ddbc6a5e7..c801622c3b3c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationJobResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOutput_GetJobOutput() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobOutput.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJobOutput.json // this example is just showing the usage of "Job_GetOutput" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task GetOutput_GetJobOutput() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRunbookContent_GetJobRunbookContent() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobRunbookContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJobRunbookContent.json // this example is just showing the usage of "Job_GetRunbookContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task GetRunbookContent_GetJobRunbookContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Suspend_SuspendJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/suspendJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/suspendJob.json // this example is just showing the usage of "Job_Suspend" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task Suspend_SuspendJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/stopJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/stopJob.json // this example is just showing the usage of "Job_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Stop_StopJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJob.json // this example is just showing the usage of "Job_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Get_GetJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/createJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/createJob.json // this example is just showing the usage of "Job_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task Update_CreateJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Resume_ResumeJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/resumeJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/resumeJob.json // this example is just showing the usage of "Job_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task Resume_ResumeJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetJobStream_GetJobStream() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/getJobStream.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/getJobStream.json // this example is just showing the usage of "JobStream_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task GetJobStream_GetJobStream() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetJobStreams_ListJobStreamsByJobName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/job/listJobStreamsByJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/job/listJobStreamsByJob.json // this example is just showing the usage of "JobStream_ListByJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleCollection.cs index 72ee1681f00e..f39c3fcd44df 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationJobScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getJobSchedule.json // this example is just showing the usage of "JobSchedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getJobSchedule.json // this example is just showing the usage of "JobSchedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getJobSchedule.json // this example is just showing the usage of "JobSchedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createJobSchedule.json // this example is just showing the usage of "JobSchedule_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task CreateOrUpdate_CreateAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllJobSchedulesByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listAllJobSchedulesByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAllJobSchedulesByAutomationAccount.json // this example is just showing the usage of "JobSchedule_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleResource.cs index 7b8a6e454376..4a1d8250a7bf 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationJobScheduleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationJobScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteJobSchedule.json // this example is just showing the usage of "JobSchedule_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getJobSchedule.json // this example is just showing the usage of "JobSchedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetAJobSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAJobSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createJobSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createJobSchedule.json // this example is just showing the usage of "JobSchedule_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionCollection.cs index 129e410d5d07..afda79c31de1 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionListGet.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionListGet.json // this example is just showing the usage of "PrivateEndpointConnections_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -35,7 +35,7 @@ public async Task GetAll_GetsPrivateEndpointConnection() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); @@ -60,7 +60,7 @@ public async Task GetAll_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task Get_GetsPrivateEndpointConnection() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); @@ -95,7 +95,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task Exists_GetsPrivateEndpointConnection() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); @@ -126,7 +126,7 @@ public async Task Exists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetIfExists_GetsPrivateEndpointConnection() // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); @@ -169,7 +169,7 @@ public async Task GetIfExists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAG // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionResource.cs index 3896c670d426..ac61b1a25438 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationPrivateEndpointConnectionResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -35,7 +35,7 @@ public async Task Get_GetsPrivateEndpointConnection() // for more information of creating AutomationPrivateEndpointConnectionResource, please refer to the document of AutomationPrivateEndpointConnectionResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; string privateEndpointConnectionName = "privateEndpointConnectionName"; ResourceIdentifier automationPrivateEndpointConnectionResourceId = AutomationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, privateEndpointConnectionName); AutomationPrivateEndpointConnectionResource automationPrivateEndpointConnection = client.GetAutomationPrivateEndpointConnectionResource(automationPrivateEndpointConnectionResourceId); @@ -55,7 +55,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName // for more information of creating AutomationPrivateEndpointConnectionResource, please refer to the document of AutomationPrivateEndpointConnectionResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; string privateEndpointConnectionName = "privateEndpointConnectionName"; ResourceIdentifier automationPrivateEndpointConnectionResourceId = AutomationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, privateEndpointConnectionName); AutomationPrivateEndpointConnectionResource automationPrivateEndpointConnection = client.GetAutomationPrivateEndpointConnectionResource(automationPrivateEndpointConnectionResourceId); @@ -96,7 +96,7 @@ public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionDelete.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/privateEndpointConnection/PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() // for more information of creating AutomationPrivateEndpointConnectionResource, please refer to the document of AutomationPrivateEndpointConnectionResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "rg1"; - string automationAccountName = "ddb1"; + string automationAccountName = "automationAccountName"; string privateEndpointConnectionName = "privateEndpointConnectionName"; ResourceIdentifier automationPrivateEndpointConnectionResourceId = AutomationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, privateEndpointConnectionName); AutomationPrivateEndpointConnectionResource automationPrivateEndpointConnection = client.GetAutomationPrivateEndpointConnectionResource(automationPrivateEndpointConnectionResourceId); diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookCollection.cs index 348f60e6178f..c8c79bd50678 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationRunbookCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbook.json // this example is just showing the usage of "Runbook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetRunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbook.json // this example is just showing the usage of "Runbook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetRunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbook.json // this example is just showing the usage of "Runbook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetRunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRunbookAndPublishIt() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createOrUpdateRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/createOrUpdateRunbook.json // this example is just showing the usage of "Runbook_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRunbookAndPublishIt() // invoke the operation string runbookName = "Get-AzureVMTutorial"; - AutomationRunbookCreateOrUpdateContent content = new AutomationRunbookCreateOrUpdateContent(AutomationRunbookType.PowerShellWorkflow) + AutomationRunbookCreateOrUpdateContent content = new AutomationRunbookCreateOrUpdateContent(AutomationRunbookType.PowerShell) { Name = "Get-AzureVMTutorial", Location = new AzureLocation("East US 2"), @@ -164,6 +164,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRunbookAndPublishIt() }, IsLogVerboseEnabled = false, IsLogProgressEnabled = true, + RuntimeEnvironment = "environmentName", PublishContentLink = new AutomationContentLink() { Uri = new Uri("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"), @@ -187,7 +188,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRunbookAndPublishIt() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateRunbookAsDraft() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createRunbookAsDraft.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/createRunbookAsDraft.json // this example is just showing the usage of "Runbook_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,7 +209,7 @@ public async Task CreateOrUpdate_CreateRunbookAsDraft() // invoke the operation string runbookName = "Get-AzureVMTutorial"; - AutomationRunbookCreateOrUpdateContent content = new AutomationRunbookCreateOrUpdateContent(AutomationRunbookType.PowerShellWorkflow) + AutomationRunbookCreateOrUpdateContent content = new AutomationRunbookCreateOrUpdateContent(AutomationRunbookType.PowerShell) { Name = "Get-AzureVMTutorial", Location = new AzureLocation("East US 2"), @@ -219,6 +220,7 @@ public async Task CreateOrUpdate_CreateRunbookAsDraft() }, IsLogVerboseEnabled = false, IsLogProgressEnabled = false, + RuntimeEnvironment = "environmentName", Draft = new AutomationRunbookDraft(), Description = "Description of the Runbook", }; @@ -237,7 +239,7 @@ public async Task CreateOrUpdate_CreateRunbookAsDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRunbooksByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/listRunbooksByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/listRunbooksByAutomationAccount.json // this example is just showing the usage of "Runbook_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookResource.cs index e383da45fc89..53eb91795130 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationRunbookResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationRunbookResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentRunbookDraft_GetRunbookDraftContent() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraftContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbookDraftContent.json // this example is just showing the usage of "RunbookDraft_GetContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task GetContentRunbookDraft_GetRunbookDraftContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRunbookDraft_GetRunbookDraft() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookDraft.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbookDraft.json // this example is just showing the usage of "RunbookDraft_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task GetRunbookDraft_GetRunbookDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UndoEditRunbookDraft_UndoDraftEditToLastKnownPublishedState() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/undoDraftEditToLastKnownPublishedState.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/undoDraftEditToLastKnownPublishedState.json // this example is just showing the usage of "RunbookDraft_UndoEdit" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task UndoEditRunbookDraft_UndoDraftEditToLastKnownPublishedState() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishRunbookDraft() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/publishRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/publishRunbook.json // this example is just showing the usage of "Runbook_Publish" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Publish_PublishRunbookDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContent_GetRunbookContent() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbookContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbookContent.json // this example is just showing the usage of "Runbook_GetContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetContent_GetRunbookContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getRunbook.json // this example is just showing the usage of "Runbook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Get_GetRunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateRunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/updateRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/updateRunbook.json // this example is just showing the usage of "Runbook_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task Update_UpdateRunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteARunbook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/deleteRunbook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/deleteRunbook.json // this example is just showing the usage of "Runbook_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +262,7 @@ public async Task Delete_DeleteARunbook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTestJobStream_GetTestJobStream() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getTestJobStream.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getTestJobStream.json // this example is just showing the usage of "TestJobStreams_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +291,7 @@ public async Task GetTestJobStream_GetTestJobStream() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTestJobStreams_ListJobStreamsByJobName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/listTestJobStreamsByJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/listTestJobStreamsByJob.json // this example is just showing the usage of "TestJobStreams_ListByTestJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +322,7 @@ public async Task GetTestJobStreams_ListJobStreamsByJobName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateTestJob_CreateTestJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/createTestJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/createTestJob.json // this example is just showing the usage of "TestJob_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -348,6 +348,7 @@ public async Task CreateTestJob_CreateTestJob() ["key02"] = "value02", }, RunOn = "", + RuntimeEnvironment = "runtimeEnvironmentName", }; RunbookTestJob result = await automationRunbook.CreateTestJobAsync(content); @@ -359,7 +360,7 @@ public async Task CreateTestJob_CreateTestJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTestJob_GetTestJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/getTestJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/getTestJob.json // this example is just showing the usage of "TestJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -387,7 +388,7 @@ public async Task GetTestJob_GetTestJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResumeTestJob_ResumeTestJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/resumeTestJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/resumeTestJob.json // this example is just showing the usage of "TestJob_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -415,7 +416,7 @@ public async Task ResumeTestJob_ResumeTestJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopTestJob_StopTestJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/stopTestJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/stopTestJob.json // this example is just showing the usage of "TestJob_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -443,7 +444,7 @@ public async Task StopTestJob_StopTestJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SuspendTestJob_SuspendTestJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2018-06-30/examples/suspendTestJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runbook/suspendTestJob.json // this example is just showing the usage of "TestJob_Suspend" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleCollection.cs index f82ed3b9730a..94e0dba1eabd 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateSchedule.json // this example is just showing the usage of "Schedule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getSchedule.json // this example is just showing the usage of "Schedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_GetASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getSchedule.json // this example is just showing the usage of "Schedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Exists_GetASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getSchedule.json // this example is just showing the usage of "Schedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task GetIfExists_GetASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSchedulesByAutomationAccountFirst100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listSchedulesByAutomationAccount_First100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listSchedulesByAutomationAccount_First100.json // this example is just showing the usage of "Schedule_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetAll_ListSchedulesByAutomationAccountFirst100() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSchedulesByAutomationAccountNext100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listSchedulesByAutomationAccount_Next100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listSchedulesByAutomationAccount_Next100.json // this example is just showing the usage of "Schedule_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleResource.cs index fff582af239a..be043c58ff08 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationScheduleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateSchedule.json // this example is just showing the usage of "Schedule_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Update_UpdateASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getSchedule.json // this example is just showing the usage of "Schedule_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetASchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSchedule() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteSchedule.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteSchedule.json // this example is just showing the usage of "Schedule_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlCollection.cs index 94445623220c..9dbe480da8cf 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationSourceControlCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/createOrUpdateSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/createOrUpdateSourceControl.json // this example is just showing the usage of "SourceControl_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASourceControl() SourceType = SourceControlSourceType.VsoGit, SecurityToken = new SourceControlSecurityTokenProperties() { - AccessToken = "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567", + AccessToken = "******", TokenType = SourceControlTokenType.PersonalAccessToken, }, Description = "my description", @@ -74,7 +74,7 @@ public async Task CreateOrUpdate_CreateOrUpdateASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/getSourceControl.json // this example is just showing the usage of "SourceControl_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Get_GetASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/getSourceControl.json // this example is just showing the usage of "SourceControl_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Exists_GetASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/getSourceControl.json // this example is just showing the usage of "SourceControl_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetIfExists_GetASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSourceControls() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getAllSourceControls.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/getAllSourceControls.json // this example is just showing the usage of "SourceControl_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlResource.cs index 4644e3e5f635..c25c97a274ae 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationSourceControlResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationSourceControlResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/updateSourceControl_patch.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/updateSourceControl_patch.json // this example is just showing the usage of "SourceControl_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Update_UpdateASourceControl() IsAutoPublishRunbookEnabled = true, SecurityToken = new SourceControlSecurityTokenProperties() { - AccessToken = "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567", + AccessToken = "******", TokenType = SourceControlTokenType.PersonalAccessToken, }, Description = "my description", @@ -68,7 +68,7 @@ public async Task Update_UpdateASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/deleteSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/deleteSourceControl.json // this example is just showing the usage of "SourceControl_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Delete_DeleteASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASourceControl() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControl/getSourceControl.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControl/getSourceControl.json // this example is just showing the usage of "SourceControl_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_GetASourceControl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateSourceControlSyncJob_CreateOrUpdateASourceControlSyncJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/createSourceControlSyncJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControlSyncJob/createSourceControlSyncJob.json // this example is just showing the usage of "SourceControlSyncJob_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -158,7 +158,7 @@ public async Task CreateSourceControlSyncJob_CreateOrUpdateASourceControlSyncJob [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSourceControlSyncJob_GetASourceControlSyncJobByJobId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/getSourceControlSyncJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControlSyncJob/getSourceControlSyncJob.json // this example is just showing the usage of "SourceControlSyncJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task GetSourceControlSyncJob_GetASourceControlSyncJobByJobId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSourceControlSyncJobs_GetAListOfSourceControlSyncJobs() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json // this example is just showing the usage of "SourceControlSyncJob_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -218,7 +218,7 @@ public async Task GetSourceControlSyncJobs_GetAListOfSourceControlSyncJobs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSourceControlSyncJobStreams_GetAListOfSyncJobStreamsIdentifiedBySyncJobId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreams.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreams.json // this example is just showing the usage of "SourceControlSyncJobStreams_ListBySyncJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -250,7 +250,7 @@ public async Task GetSourceControlSyncJobStreams_GetAListOfSyncJobStreamsIdentif [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSourceControlSyncJobStream_GetASyncJobStreamIdentifiedBySyncJobStreamId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreamsByStreamId.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreamsByStreamId.json // this example is just showing the usage of "SourceControlSyncJobStreams_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableCollection.cs index 75bbcf05ef82..46c2530a6356 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationVariableCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateVariable.json // this example is just showing the usage of "Variable_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getVariable.json // this example is just showing the usage of "Variable_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Get_GetAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getVariable.json // this example is just showing the usage of "Variable_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Exists_GetAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getVariable.json // this example is just showing the usage of "Variable_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVariablesFirst100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listVariables_First100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listVariables_First100.json // this example is just showing the usage of "Variable_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetAll_ListVariablesFirst100() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVariablesNext100() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listVariables_Next100.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listVariables_Next100.json // this example is just showing the usage of "Variable_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableResource.cs index 7d62641dc53c..0e3614e77b05 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationVariableResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationVariableResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateVariable_patch.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateVariable_patch.json // this example is just showing the usage of "Variable_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Update_UpdateAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteVariable.json // this example is just showing the usage of "Variable_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Delete_DeleteAVariable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAVariable() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getVariable.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getVariable.json // this example is just showing the usage of "Variable_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherCollection.cs index 2e632da1b950..e9821c7a725f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_AutomationWatcherCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateWatcher.json // this example is just showing the usage of "Watcher_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWatcher.json // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task Get_GetWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWatcher.json // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Exists_GetWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWatcher.json // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task GetIfExists_GetWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWatchersByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listWatchersByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listWatchersByAutomationAccount.json // this example is just showing the usage of "Watcher_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherResource.cs index d6b04d4d6d8b..f4e6b86a55d4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWatcherResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationWatcherResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWatcher.json // this example is just showing the usage of "Watcher_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateWatcher.json // this example is just showing the usage of "Watcher_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_UpdateWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteWatcher.json // this example is just showing the usage of "Watcher_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Delete_DeleteWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/startWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/startWatcher.json // this example is just showing the usage of "Watcher_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Start_StartWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StartWatcher() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/stopWatcher.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/stopWatcher.json // this example is just showing the usage of "Watcher_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookCollection.cs index 64799500217a..9fc6496a4b91 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationWebhookCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWebhook.json // this example is just showing the usage of "Webhook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWebhook.json // this example is just showing the usage of "Webhook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWebhook.json // this example is just showing the usage of "Webhook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/createOrUpdateWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateWebhook.json // this example is just showing the usage of "Webhook_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWebhooksByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listWebhooksByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listWebhooksByAutomationAccount.json // this example is just showing the usage of "Webhook_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookResource.cs index 8baa4afa7e7a..e8a4c335c968 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_AutomationWebhookResource.cs @@ -23,7 +23,7 @@ public partial class Sample_AutomationWebhookResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/deleteWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteWebhook.json // this example is just showing the usage of "Webhook_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getWebhook.json // this example is just showing the usage of "Webhook_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetWebhook() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWebhook() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/updateWebhook.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateWebhook.json // this example is just showing the usage of "Webhook_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobCollection.cs index 957ac6cc83e2..3d9cc1cd616f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_DscCompilationJobCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateOrUpdateADSCCompilationJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_GetADSCCompilationJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetADSCCompilationJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task GetIfExists_GetADSCCompilationJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDSCCompilationJobInAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCompilationJobsByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listCompilationJobsByAutomationAccount.json // this example is just showing the usage of "DscCompilationJob_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobResource.cs index 3512adbf94a4..4f6dcfa60fa2 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscCompilationJobResource.cs @@ -23,7 +23,7 @@ public partial class Sample_DscCompilationJobResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Update_CreateOrUpdateADSCCompilationJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCCompilationJob() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getCompilationJob.json // this example is just showing the usage of "DscCompilationJob_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationCollection.cs index 25f3677dc3e1..579fa51ae471 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_DscConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetADSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetADSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetADSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/createOrUpdateDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateDscConfiguration.json // this example is just showing the usage of "DscConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +179,7 @@ public async Task CreateOrUpdate_CreateOrUpdateConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getAllDscConfigurations.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getAllDscConfigurations.json // this example is just showing the usage of "DscConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetAll_GetDSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCConfigurationsWithNameFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getPagedlDscConfigurationsWithNameFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPagedlDscConfigurationsWithNameFilter.json // this example is just showing the usage of "DscConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,7 +257,7 @@ public async Task GetAll_ListPagedDSCConfigurationsWithNameFilter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCConfigurationsWithNoFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getPagedDscConfigurationsWithNoFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getPagedDscConfigurationsWithNoFilter.json // this example is just showing the usage of "DscConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationResource.cs index 1f20d559d794..f16233c7cd37 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscConfigurationResource.cs @@ -23,7 +23,7 @@ public partial class Sample_DscConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/deleteDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteDSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetADSCConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/updateDscConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateDscConfiguration.json // this example is just showing the usage of "DscConfiguration_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Update_CreateOrUpdateConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContent_GetDSCConfigurationContent() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/getDscConfigurationContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscConfigurationContent.json // this example is just showing the usage of "DscConfiguration_GetContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeCollection.cs index 557daca42073..049cb4a4558c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_DscNodeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetANode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNode.json // this example is just showing the usage of "DscNode_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetANode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetANode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNode.json // this example is just showing the usage of "DscNode_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_GetANode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetANode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNode.json // this example is just showing the usage of "DscNode_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetIfExists_GetANode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDSCNodesByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listAllDscNodesByAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listAllDscNodesByAutomationAccount.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task GetAll_ListDSCNodesByAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWhereNodeConfigurationsAreNotAssignedFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationNotAssignedFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationNotAssignedFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWhereNodeConfigurat [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNodeConfigurationCustomFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -250,7 +250,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNodeConfigurati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNameFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNameFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithNameFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +291,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNameFilter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNoFilters() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNoFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithNoFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -331,7 +331,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNoFilters() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNodeStatusFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithStatusFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithStatusFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -372,7 +372,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithNodeStatusFilte [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithVersionFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithVersionFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithVersionFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -413,7 +413,7 @@ public async Task GetAll_ListPagedDSCNodesByAutomationAccountWithVersionFilter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodesWithFiltersSeparatedByAnd() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithCompositeFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodesByAutomationAccountWithCompositeFilter.json // this example is just showing the usage of "DscNode_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationCollection.cs index c06cb99c8e84..b5b87b65cf27 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_DscNodeConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetADSCNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADSCNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetADSCNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADSCNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetADSCNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task CreateOrUpdate_CreateNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDSCNodeConfigurationsByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listDscNodeConfigurations.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listDscNodeConfigurations.json // this example is just showing the usage of "DscNodeConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task GetAll_ListDSCNodeConfigurationsByAutomationAccount() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodeConfigurationsByAutomationAccountWithNameFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationsWithNameFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodeConfigurationsWithNameFilter.json // this example is just showing the usage of "DscNodeConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +254,7 @@ public async Task GetAll_ListPagedDSCNodeConfigurationsByAutomationAccountWithNa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPagedDSCNodeConfigurationsByAutomationAccountWithNoFilter() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationsWithNoFilter.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodeConfigurationsWithNoFilter.json // this example is just showing the usage of "DscNodeConfiguration_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationResource.cs index e26b81b59f14..6e9380d054cd 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeConfigurationResource.cs @@ -23,7 +23,7 @@ public partial class Sample_DscNodeConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteADSCNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteADSCNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADSCNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetADSCNodeConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateNodeConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateDscNodeConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/createOrUpdateDscNodeConfiguration.json // this example is just showing the usage of "DscNodeConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeResource.cs index 4d3be2ba47fc..186d38515cba 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_DscNodeResource.cs @@ -23,7 +23,7 @@ public partial class Sample_DscNodeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteADSCNode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteDscNode.json // this example is just showing the usage of "DscNode_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteADSCNode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetANode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNode.json // this example is just showing the usage of "DscNode_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetANode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateANode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateDscNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateDscNode.json // this example is just showing the usage of "DscNode_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_UpdateANode() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNodeReportsByNode_ListDSCReportsByNodeId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listDscNodeReportsByNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listDscNodeReportsByNode.json // this example is just showing the usage of "NodeReports_ListByNode" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task GetNodeReportsByNode_ListDSCReportsByNodeId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNodeReportsByNode_ListPagedDSCReportsByNodeId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeReportsByNode.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listPagedDscNodeReportsByNode.json // this example is just showing the usage of "NodeReports_ListByNode" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task GetNodeReportsByNode_ListPagedDSCReportsByNodeId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNodeReport_GetDscNodeReportDataByNodeIdAndReportId() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReport.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeReport.json // this example is just showing the usage of "NodeReports_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetNodeReport_GetDscNodeReportDataByNodeIdAndReportId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentNodeReport_GetContentOfNode() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReportContent.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDscNodeReportContent.json // this example is just showing the usage of "NodeReports_GetContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerCollection.cs index cd86740ee996..3447a8842b91 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridRunbookWorkerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Get_GetAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Exists_GetAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task GetIfExists_GetAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/putHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/putHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,11 +157,11 @@ public async Task CreateOrUpdate_CreateAV2HybridRunbookWorker() // invoke the operation string hybridRunbookWorkerId = "c010ad12-ef14-4a2a-aa9e-ef22c4745ddd"; - HybridRunbookWorkerCreateOrUpdateContent content = new HybridRunbookWorkerCreateOrUpdateContent() + HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters = new HybridRunbookWorkerCreateParameters() { VmResourceId = new ResourceIdentifier("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, hybridRunbookWorkerId, content); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters); HybridRunbookWorkerResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -176,7 +176,7 @@ public async Task CreateOrUpdate_CreateAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListHybridWorkersByHybridRunbookWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/listHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_ListByHybridRunbookWorkerGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupCollection.cs index 06d0fd93bf9f..48818289b073 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridRunbookWorkerGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Get_GetAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Exists_GetAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/putHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/putHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_CreateAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListHybridWorkerGroupsByAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/listHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/listHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupResource.cs index 0b2197a2e6ef..6f0efa8f9202 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerGroupResource.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridRunbookWorkerGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/deleteHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Delete_DeleteAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/getHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetAHybridWorkerGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateHybridWorkerGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-02-22/examples/updateHybridRunbookWorkerGroup.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/updateHybridRunbookWorkerGroup.json // this example is just showing the usage of "HybridRunbookWorkerGroup_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerResource.cs index e162b3e3188d..223c1110255a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_HybridRunbookWorkerResource.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridRunbookWorkerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/deleteHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/deleteHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Delete_DeleteAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/getHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,8 +85,8 @@ public async Task Get_GetAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAV2HybridRunbookWorker() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/putHybridRunbookWorker.json - // this example is just showing the usage of "HybridRunbookWorkers_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/patchHybridRunbookWorker.json + // this example is just showing the usage of "HybridRunbookWorkers_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -104,12 +104,11 @@ public async Task Update_CreateAV2HybridRunbookWorker() HybridRunbookWorkerResource hybridRunbookWorker = client.GetHybridRunbookWorkerResource(hybridRunbookWorkerResourceId); // invoke the operation - HybridRunbookWorkerCreateOrUpdateContent content = new HybridRunbookWorkerCreateOrUpdateContent() + HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters = new HybridRunbookWorkerCreateParameters() { VmResourceId = new ResourceIdentifier("/subscriptions/vmsubid/resourceGroups/vmrg/providers/Microsoft.Compute/virtualMachines/vmname"), }; - ArmOperation lro = await hybridRunbookWorker.UpdateAsync(WaitUntil.Completed, content); - HybridRunbookWorkerResource result = lro.Value; + HybridRunbookWorkerResource result = await hybridRunbookWorker.UpdateAsync(hybridRunbookWorkerCreationParameters); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -123,7 +122,7 @@ public async Task Update_CreateAV2HybridRunbookWorker() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Move_MoveAV2HybridWorkerToADifferentGroup() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2021-06-22/examples/moveHybridRunbookWorker.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/moveHybridRunbookWorker.json // this example is just showing the usage of "HybridRunbookWorkers_Move" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageCollection.cs new file mode 100644 index 000000000000..4210384c445f --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageCollection.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_PackageCollection + { + // Get a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/getPackage.json + // this example is just showing the usage of "Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // get the collection of this PackageResource + PackageCollection collection = runtimeEnvironment.GetPackages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + PackageResource result = await collection.GetAsync(packageName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/getPackage.json + // this example is just showing the usage of "Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // get the collection of this PackageResource + PackageCollection collection = runtimeEnvironment.GetPackages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + bool result = await collection.ExistsAsync(packageName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/getPackage.json + // this example is just showing the usage of "Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // get the collection of this PackageResource + PackageCollection collection = runtimeEnvironment.GetPackages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + NullableResponse response = await collection.GetIfExistsAsync(packageName); + PackageResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/createOrUpdatePackage.json + // this example is just showing the usage of "Package_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // get the collection of this PackageResource + PackageCollection collection = runtimeEnvironment.GetPackages(); + + // invoke the operation + string packageName = "OmsCompositeResources"; + PackageCreateOrUpdateContent content = new PackageCreateOrUpdateContent(new AutomationContentLink() + { + Uri = new Uri("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"), + ContentHash = new AutomationContentHash("sha265", "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), + Version = "1.0.0.0", + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packageName, content); + PackageResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/listPackagesByRuntimeEnvironment.json + // this example is just showing the usage of "Packages_ListByRuntimeEnvironment" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // get the collection of this PackageResource + PackageCollection collection = runtimeEnvironment.GetPackages(); + + // invoke the operation and iterate over the result + await foreach (PackageResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageResource.cs new file mode 100644 index 000000000000..d9c66a1574bf --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_PackageResource.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_PackageResource + { + // Delete a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/deletePackage.json + // this example is just showing the usage of "Package_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PackageResource created on azure + // for more information of creating PackageResource, please refer to the document of PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + string packageName = "OmsCompositeResources"; + ResourceIdentifier packageResourceId = PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + PackageResource package = client.GetPackageResource(packageResourceId); + + // invoke the operation + await package.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/getPackage.json + // this example is just showing the usage of "Package_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PackageResource created on azure + // for more information of creating PackageResource, please refer to the document of PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount33"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + string packageName = "OmsCompositeResources"; + ResourceIdentifier packageResourceId = PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + PackageResource package = client.GetPackageResource(packageResourceId); + + // invoke the operation + PackageResource result = await package.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update a package + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAPackage() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/package/updatePackage.json + // this example is just showing the usage of "Package_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PackageResource created on azure + // for more information of creating PackageResource, please refer to the document of PackageResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "MyAutomationAccount"; + string runtimeEnvironmentName = "runtimeEnvironmentName"; + string packageName = "OmsCompositeResources"; + ResourceIdentifier packageResourceId = PackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + PackageResource package = client.GetPackageResource(packageResourceId); + + // invoke the operation + PackagePatch patch = new PackagePatch() + { + ContentLink = new AutomationContentLink() + { + Uri = new Uri("https://teststorage.blob.core.windows.net/mycontainer/MyModule.zip"), + ContentHash = new AutomationContentHash("sha265", "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"), + Version = "1.0.0.0", + }, + }; + PackageResource result = await package.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PackageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentCollection.cs new file mode 100644 index 000000000000..2549d41dbf7b --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentCollection.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_RuntimeEnvironmentCollection + { + // Create or update automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/createRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this RuntimeEnvironmentResource + RuntimeEnvironmentCollection collection = automationAccount.GetRuntimeEnvironments(); + + // invoke the operation + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + RuntimeEnvironmentData data = new RuntimeEnvironmentData(new AzureLocation("East US 2")) + { + DefaultPackages = +{ +["Az"] = "6.*", +}, + Language = "PowerShell", + Version = "7.1", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, runtimeEnvironmentName, data); + RuntimeEnvironmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/getRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this RuntimeEnvironmentResource + RuntimeEnvironmentCollection collection = automationAccount.GetRuntimeEnvironments(); + + // invoke the operation + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + RuntimeEnvironmentResource result = await collection.GetAsync(runtimeEnvironmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/getRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this RuntimeEnvironmentResource + RuntimeEnvironmentCollection collection = automationAccount.GetRuntimeEnvironments(); + + // invoke the operation + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + bool result = await collection.ExistsAsync(runtimeEnvironmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/getRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this RuntimeEnvironmentResource + RuntimeEnvironmentCollection collection = automationAccount.GetRuntimeEnvironments(); + + // invoke the operation + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + NullableResponse response = await collection.GetIfExistsAsync(runtimeEnvironmentName); + RuntimeEnvironmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List runbooks by automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRunbooksByAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/listRuntimeEnvironmentsByAutomationAccount.json + // this example is just showing the usage of "RuntimeEnvironments_ListByAutomationAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutomationAccountResource created on azure + // for more information of creating AutomationAccountResource, please refer to the document of AutomationAccountResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "ContoseAutomationAccount"; + ResourceIdentifier automationAccountResourceId = AutomationAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName); + AutomationAccountResource automationAccount = client.GetAutomationAccountResource(automationAccountResourceId); + + // get the collection of this RuntimeEnvironmentResource + RuntimeEnvironmentCollection collection = automationAccount.GetRuntimeEnvironments(); + + // invoke the operation and iterate over the result + await foreach (RuntimeEnvironmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentResource.cs new file mode 100644 index 000000000000..0c578ca7a88b --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_RuntimeEnvironmentResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation.Samples +{ + public partial class Sample_RuntimeEnvironmentResource + { + // Update an automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAnAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/updateRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // invoke the operation + RuntimeEnvironmentPatch patch = new RuntimeEnvironmentPatch() + { + DefaultPackages = +{ +["Az"] = "6.*", +}, + }; + RuntimeEnvironmentResource result = await runtimeEnvironment.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Runtime Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteRuntimeEnvironment() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/deleteRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // invoke the operation + await runtimeEnvironment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get automation account + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAutomationAccount() + { + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/runtimeEnvironment/getRuntimeEnvironment.json + // this example is just showing the usage of "RuntimeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RuntimeEnvironmentResource created on azure + // for more information of creating RuntimeEnvironmentResource, please refer to the document of RuntimeEnvironmentResource + string subscriptionId = "subid"; + string resourceGroupName = "rg"; + string automationAccountName = "myAutomationAccount9"; + string runtimeEnvironmentName = "myRuntimeEnvironmentName"; + ResourceIdentifier runtimeEnvironmentResourceId = RuntimeEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + RuntimeEnvironmentResource runtimeEnvironment = client.GetRuntimeEnvironmentResource(runtimeEnvironmentResourceId); + + // invoke the operation + RuntimeEnvironmentResource result = await runtimeEnvironment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RuntimeEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationCollection.cs index 9b8786915209..82a1c619ef54 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_SoftwareUpdateConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSoftwareUpdateConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json // this example is just showing the usage of "SoftwareUpdateConfigurations_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task CreateOrUpdate_CreateSoftwareUpdateConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSoftwareUpdateConfigurationByName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json // this example is just showing the usage of "SoftwareUpdateConfigurations_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +194,7 @@ public async Task Get_GetSoftwareUpdateConfigurationByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSoftwareUpdateConfigurationByName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json // this example is just showing the usage of "SoftwareUpdateConfigurations_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -225,7 +225,7 @@ public async Task Exists_GetSoftwareUpdateConfigurationByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSoftwareUpdateConfigurationByName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json // this example is just showing the usage of "SoftwareUpdateConfigurations_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task GetIfExists_GetSoftwareUpdateConfigurationByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSoftwareUpdateConfigurations() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurations.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurations.json // this example is just showing the usage of "SoftwareUpdateConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -301,7 +301,7 @@ public async Task GetAll_ListSoftwareUpdateConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSoftwareUpdateConfigurationsTargetingASpecificAzureVirtualMachine() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurationsByVm.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurationsByVm.json // this example is just showing the usage of "SoftwareUpdateConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationResource.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationResource.cs index ecc36a4d5865..fe22c755cb0a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SoftwareUpdateConfigurationResource.cs @@ -24,7 +24,7 @@ public partial class Sample_SoftwareUpdateConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSoftwareUpdateConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json // this example is just showing the usage of "SoftwareUpdateConfigurations_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task Update_CreateSoftwareUpdateConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSoftwareUpdateConfigurationByName() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json // this example is just showing the usage of "SoftwareUpdateConfigurations_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +188,7 @@ public async Task Get_GetSoftwareUpdateConfigurationByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSoftwareUpdateConfiguration() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/deleteSoftwareUpdateConfiguration.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/softwareUpdateConfiguration/deleteSoftwareUpdateConfiguration.json // this example is just showing the usage of "SoftwareUpdateConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index fe7c503786b2..1d84cd9beef5 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedAutomationAccountsBySubscription_GetDeletedAutomationAccount() { - // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/stable/2022-01-31/examples/getDeletedAutomationAccount.json + // Generated from example definition: specification/automation/resource-manager/Microsoft.Automation/preview/2023-05-15-preview/examples/getDeletedAutomationAccount.json // this example is just showing the usage of "deletedAutomationAccounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/ArmAutomationModelFactory.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/ArmAutomationModelFactory.cs index 0aa1aa809f9a..cba7b1721561 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/ArmAutomationModelFactory.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/ArmAutomationModelFactory.cs @@ -18,72 +18,102 @@ namespace Azure.ResourceManager.Automation.Models /// Model factory for models. public static partial class ArmAutomationModelFactory { - /// Initializes a new instance of AutomationPrivateEndpointConnectionData. + /// Initializes a new instance of DscNodeCount. + /// Gets the name of a count type. + /// + /// A new instance for mocking. + public static DscNodeCount DscNodeCount(string name = null, int? nameCount = null) + { + return new DscNodeCount(name, nameCount != null ? new DscNodeCountProperties(nameCount) : null); + } + + /// Initializes a new instance of SoftwareUpdateConfigurationData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// Private endpoint which the connection belongs to. - /// Gets the groupIds. - /// Connection State of the Private Endpoint Connection. - /// A new instance for mocking. - public static AutomationPrivateEndpointConnectionData AutomationPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, AutomationPrivateLinkServiceConnectionStateProperty connectionState = null) + /// update specific properties for the Software update configuration. + /// Schedule information for the Software update configuration. + /// Provisioning state for the software update configuration, which only appears in the response. + /// Details of provisioning error. + /// Creation time of the resource, which only appears in the response. + /// CreatedBy property, which only appears in the response. + /// Last time resource was modified, which only appears in the response. + /// LastModifiedBy property, which only appears in the response. + /// Tasks information for the Software update configuration. + /// A new instance for mocking. + public static SoftwareUpdateConfigurationData SoftwareUpdateConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SoftwareUpdateConfigurationSpecificProperties updateConfiguration = null, SoftwareUpdateConfigurationScheduleProperties scheduleInfo = null, string provisioningState = null, AutomationResponseError error = null, DateTimeOffset? createdOn = null, string createdBy = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, SoftwareUpdateConfigurationTasks tasks = null) { - groupIds ??= new List(); + return new SoftwareUpdateConfigurationData(id, name, resourceType, systemData, updateConfiguration, scheduleInfo, provisioningState, error, createdOn, createdBy, lastModifiedOn, lastModifiedBy, tasks); + } - return new AutomationPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, groupIds?.ToList(), connectionState); + /// Initializes a new instance of SoftwareUpdateConfigurationScheduleProperties. + /// Gets or sets the start time of the schedule. + /// Gets the start time's offset in minutes. + /// Gets or sets the end time of the schedule. + /// Gets or sets the expiry time's offset in minutes. + /// Gets or sets a value indicating whether this schedule is enabled. + /// Gets or sets the next run time of the schedule. + /// Gets or sets the next run time's offset in minutes. + /// Gets or sets the interval of the schedule. + /// Gets or sets the frequency of the schedule. + /// Gets or sets the time zone of the schedule. + /// Gets or sets the advanced schedule. + /// Gets or sets the creation time. + /// Gets or sets the last modified time. + /// Gets or sets the description. + /// A new instance for mocking. + public static SoftwareUpdateConfigurationScheduleProperties SoftwareUpdateConfigurationScheduleProperties(DateTimeOffset? startOn = null, double? startInMinutes = null, DateTimeOffset? expireOn = null, double? expireInMinutes = null, bool? isEnabled = null, DateTimeOffset? nextRunOn = null, double? nextRunInMinutes = null, long? interval = null, AutomationScheduleFrequency? frequency = null, string timeZone = null, AutomationAdvancedSchedule advancedSchedule = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + { + return new SoftwareUpdateConfigurationScheduleProperties(startOn, startInMinutes, expireOn, expireInMinutes, isEnabled, nextRunOn, nextRunInMinutes, interval, frequency, timeZone, advancedSchedule, createdOn, lastModifiedOn, description); } - /// Initializes a new instance of AutomationPrivateLinkServiceConnectionStateProperty. - /// The private link service connection status. - /// The private link service connection description. - /// Any action that is required beyond basic workflow (approve/ reject/ disconnect). - /// A new instance for mocking. - public static AutomationPrivateLinkServiceConnectionStateProperty AutomationPrivateLinkServiceConnectionStateProperty(string status = null, string description = null, string actionsRequired = null) + /// Initializes a new instance of SoftwareUpdateConfigurationCollectionItem. + /// Name of the software update configuration. + /// Resource Id of the software update configuration. + /// Update specific properties of the software update configuration. + /// Pre and Post Tasks defined. + /// execution frequency of the schedule associated with the software update configuration. + /// the start time of the update. + /// Creation time of the software update configuration, which only appears in the response. + /// Last time software update configuration was modified, which only appears in the response. + /// Provisioning state for the software update configuration, which only appears in the response. + /// ext run time of the update. + /// A new instance for mocking. + public static SoftwareUpdateConfigurationCollectionItem SoftwareUpdateConfigurationCollectionItem(string name = null, ResourceIdentifier id = null, SoftwareUpdateConfigurationSpecificProperties updateConfiguration = null, SoftwareUpdateConfigurationTasks tasks = null, AutomationScheduleFrequency? frequency = null, DateTimeOffset? startOn = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string provisioningState = null, DateTimeOffset? nextRunOn = null) { - return new AutomationPrivateLinkServiceConnectionStateProperty(status, description, actionsRequired); + return new SoftwareUpdateConfigurationCollectionItem(name, id, updateConfiguration, tasks, frequency, startOn, createdOn, lastModifiedOn, provisioningState, nextRunOn); } - /// Initializes a new instance of AutomationPrivateLinkResource. + /// Initializes a new instance of DeletedAutomationAccount. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The private link resource group id. - /// The private link resource required member names. - /// A new instance for mocking. - public static AutomationPrivateLinkResource AutomationPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null) + /// Gets or sets the location of the resource. + /// Gets or sets the Automation Account Resource Id. + /// Gets or sets the Automation Account Id. + /// Gets or sets the location of the resource. + /// Gets the deletion time. + /// A new instance for mocking. + public static DeletedAutomationAccount DeletedAutomationAccount(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, ResourceIdentifier automationAccountResourceId = null, string automationAccountId = null, string locationPropertiesLocation = null, DateTimeOffset? deletedOn = null) { - requiredMembers ??= new List(); - - return new AutomationPrivateLinkResource(id, name, resourceType, systemData, groupId, requiredMembers?.ToList()); + return new DeletedAutomationAccount(id, name, resourceType, systemData, location, automationAccountResourceId, automationAccountId, locationPropertiesLocation, deletedOn); } - /// Initializes a new instance of AutomationModuleData. + /// Initializes a new instance of AutomationPrivateLinkResource. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Gets or sets the etag of the resource. - /// Gets or sets the isGlobal flag of the module. - /// Gets or sets the version of the module. - /// Gets or sets the size in bytes of the module. - /// Gets or sets the activity count of the module. - /// Gets or sets the provisioning state of the module. - /// Gets or sets the contentLink of the module. - /// Gets or sets the error info of the module. - /// Gets or sets the creation time. - /// Gets or sets the last modified time. - /// Gets or sets the description. - /// Gets or sets type of module, if its composite or not. - /// A new instance for mocking. - public static AutomationModuleData AutomationModuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, bool? isGlobal = null, string version = null, long? sizeInBytes = null, int? activityCount = null, ModuleProvisioningState? provisioningState = null, AutomationContentLink contentLink = null, AutomationModuleErrorInfo error = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null, bool? isComposite = null) + /// The private link resource group id. + /// The private link resource required member names. + /// A new instance for mocking. + public static AutomationPrivateLinkResource AutomationPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string groupId = null, IEnumerable requiredMembers = null) { - tags ??= new Dictionary(); + requiredMembers ??= new List(); - return new AutomationModuleData(id, name, resourceType, systemData, tags, location, etag, isGlobal, version, sizeInBytes, activityCount, provisioningState, contentLink, error, createdOn, lastModifiedOn, description, isComposite); + return new AutomationPrivateLinkResource(id, name, resourceType, systemData, groupId, requiredMembers?.ToList()); } /// Initializes a new instance of AgentRegistration. @@ -214,194 +244,86 @@ public static DscMetaConfiguration DscMetaConfiguration(int? configurationModeFr return new DscMetaConfiguration(configurationModeFrequencyMins, rebootNodeIfNeeded, configurationMode, actionAfterReboot, certificateId, refreshFrequencyMins, allowModuleOverwrite); } - /// Initializes a new instance of DscNodeConfigurationData. + /// Initializes a new instance of AutomationAccountData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// Gets or sets the last modified time. - /// Gets or sets creation time. - /// Gets or sets the configuration of the node. - /// Source of node configuration. - /// Number of nodes with this node configuration assigned. - /// If a new build version of NodeConfiguration is required. - /// A new instance for mocking. - public static DscNodeConfigurationData DscNodeConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? createdOn = null, string configurationName = null, string source = null, long? nodeCount = null, bool? isIncrementNodeConfigurationBuildRequired = null) + /// The tags. + /// The location. + /// Gets or sets the etag of the resource. + /// Identity for the resource. + /// Gets or sets the SKU of account. + /// Gets or sets the last modified by. + /// Gets status of account. + /// Gets the creation time. + /// Gets the last modified time. + /// Gets or sets the description. + /// Encryption properties for the automation account. + /// List of Automation operations supported by the Automation resource provider. + /// Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) is allowed from the public internet. + /// Indicates whether requests using non-AAD authentication are blocked. + /// URL of automation hybrid service which is used for hybrid worker on-boarding. + /// A new instance for mocking. + public static AutomationAccountData AutomationAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedServiceIdentity identity = null, AutomationSku sku = null, string lastModifiedBy = null, AutomationAccountState? state = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null, AutomationEncryptionProperties encryption = null, IEnumerable privateEndpointConnections = null, bool? isPublicNetworkAccessAllowed = null, bool? isLocalAuthDisabled = null, Uri automationHybridServiceUri = null) { - return new DscNodeConfigurationData(id, name, resourceType, systemData, lastModifiedOn, createdOn, configurationName != null ? new DscConfigurationAssociationProperty(configurationName) : null, source, nodeCount, isIncrementNodeConfigurationBuildRequired); + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + + return new AutomationAccountData(id, name, resourceType, systemData, tags, location, etag, identity, sku, lastModifiedBy, state, createdOn, lastModifiedOn, description, encryption, privateEndpointConnections?.ToList(), isPublicNetworkAccessAllowed, isLocalAuthDisabled, automationHybridServiceUri); } - /// Initializes a new instance of DscCompilationJobData. + /// Initializes a new instance of AutomationPrivateEndpointConnectionData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// Gets or sets the configuration. - /// Gets the compilation job started by. - /// Gets the id of the job. - /// Gets the creation time of the job. - /// The current provisioning state of the job. - /// Gets or sets the runOn which specifies the group name where the job is to be executed. - /// Gets or sets the status of the job. - /// Gets or sets the status details of the job. - /// Gets the start time of the job. - /// Gets the end time of the job. - /// Gets the exception of the job. - /// Gets the last modified time of the job. - /// Gets the last status modified time of the job. - /// Gets or sets the parameters of the job. - /// A new instance for mocking. - public static DscCompilationJobData DscCompilationJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string configurationName = null, string startedBy = null, Guid? jobId = null, DateTimeOffset? createdOn = null, JobProvisioningState? provisioningState = null, string runOn = null, AutomationJobStatus? status = null, string statusDetails = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IDictionary parameters = null) - { - parameters ??= new Dictionary(); - - return new DscCompilationJobData(id, name, resourceType, systemData, configurationName != null ? new DscConfigurationAssociationProperty(configurationName) : null, startedBy, jobId, createdOn, provisioningState, runOn, status, statusDetails, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters); - } - - /// Initializes a new instance of AutomationJobStream. - /// Gets or sets the id of the resource. - /// Gets or sets the id of the job stream. - /// Gets or sets the creation time of the job. - /// Gets or sets the stream type. - /// Gets or sets the stream text. - /// Gets or sets the summary. - /// Gets or sets the values of the job stream. - /// A new instance for mocking. - public static AutomationJobStream AutomationJobStream(ResourceIdentifier id = null, string jobStreamId = null, DateTimeOffset? time = null, AutomationJobStreamType? streamType = null, string streamText = null, string summary = null, IReadOnlyDictionary value = null) + /// Private endpoint which the connection belongs to. + /// Gets the groupIds. + /// Connection State of the Private Endpoint Connection. + /// A new instance for mocking. + public static AutomationPrivateEndpointConnectionData AutomationPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier privateEndpointId = null, IEnumerable groupIds = null, AutomationPrivateLinkServiceConnectionStateProperty connectionState = null) { - value ??= new Dictionary(); + groupIds ??= new List(); - return new AutomationJobStream(id, jobStreamId, time, streamType, streamText, summary, value); + return new AutomationPrivateEndpointConnectionData(id, name, resourceType, systemData, privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, groupIds?.ToList(), connectionState); } - /// Initializes a new instance of DscNodeCount. - /// Gets the name of a count type. - /// - /// A new instance for mocking. - public static DscNodeCount DscNodeCount(string name = null, int? nameCount = null) + /// Initializes a new instance of AutomationPrivateLinkServiceConnectionStateProperty. + /// The private link service connection status. + /// The private link service connection description. + /// Any action that is required beyond basic workflow (approve/ reject/ disconnect). + /// A new instance for mocking. + public static AutomationPrivateLinkServiceConnectionStateProperty AutomationPrivateLinkServiceConnectionStateProperty(string status = null, string description = null, string actionsRequired = null) { - return new DscNodeCount(name, nameCount != null ? new DscNodeCountProperties(nameCount) : null); + return new AutomationPrivateLinkServiceConnectionStateProperty(status, description, actionsRequired); } - /// Initializes a new instance of AutomationSourceControlData. + /// Initializes a new instance of TrackedResource. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The repo url of the source control. - /// The repo branch of the source control. Include branch as empty string for VsoTfvc. - /// The folder path of the source control. - /// The auto sync of the source control. Default is false. - /// The auto publish of the source control. Default is true. - /// The source type. Must be one of VsoGit, VsoTfvc, GitHub. - /// The description. - /// The creation time. - /// The last modified time. - /// A new instance for mocking. - public static AutomationSourceControlData AutomationSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repoUri = null, string branch = null, string folderPath = null, bool? isAutoSyncEnabled = null, bool? isAutoPublishRunbookEnabled = null, SourceControlSourceType? sourceType = null, string description = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null) + /// Resource tags. + /// The geo-location where the resource lives. + /// A new instance for mocking. + public static TrackedResource TrackedResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default) { - return new AutomationSourceControlData(id, name, resourceType, systemData, repoUri, branch, folderPath, isAutoSyncEnabled, isAutoPublishRunbookEnabled, sourceType, description, createdOn, lastModifiedOn); - } + tags ??= new Dictionary(); - /// Initializes a new instance of SourceControlSyncJob. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The source control sync job id. - /// The creation time of the job. - /// The provisioning state of the job. - /// The start time of the job. - /// The end time of the job. - /// The sync type. - /// A new instance for mocking. - public static SourceControlSyncJob SourceControlSyncJob(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sourceControlSyncJobId = null, DateTimeOffset? createdOn = null, SourceControlProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, SourceControlSyncType? syncType = null) - { - return new SourceControlSyncJob(id, name, resourceType, systemData, sourceControlSyncJobId, createdOn, provisioningState, startOn, endOn, syncType); + return new TrackedResource(id, name, resourceType, systemData, tags, location); } - /// Initializes a new instance of SourceControlSyncJobResult. - /// The id of the job. - /// The source control sync job id. - /// The creation time of the job. - /// The provisioning state of the job. - /// The start time of the job. - /// The end time of the job. - /// The sync type. - /// The exceptions that occurred while running the sync job. - /// A new instance for mocking. - public static SourceControlSyncJobResult SourceControlSyncJobResult(ResourceIdentifier id = null, string sourceControlSyncJobId = null, DateTimeOffset? createdOn = null, SourceControlProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, SourceControlSyncType? syncType = null, string exception = null) + /// Initializes a new instance of AutomationAccountStatistics. + /// Gets the property value of the statistic. + /// Gets the value of the statistic. + /// Gets the startTime of the statistic. + /// Gets the endTime of the statistic. + /// Gets the id. + /// A new instance for mocking. + public static AutomationAccountStatistics AutomationAccountStatistics(string counterProperty = null, long? counterValue = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string id = null) { - return new SourceControlSyncJobResult(id, sourceControlSyncJobId, createdOn, provisioningState, startOn, endOn, syncType, exception); - } - - /// Initializes a new instance of SourceControlSyncJobStream. - /// Resource id. - /// The sync job stream id. - /// The summary of the sync job stream. - /// The time of the sync job stream. - /// The type of the sync job stream. - /// A new instance for mocking. - public static SourceControlSyncJobStream SourceControlSyncJobStream(ResourceIdentifier id = null, string sourceControlSyncJobStreamId = null, string summary = null, DateTimeOffset? time = null, SourceControlStreamType? streamType = null) - { - return new SourceControlSyncJobStream(id, sourceControlSyncJobStreamId, summary, time, streamType); - } - - /// Initializes a new instance of SourceControlSyncJobStreamResult. - /// Resource id. - /// The sync job stream id. - /// The summary of the sync job stream. - /// The time of the sync job stream. - /// The type of the sync job stream. - /// The text of the sync job stream. - /// The values of the job stream. - /// A new instance for mocking. - public static SourceControlSyncJobStreamResult SourceControlSyncJobStreamResult(ResourceIdentifier id = null, string sourceControlSyncJobStreamId = null, string summary = null, DateTimeOffset? time = null, SourceControlStreamType? streamType = null, string streamText = null, IReadOnlyDictionary value = null) - { - value ??= new Dictionary(); - - return new SourceControlSyncJobStreamResult(id, sourceControlSyncJobStreamId, summary, time, streamType, streamText, value); - } - - /// Initializes a new instance of AutomationAccountData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Gets or sets the etag of the resource. - /// Identity for the resource. - /// Gets or sets the SKU of account. - /// Gets or sets the last modified by. - /// Gets status of account. - /// Gets the creation time. - /// Gets the last modified time. - /// Gets or sets the description. - /// Encryption properties for the automation account. - /// List of Automation operations supported by the Automation resource provider. - /// Indicates whether traffic on the non-ARM endpoint (Webhook/Agent) is allowed from the public internet. - /// Indicates whether requests using non-AAD authentication are blocked. - /// URL of automation hybrid service which is used for hybrid worker on-boarding. - /// A new instance for mocking. - public static AutomationAccountData AutomationAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedServiceIdentity identity = null, AutomationSku sku = null, string lastModifiedBy = null, AutomationAccountState? state = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null, AutomationEncryptionProperties encryption = null, IEnumerable privateEndpointConnections = null, bool? isPublicNetworkAccessAllowed = null, bool? isLocalAuthDisabled = null, Uri automationHybridServiceUri = null) - { - tags ??= new Dictionary(); - privateEndpointConnections ??= new List(); - - return new AutomationAccountData(id, name, resourceType, systemData, tags, location, etag, identity, sku, lastModifiedBy, state, createdOn, lastModifiedOn, description, encryption, privateEndpointConnections?.ToList(), isPublicNetworkAccessAllowed, isLocalAuthDisabled, automationHybridServiceUri); - } - - /// Initializes a new instance of AutomationAccountStatistics. - /// Gets the property value of the statistic. - /// Gets the value of the statistic. - /// Gets the startTime of the statistic. - /// Gets the endTime of the statistic. - /// Gets the id. - /// A new instance for mocking. - public static AutomationAccountStatistics AutomationAccountStatistics(string counterProperty = null, long? counterValue = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string id = null) - { - return new AutomationAccountStatistics(counterProperty, counterValue, startOn, endOn, id); + return new AutomationAccountStatistics(counterProperty, counterValue, startOn, endOn, id); } /// Initializes a new instance of AutomationUsage. @@ -436,6 +358,22 @@ public static AutomationKey AutomationKey(AutomationKeyName? keyName = null, Aut return new AutomationKey(keyName, permissions, value); } + /// Initializes a new instance of DeletedRunbook. + /// The resource id. + /// Gets or sets name of the resource. + /// Gets or sets the location of the resource. + /// Gets or sets the Runbook Id. + /// Type of the runbook. + /// Gets or sets runtime of the runbook. + /// Environment of the runbook. + /// Gets or sets the creation time. + /// Gets or sets the last modified time. + /// A new instance for mocking. + public static DeletedRunbook DeletedRunbook(string id = null, string name = null, AzureLocation? location = null, string runbookId = null, string runbookType = null, string runtime = null, string runtimeEnvironment = null, DateTimeOffset? createdOn = null, DateTimeOffset? deletedOn = null) + { + return new DeletedRunbook(id, name, location, runbookId, runbookType, runtime, runtimeEnvironment, createdOn, deletedOn); + } + /// Initializes a new instance of AutomationCertificateData. /// The id. /// The name. @@ -504,6 +442,181 @@ public static AutomationCredentialData AutomationCredentialData(ResourceIdentifi return new AutomationCredentialData(id, name, resourceType, systemData, userName, createdOn, lastModifiedOn, description); } + /// Initializes a new instance of DscCompilationJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the configuration. + /// Gets the compilation job started by. + /// Gets the id of the job. + /// Gets the creation time of the job. + /// The current provisioning state of the job. + /// Gets or sets the runOn which specifies the group name where the job is to be executed. + /// Gets or sets the status of the job. + /// Gets or sets the status details of the job. + /// Gets the start time of the job. + /// Gets the end time of the job. + /// Gets the exception of the job. + /// Gets the last modified time of the job. + /// Gets the last status modified time of the job. + /// Gets or sets the parameters of the job. + /// A new instance for mocking. + public static DscCompilationJobData DscCompilationJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string configurationName = null, string startedBy = null, Guid? jobId = null, DateTimeOffset? createdOn = null, JobProvisioningState? provisioningState = null, string runOn = null, AutomationJobStatus? status = null, string statusDetails = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IDictionary parameters = null) + { + parameters ??= new Dictionary(); + + return new DscCompilationJobData(id, name, resourceType, systemData, configurationName != null ? new DscConfigurationAssociationProperty(configurationName) : null, startedBy, jobId, createdOn, provisioningState, runOn, status, statusDetails, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters); + } + + /// Initializes a new instance of AutomationJobStream. + /// Gets or sets the id of the resource. + /// Gets or sets the id of the job stream. + /// Gets or sets the creation time of the job. + /// Gets or sets the stream type. + /// Gets or sets the stream text. + /// Gets or sets the summary. + /// Gets or sets the values of the job stream. + /// A new instance for mocking. + public static AutomationJobStream AutomationJobStream(ResourceIdentifier id = null, string jobStreamId = null, DateTimeOffset? time = null, AutomationJobStreamType? streamType = null, string streamText = null, string summary = null, IReadOnlyDictionary value = null) + { + value ??= new Dictionary(); + + return new AutomationJobStream(id, jobStreamId, time, streamType, streamText, summary, value); + } + + /// Initializes a new instance of DscConfigurationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Gets or sets the etag of the resource. + /// Gets or sets the provisioning state of the configuration. + /// Gets or sets the job count of the configuration. + /// Gets or sets the configuration parameters. + /// Gets or sets the source. + /// Gets or sets the state of the configuration. + /// Gets or sets verbose log option. + /// Gets or sets the creation time. + /// Gets or sets the last modified time. + /// Gets the number of compiled node configurations. + /// Gets or sets the description. + /// A new instance for mocking. + public static DscConfigurationData DscConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, DscConfigurationProvisioningState? provisioningState = null, int? jobCount = null, IDictionary parameters = null, AutomationContentSource source = null, DscConfigurationState? state = null, bool? isLogVerboseEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, int? nodeConfigurationCount = null, string description = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + + return new DscConfigurationData(id, name, resourceType, systemData, tags, location, etag, provisioningState, jobCount, parameters, source, state, isLogVerboseEnabled, createdOn, lastModifiedOn, nodeConfigurationCount, description); + } + + /// Initializes a new instance of DscNodeConfigurationData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the last modified time. + /// Gets or sets creation time. + /// Gets or sets the configuration of the node. + /// Source of node configuration. + /// Number of nodes with this node configuration assigned. + /// If a new build version of NodeConfiguration is required. + /// A new instance for mocking. + public static DscNodeConfigurationData DscNodeConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? createdOn = null, string configurationName = null, string source = null, long? nodeCount = null, bool? isIncrementNodeConfigurationBuildRequired = null) + { + return new DscNodeConfigurationData(id, name, resourceType, systemData, lastModifiedOn, createdOn, configurationName != null ? new DscConfigurationAssociationProperty(configurationName) : null, source, nodeCount, isIncrementNodeConfigurationBuildRequired); + } + + /// Initializes a new instance of HybridRunbookWorkerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Gets or sets the assigned machine IP address. + /// Gets or sets the registration time of the worker machine. + /// Last Heartbeat from the Worker. + /// Azure Resource Manager Id for a virtual machine. + /// Type of the HybridWorker. + /// Name of the HybridWorker. + /// A new instance for mocking. + public static HybridRunbookWorkerData HybridRunbookWorkerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string ip = null, DateTimeOffset? registeredOn = null, DateTimeOffset? lastSeenOn = null, ResourceIdentifier vmResourceId = null, HybridWorkerType? workerType = null, string workerName = null) + { + tags ??= new Dictionary(); + + return new HybridRunbookWorkerData(id, name, resourceType, systemData, tags, location, ip, registeredOn, lastSeenOn, vmResourceId, workerType, workerName); + } + + /// Initializes a new instance of HybridRunbookWorkerGroupData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Type of the HybridWorkerGroup. + /// Sets the credential of a worker group. + /// A new instance for mocking. + public static HybridRunbookWorkerGroupData HybridRunbookWorkerGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, HybridWorkerGroup? groupType = null, string credentialName = null) + { + tags ??= new Dictionary(); + + return new HybridRunbookWorkerGroupData(id, name, resourceType, systemData, tags, location, groupType, credentialName != null ? new RunAsCredentialAssociationProperty(credentialName) : null); + } + + /// Initializes a new instance of AutomationJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the runbook. + /// Gets or sets the job started by. + /// Gets or sets the runOn which specifies the group name where the job is to be executed. + /// Runtime Environment Property. + /// Gets or sets the id of the job. + /// Gets or sets the creation time of the job. + /// Gets or sets the status of the job. + /// Gets or sets the status details of the job. + /// Gets or sets the start time of the job. + /// Gets or sets the end time of the job. + /// Gets or sets the exception of the job. + /// Gets or sets the last modified time of the job. + /// Gets or sets the last status modified time of the job. + /// Gets or sets the parameters of the job. + /// The current provisioning state of the job. + /// A new instance for mocking. + public static AutomationJobData AutomationJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runbookName = null, string startedBy = null, string runOn = null, string runtimeEnvironmentName = null, Guid? jobId = null, DateTimeOffset? createdOn = null, AutomationJobStatus? status = null, string statusDetails = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IDictionary parameters = null, JobProvisioningState? provisioningState = null) + { + parameters ??= new Dictionary(); + + return new AutomationJobData(id, name, resourceType, systemData, runbookName != null ? new RunbookAssociationProperty(runbookName) : null, startedBy, runOn, runtimeEnvironmentName != null ? new JobRuntimeEnvironment(runtimeEnvironmentName) : null, jobId, createdOn, status, statusDetails, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters, provisioningState); + } + + /// Initializes a new instance of AutomationJobCollectionItemData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The runbook association. + /// The id of the job. + /// Gets or sets the job started by. + /// The creation time of the job. + /// The status of the job. + /// The start time of the job. + /// The end time of the job. + /// The last modified time of the job. + /// The provisioning state of a resource. + /// Runtime Environment Property. + /// Specifies the runOn group name where the job was executed. + /// A new instance for mocking. + public static AutomationJobCollectionItemData AutomationJobCollectionItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runbookName = null, Guid? jobId = null, string startedBy = null, DateTimeOffset? createdOn = null, AutomationJobStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? lastModifiedOn = null, string provisioningState = null, string runtimeEnvironmentName = null, string runOn = null) + { + return new AutomationJobCollectionItemData(id, name, resourceType, systemData, runbookName != null ? new RunbookAssociationProperty(runbookName) : null, jobId, startedBy, createdOn, status, startOn, endOn, lastModifiedOn, provisioningState, runtimeEnvironmentName != null ? new JobRuntimeEnvironment(runtimeEnvironmentName) : null, runOn); + } + /// Initializes a new instance of AutomationJobScheduleData. /// The id. /// The name. @@ -595,83 +708,74 @@ public static AutomationActivityOutputType AutomationActivityOutputType(string n return new AutomationActivityOutputType(name, activityOutputType); } - /// Initializes a new instance of AutomationModuleField. - /// Gets or sets the name of the field. - /// Gets or sets the type of the field. - /// A new instance for mocking. - public static AutomationModuleField AutomationModuleField(string name = null, string fieldType = null) - { - return new AutomationModuleField(name, fieldType); - } - - /// Initializes a new instance of AutomationScheduleData. + /// Initializes a new instance of AutomationModuleData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// Gets or sets the start time of the schedule. - /// Gets the start time's offset in minutes. - /// Gets or sets the end time of the schedule. - /// Gets or sets the expiry time's offset in minutes. - /// Gets or sets a value indicating whether this schedule is enabled. - /// Gets or sets the next run time of the schedule. - /// Gets or sets the next run time's offset in minutes. - /// Gets or sets the interval of the schedule. - /// Gets or sets the frequency of the schedule. - /// Gets or sets the time zone of the schedule. - /// Gets or sets the advanced schedule. + /// The tags. + /// The location. + /// Gets or sets the etag of the resource. + /// Gets or sets the isGlobal flag of the module. + /// Gets or sets the version of the module. + /// Gets or sets the size in bytes of the module. + /// Gets or sets the activity count of the module. + /// Gets or sets the provisioning state of the module. + /// Gets or sets the contentLink of the module. + /// Gets or sets the error info of the module. /// Gets or sets the creation time. /// Gets or sets the last modified time. /// Gets or sets the description. - /// A new instance for mocking. - public static AutomationScheduleData AutomationScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, double? startInMinutes = null, DateTimeOffset? expireOn = null, double? expireInMinutes = null, bool? isEnabled = null, DateTimeOffset? nextRunOn = null, double? nextRunInMinutes = null, BinaryData interval = null, AutomationScheduleFrequency? frequency = null, string timeZone = null, AutomationAdvancedSchedule advancedSchedule = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + /// Gets or sets type of module, if its composite or not. + /// A new instance for mocking. + public static AutomationModuleData AutomationModuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, bool? isGlobal = null, string version = null, long? sizeInBytes = null, int? activityCount = null, ModuleProvisioningState? provisioningState = null, AutomationContentLink contentLink = null, AutomationModuleErrorInfo error = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null, bool? isComposite = null) { - return new AutomationScheduleData(id, name, resourceType, systemData, startOn, startInMinutes, expireOn, expireInMinutes, isEnabled, nextRunOn, nextRunInMinutes, interval, frequency, timeZone, advancedSchedule, createdOn, lastModifiedOn, description); + tags ??= new Dictionary(); + + return new AutomationModuleData(id, name, resourceType, systemData, tags, location, etag, isGlobal, version, sizeInBytes, activityCount, provisioningState, contentLink, error, createdOn, lastModifiedOn, description, isComposite); } - /// Initializes a new instance of AutomationVariableData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets or sets the value of the variable. - /// Gets or sets the encrypted flag of the variable. - /// Gets or sets the creation time. - /// Gets or sets the last modified time. - /// Gets or sets the description. - /// A new instance for mocking. - public static AutomationVariableData AutomationVariableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, bool? isEncrypted = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + /// Initializes a new instance of AutomationModuleField. + /// Gets or sets the name of the field. + /// Gets or sets the type of the field. + /// A new instance for mocking. + public static AutomationModuleField AutomationModuleField(string name = null, string fieldType = null) { - return new AutomationVariableData(id, name, resourceType, systemData, value, isEncrypted, createdOn, lastModifiedOn, description); + return new AutomationModuleField(name, fieldType); } - /// Initializes a new instance of AutomationWatcherData. + /// Initializes a new instance of PackageData. /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Gets or sets the etag of the resource. - /// Gets or sets the frequency at which the watcher is invoked. - /// Gets or sets the name of the script the watcher is attached to, i.e. the name of an existing runbook. - /// Gets or sets the parameters of the script. - /// Gets or sets the name of the hybrid worker group the watcher will run on. - /// Gets the current status of the watcher. - /// Gets or sets the creation time. - /// Gets or sets the last modified time. - /// Details of the user who last modified the watcher. - /// Gets or sets the description. - /// A new instance for mocking. - public static AutomationWatcherData AutomationWatcherData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, long? executionFrequencyInSeconds = null, string scriptName = null, IDictionary scriptParameters = null, string scriptRunOn = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, string description = null) + /// Gets or sets the isGlobal flag of the package. + /// Gets or sets the version of the Package. + /// Gets or sets the size in bytes of the Package. + /// Gets or sets the provisioning state of the Package. + /// Gets or sets the contentLink of the Package. + /// Gets or sets the error info of the Package. + /// Metadata pertaining to creation and last modification of the resource. + /// A new instance for mocking. + public static PackageData PackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, bool? @default = null, string version = null, long? sizeInBytes = null, PackageProvisioningState? provisioningState = null, AutomationContentLink contentLink = null, PackageErrorInfo error = null, SystemData allOf = null) { tags ??= new Dictionary(); - scriptParameters ??= new Dictionary(); - return new AutomationWatcherData(id, name, resourceType, systemData, tags, location, etag, executionFrequencyInSeconds, scriptName, scriptParameters, scriptRunOn, status, createdOn, lastModifiedOn, lastModifiedBy, description); + return new PackageData(id, name, resourceType, systemData, tags, location, @default, version, sizeInBytes, provisioningState, contentLink, error, allOf); } - /// Initializes a new instance of DscConfigurationData. + /// Initializes a new instance of RunbookDraftUndoEditResult. + /// + /// + /// A new instance for mocking. + public static RunbookDraftUndoEditResult RunbookDraftUndoEditResult(AutomationHttpStatusCode? statusCode = null, string requestId = null) + { + return new RunbookDraftUndoEditResult(statusCode, requestId); + } + + /// Initializes a new instance of AutomationRunbookData. /// The id. /// The name. /// The resourceType. @@ -679,93 +783,77 @@ public static AutomationWatcherData AutomationWatcherData(ResourceIdentifier id /// The tags. /// The location. /// Gets or sets the etag of the resource. - /// Gets or sets the provisioning state of the configuration. - /// Gets or sets the job count of the configuration. - /// Gets or sets the configuration parameters. - /// Gets or sets the source. - /// Gets or sets the state of the configuration. + /// Runtime Environment of the runbook execution. + /// Gets or sets the type of the runbook. + /// Gets or sets the published runbook content link. + /// Gets or sets the state of the runbook. /// Gets or sets verbose log option. + /// Gets or sets progress log option. + /// Gets or sets the option to log activity trace of the runbook. + /// Gets or sets the job count of the runbook. + /// Gets or sets the runbook parameters. + /// Gets or sets the runbook output types. + /// Gets or sets the draft runbook properties. + /// Gets or sets the provisioning state of the runbook. + /// Gets or sets the last modified by. /// Gets or sets the creation time. /// Gets or sets the last modified time. - /// Gets the number of compiled node configurations. /// Gets or sets the description. - /// A new instance for mocking. - public static DscConfigurationData DscConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, DscConfigurationProvisioningState? provisioningState = null, int? jobCount = null, IDictionary parameters = null, AutomationContentSource source = null, DscConfigurationState? state = null, bool? isLogVerboseEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, int? nodeConfigurationCount = null, string description = null) + /// A new instance for mocking. + public static AutomationRunbookData AutomationRunbookData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, string runtimeEnvironment = null, AutomationRunbookType? runbookType = null, AutomationContentLink publishContentLink = null, RunbookState? state = null, bool? isLogVerboseEnabled = null, bool? isLogProgressEnabled = null, int? logActivityTrace = null, int? jobCount = null, IDictionary parameters = null, IEnumerable outputTypes = null, AutomationRunbookDraft draft = null, RunbookProvisioningState? provisioningState = null, string lastModifiedBy = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) { tags ??= new Dictionary(); - parameters ??= new Dictionary(); + parameters ??= new Dictionary(); + outputTypes ??= new List(); - return new DscConfigurationData(id, name, resourceType, systemData, tags, location, etag, provisioningState, jobCount, parameters, source, state, isLogVerboseEnabled, createdOn, lastModifiedOn, nodeConfigurationCount, description); + return new AutomationRunbookData(id, name, resourceType, systemData, tags, location, etag, runtimeEnvironment, runbookType, publishContentLink, state, isLogVerboseEnabled, isLogProgressEnabled, logActivityTrace, jobCount, parameters, outputTypes?.ToList(), draft, provisioningState, lastModifiedBy, createdOn, lastModifiedOn, description); } - /// Initializes a new instance of AutomationJobData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets or sets the runbook. - /// Gets or sets the job started by. + /// Initializes a new instance of RunbookTestJob. + /// Gets or sets the creation time of the test job. + /// Gets or sets the status of the test job. + /// Gets or sets the status details of the test job. /// Gets or sets the runOn which specifies the group name where the job is to be executed. - /// Gets or sets the id of the job. - /// Gets or sets the creation time of the job. - /// Gets or sets the status of the job. - /// Gets or sets the status details of the job. - /// Gets or sets the start time of the job. - /// Gets or sets the end time of the job. - /// Gets or sets the exception of the job. - /// Gets or sets the last modified time of the job. - /// Gets or sets the last status modified time of the job. - /// Gets or sets the parameters of the job. - /// The current provisioning state of the job. - /// A new instance for mocking. - public static AutomationJobData AutomationJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runbookName = null, string startedBy = null, string runOn = null, Guid? jobId = null, DateTimeOffset? createdOn = null, AutomationJobStatus? status = null, string statusDetails = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IDictionary parameters = null, JobProvisioningState? provisioningState = null) + /// Gets or sets the start time of the test job. + /// Gets or sets the end time of the test job. + /// Gets or sets the exception of the test job. + /// Gets or sets the last modified time of the test job. + /// Gets or sets the last status modified time of the test job. + /// Gets or sets the parameters of the test job. + /// The activity-level tracing options of the runbook. + /// A new instance for mocking. + public static RunbookTestJob RunbookTestJob(DateTimeOffset? createdOn = null, string status = null, string statusDetails = null, string runOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IReadOnlyDictionary parameters = null, int? logActivityTrace = null) { parameters ??= new Dictionary(); - return new AutomationJobData(id, name, resourceType, systemData, runbookName != null ? new RunbookAssociationProperty(runbookName) : null, startedBy, runOn, jobId, createdOn, status, statusDetails, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters, provisioningState); + return new RunbookTestJob(createdOn, status, statusDetails, runOn, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters, logActivityTrace); } - /// Initializes a new instance of AutomationJobCollectionItemData. + /// Initializes a new instance of RuntimeEnvironmentData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// The runbook association. - /// The id of the job. - /// The creation time of the job. - /// The status of the job. - /// The start time of the job. - /// The end time of the job. - /// The last modified time of the job. - /// The provisioning state of a resource. - /// Specifies the runOn group name where the job was executed. - /// A new instance for mocking. - public static AutomationJobCollectionItemData AutomationJobCollectionItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string runbookName = null, Guid? jobId = null, DateTimeOffset? createdOn = null, AutomationJobStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? lastModifiedOn = null, string provisioningState = null, string runOn = null) + /// The tags. + /// The location. + /// List of Default packages for Environment. + /// Gets or sets the description. + /// Language of Runtime Environment. + /// Version of Language. + /// A new instance for mocking. + public static RuntimeEnvironmentData RuntimeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IDictionary defaultPackages = null, string description = null, string language = null, string version = null) { - return new AutomationJobCollectionItemData(id, name, resourceType, systemData, runbookName != null ? new RunbookAssociationProperty(runbookName) : null, jobId, createdOn, status, startOn, endOn, lastModifiedOn, provisioningState, runOn); + tags ??= new Dictionary(); + defaultPackages ??= new Dictionary(); + + return new RuntimeEnvironmentData(id, name, resourceType, systemData, tags, location, defaultPackages, description, language, version); } - /// Initializes a new instance of SoftwareUpdateConfigurationData. + /// Initializes a new instance of AutomationScheduleData. /// The id. /// The name. /// The resourceType. /// The systemData. - /// update specific properties for the Software update configuration. - /// Schedule information for the Software update configuration. - /// Provisioning state for the software update configuration, which only appears in the response. - /// Details of provisioning error. - /// Creation time of the resource, which only appears in the response. - /// CreatedBy property, which only appears in the response. - /// Last time resource was modified, which only appears in the response. - /// LastModifiedBy property, which only appears in the response. - /// Tasks information for the Software update configuration. - /// A new instance for mocking. - public static SoftwareUpdateConfigurationData SoftwareUpdateConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SoftwareUpdateConfigurationSpecificProperties updateConfiguration = null, SoftwareUpdateConfigurationScheduleProperties scheduleInfo = null, string provisioningState = null, AutomationResponseError error = null, DateTimeOffset? createdOn = null, string createdBy = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, SoftwareUpdateConfigurationTasks tasks = null) - { - return new SoftwareUpdateConfigurationData(id, name, resourceType, systemData, updateConfiguration, scheduleInfo, provisioningState, error, createdOn, createdBy, lastModifiedOn, lastModifiedBy, tasks); - } - - /// Initializes a new instance of SoftwareUpdateConfigurationScheduleProperties. /// Gets or sets the start time of the schedule. /// Gets the start time's offset in minutes. /// Gets or sets the end time of the schedule. @@ -780,27 +868,35 @@ public static SoftwareUpdateConfigurationData SoftwareUpdateConfigurationData(Re /// Gets or sets the creation time. /// Gets or sets the last modified time. /// Gets or sets the description. - /// A new instance for mocking. - public static SoftwareUpdateConfigurationScheduleProperties SoftwareUpdateConfigurationScheduleProperties(DateTimeOffset? startOn = null, double? startInMinutes = null, DateTimeOffset? expireOn = null, double? expireInMinutes = null, bool? isEnabled = null, DateTimeOffset? nextRunOn = null, double? nextRunInMinutes = null, long? interval = null, AutomationScheduleFrequency? frequency = null, string timeZone = null, AutomationAdvancedSchedule advancedSchedule = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + /// A new instance for mocking. + public static AutomationScheduleData AutomationScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, double? startInMinutes = null, DateTimeOffset? expireOn = null, double? expireInMinutes = null, bool? isEnabled = null, DateTimeOffset? nextRunOn = null, double? nextRunInMinutes = null, BinaryData interval = null, AutomationScheduleFrequency? frequency = null, string timeZone = null, AutomationAdvancedSchedule advancedSchedule = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) { - return new SoftwareUpdateConfigurationScheduleProperties(startOn, startInMinutes, expireOn, expireInMinutes, isEnabled, nextRunOn, nextRunInMinutes, interval, frequency, timeZone, advancedSchedule, createdOn, lastModifiedOn, description); + return new AutomationScheduleData(id, name, resourceType, systemData, startOn, startInMinutes, expireOn, expireInMinutes, isEnabled, nextRunOn, nextRunInMinutes, interval, frequency, timeZone, advancedSchedule, createdOn, lastModifiedOn, description); } - /// Initializes a new instance of SoftwareUpdateConfigurationCollectionItem. - /// Name of the software update configuration. - /// Resource Id of the software update configuration. - /// Update specific properties of the software update configuration. - /// Pre and Post Tasks defined. - /// execution frequency of the schedule associated with the software update configuration. - /// the start time of the update. - /// Creation time of the software update configuration, which only appears in the response. - /// Last time software update configuration was modified, which only appears in the response. - /// Provisioning state for the software update configuration, which only appears in the response. - /// ext run time of the update. - /// A new instance for mocking. - public static SoftwareUpdateConfigurationCollectionItem SoftwareUpdateConfigurationCollectionItem(string name = null, ResourceIdentifier id = null, SoftwareUpdateConfigurationSpecificProperties updateConfiguration = null, SoftwareUpdateConfigurationTasks tasks = null, AutomationScheduleFrequency? frequency = null, DateTimeOffset? startOn = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string provisioningState = null, DateTimeOffset? nextRunOn = null) + /// Initializes a new instance of SoftwareUpdateConfigurationMachineRun. + /// Name of the software update configuration machine run. + /// Resource Id of the software update configuration machine run. + /// name of the updated computer. + /// type of the updated computer. + /// software update configuration triggered this run. + /// Status of the software update configuration machine run. + /// Operating system target of the software update configuration triggered this run. + /// correlation id of the software update configuration machine run. + /// source computer id of the software update configuration machine run. + /// Start time of the software update configuration machine run. + /// End time of the software update configuration machine run. + /// configured duration for the software update configuration run. + /// Job associated with the software update configuration machine run. + /// Creation time of the resource, which only appears in the response. + /// createdBy property, which only appears in the response. + /// Last time resource was modified, which only appears in the response. + /// lastModifiedBy property, which only appears in the response. + /// Details of provisioning error. + /// A new instance for mocking. + public static SoftwareUpdateConfigurationMachineRun SoftwareUpdateConfigurationMachineRun(string name = null, ResourceIdentifier id = null, ResourceIdentifier targetComputerId = null, string targetComputerType = null, string softwareUpdateName = null, string status = null, string osType = null, Guid? correlationId = null, Guid? sourceComputerId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, TimeSpan? configuredDuration = null, Guid? jobId = null, DateTimeOffset? createdOn = null, string createdBy = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, AutomationResponseError error = null) { - return new SoftwareUpdateConfigurationCollectionItem(name, id, updateConfiguration, tasks, frequency, startOn, createdOn, lastModifiedOn, provisioningState, nextRunOn); + return new SoftwareUpdateConfigurationMachineRun(name, id, targetComputerId, targetComputerType, softwareUpdateName != null ? new SoftwareUpdateConfigurationNavigation(softwareUpdateName) : null, status, osType, correlationId, sourceComputerId, startOn, endOn, configuredDuration, jobId != null ? new JobNavigation(jobId) : null, createdOn, createdBy, lastModifiedOn, lastModifiedBy, error); } /// Initializes a new instance of SoftwareUpdateConfigurationRun. @@ -844,41 +940,103 @@ public static SoftwareUpdateConfigurationRunTaskProperties SoftwareUpdateConfigu return new SoftwareUpdateConfigurationRunTaskProperties(status, source, jobId); } - /// Initializes a new instance of SoftwareUpdateConfigurationMachineRun. - /// Name of the software update configuration machine run. - /// Resource Id of the software update configuration machine run. - /// name of the updated computer. - /// type of the updated computer. - /// software update configuration triggered this run. - /// Status of the software update configuration machine run. - /// Operating system target of the software update configuration triggered this run. - /// correlation id of the software update configuration machine run. - /// source computer id of the software update configuration machine run. - /// Start time of the software update configuration machine run. - /// End time of the software update configuration machine run. - /// configured duration for the software update configuration run. - /// Job associated with the software update configuration machine run. - /// Creation time of the resource, which only appears in the response. - /// createdBy property, which only appears in the response. - /// Last time resource was modified, which only appears in the response. - /// lastModifiedBy property, which only appears in the response. - /// Details of provisioning error. - /// A new instance for mocking. - public static SoftwareUpdateConfigurationMachineRun SoftwareUpdateConfigurationMachineRun(string name = null, ResourceIdentifier id = null, ResourceIdentifier targetComputerId = null, string targetComputerType = null, string softwareUpdateName = null, string status = null, string osType = null, Guid? correlationId = null, Guid? sourceComputerId = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, TimeSpan? configuredDuration = null, Guid? jobId = null, DateTimeOffset? createdOn = null, string createdBy = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, AutomationResponseError error = null) + /// Initializes a new instance of AutomationSourceControlData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The repo url of the source control. + /// The repo branch of the source control. Include branch as empty string for VsoTfvc. + /// The folder path of the source control. + /// The auto sync of the source control. Default is false. + /// The auto publish of the source control. Default is true. + /// The source type. Must be one of VsoGit, VsoTfvc, GitHub. + /// The description. + /// The creation time. + /// The last modified time. + /// A new instance for mocking. + public static AutomationSourceControlData AutomationSourceControlData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Uri repoUri = null, string branch = null, string folderPath = null, bool? isAutoSyncEnabled = null, bool? isAutoPublishRunbookEnabled = null, SourceControlSourceType? sourceType = null, string description = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null) { - return new SoftwareUpdateConfigurationMachineRun(name, id, targetComputerId, targetComputerType, softwareUpdateName != null ? new SoftwareUpdateConfigurationNavigation(softwareUpdateName) : null, status, osType, correlationId, sourceComputerId, startOn, endOn, configuredDuration, jobId != null ? new JobNavigation(jobId) : null, createdOn, createdBy, lastModifiedOn, lastModifiedBy, error); + return new AutomationSourceControlData(id, name, resourceType, systemData, repoUri, branch, folderPath, isAutoSyncEnabled, isAutoPublishRunbookEnabled, sourceType, description, createdOn, lastModifiedOn); } - /// Initializes a new instance of RunbookDraftUndoEditResult. - /// - /// - /// A new instance for mocking. - public static RunbookDraftUndoEditResult RunbookDraftUndoEditResult(AutomationHttpStatusCode? statusCode = null, string requestId = null) + /// Initializes a new instance of SourceControlSyncJob. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The source control sync job id. + /// The creation time of the job. + /// The provisioning state of the job. + /// The start time of the job. + /// The end time of the job. + /// The sync type. + /// A new instance for mocking. + public static SourceControlSyncJob SourceControlSyncJob(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string sourceControlSyncJobId = null, DateTimeOffset? createdOn = null, SourceControlProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, SourceControlSyncType? syncType = null) { - return new RunbookDraftUndoEditResult(statusCode, requestId); + return new SourceControlSyncJob(id, name, resourceType, systemData, sourceControlSyncJobId, createdOn, provisioningState, startOn, endOn, syncType); } - /// Initializes a new instance of AutomationRunbookData. + /// Initializes a new instance of SourceControlSyncJobResult. + /// The id of the job. + /// The source control sync job id. + /// The creation time of the job. + /// The provisioning state of the job. + /// The start time of the job. + /// The end time of the job. + /// The sync type. + /// The exceptions that occurred while running the sync job. + /// A new instance for mocking. + public static SourceControlSyncJobResult SourceControlSyncJobResult(ResourceIdentifier id = null, string sourceControlSyncJobId = null, DateTimeOffset? createdOn = null, SourceControlProvisioningState? provisioningState = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, SourceControlSyncType? syncType = null, string exception = null) + { + return new SourceControlSyncJobResult(id, sourceControlSyncJobId, createdOn, provisioningState, startOn, endOn, syncType, exception); + } + + /// Initializes a new instance of SourceControlSyncJobStream. + /// Resource id. + /// The sync job stream id. + /// The summary of the sync job stream. + /// The time of the sync job stream. + /// The type of the sync job stream. + /// A new instance for mocking. + public static SourceControlSyncJobStream SourceControlSyncJobStream(ResourceIdentifier id = null, string sourceControlSyncJobStreamId = null, string summary = null, DateTimeOffset? time = null, SourceControlStreamType? streamType = null) + { + return new SourceControlSyncJobStream(id, sourceControlSyncJobStreamId, summary, time, streamType); + } + + /// Initializes a new instance of SourceControlSyncJobStreamResult. + /// Resource id. + /// The sync job stream id. + /// The summary of the sync job stream. + /// The time of the sync job stream. + /// The type of the sync job stream. + /// The text of the sync job stream. + /// The values of the job stream. + /// A new instance for mocking. + public static SourceControlSyncJobStreamResult SourceControlSyncJobStreamResult(ResourceIdentifier id = null, string sourceControlSyncJobStreamId = null, string summary = null, DateTimeOffset? time = null, SourceControlStreamType? streamType = null, string streamText = null, IReadOnlyDictionary value = null) + { + value ??= new Dictionary(); + + return new SourceControlSyncJobStreamResult(id, sourceControlSyncJobStreamId, summary, time, streamType, streamText, value); + } + + /// Initializes a new instance of AutomationVariableData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the value of the variable. + /// Gets or sets the encrypted flag of the variable. + /// Gets or sets the creation time. + /// Gets or sets the last modified time. + /// Gets or sets the description. + /// A new instance for mocking. + public static AutomationVariableData AutomationVariableData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, bool? isEncrypted = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + { + return new AutomationVariableData(id, name, resourceType, systemData, value, isEncrypted, createdOn, lastModifiedOn, description); + } + + /// Initializes a new instance of AutomationWatcherData. /// The id. /// The name. /// The resourceType. @@ -886,49 +1044,22 @@ public static RunbookDraftUndoEditResult RunbookDraftUndoEditResult(AutomationHt /// The tags. /// The location. /// Gets or sets the etag of the resource. - /// Gets or sets the type of the runbook. - /// Gets or sets the published runbook content link. - /// Gets or sets the state of the runbook. - /// Gets or sets verbose log option. - /// Gets or sets progress log option. - /// Gets or sets the option to log activity trace of the runbook. - /// Gets or sets the job count of the runbook. - /// Gets or sets the runbook parameters. - /// Gets or sets the runbook output types. - /// Gets or sets the draft runbook properties. - /// Gets or sets the provisioning state of the runbook. - /// Gets or sets the last modified by. + /// Gets or sets the frequency at which the watcher is invoked. + /// Gets or sets the name of the script the watcher is attached to, i.e. the name of an existing runbook. + /// Gets or sets the parameters of the script. + /// Gets or sets the name of the hybrid worker group the watcher will run on. + /// Gets the current status of the watcher. /// Gets or sets the creation time. /// Gets or sets the last modified time. + /// Details of the user who last modified the watcher. /// Gets or sets the description. - /// A new instance for mocking. - public static AutomationRunbookData AutomationRunbookData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, AutomationRunbookType? runbookType = null, AutomationContentLink publishContentLink = null, RunbookState? state = null, bool? isLogVerboseEnabled = null, bool? isLogProgressEnabled = null, int? logActivityTrace = null, int? jobCount = null, IDictionary parameters = null, IEnumerable outputTypes = null, AutomationRunbookDraft draft = null, RunbookProvisioningState? provisioningState = null, string lastModifiedBy = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string description = null) + /// A new instance for mocking. + public static AutomationWatcherData AutomationWatcherData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, long? executionFrequencyInSeconds = null, string scriptName = null, IDictionary scriptParameters = null, string scriptRunOn = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, string lastModifiedBy = null, string description = null) { tags ??= new Dictionary(); - parameters ??= new Dictionary(); - outputTypes ??= new List(); - - return new AutomationRunbookData(id, name, resourceType, systemData, tags, location, etag, runbookType, publishContentLink, state, isLogVerboseEnabled, isLogProgressEnabled, logActivityTrace, jobCount, parameters, outputTypes?.ToList(), draft, provisioningState, lastModifiedBy, createdOn, lastModifiedOn, description); - } - - /// Initializes a new instance of RunbookTestJob. - /// Gets or sets the creation time of the test job. - /// Gets or sets the status of the test job. - /// Gets or sets the status details of the test job. - /// Gets or sets the runOn which specifies the group name where the job is to be executed. - /// Gets or sets the start time of the test job. - /// Gets or sets the end time of the test job. - /// Gets or sets the exception of the test job. - /// Gets or sets the last modified time of the test job. - /// Gets or sets the last status modified time of the test job. - /// Gets or sets the parameters of the test job. - /// The activity-level tracing options of the runbook. - /// A new instance for mocking. - public static RunbookTestJob RunbookTestJob(DateTimeOffset? createdOn = null, string status = null, string statusDetails = null, string runOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string exception = null, DateTimeOffset? lastModifiedOn = null, DateTimeOffset? lastStatusModifiedOn = null, IReadOnlyDictionary parameters = null, int? logActivityTrace = null) - { - parameters ??= new Dictionary(); + scriptParameters ??= new Dictionary(); - return new RunbookTestJob(createdOn, status, statusDetails, runOn, startOn, endOn, exception, lastModifiedOn, lastStatusModifiedOn, parameters, logActivityTrace); + return new AutomationWatcherData(id, name, resourceType, systemData, tags, location, etag, executionFrequencyInSeconds, scriptName, scriptParameters, scriptRunOn, status, createdOn, lastModifiedOn, lastModifiedBy, description); } /// Initializes a new instance of AutomationWebhookData. @@ -954,51 +1085,5 @@ public static AutomationWebhookData AutomationWebhookData(ResourceIdentifier id return new AutomationWebhookData(id, name, resourceType, systemData, isEnabled, uri, expireOn, lastInvokedOn, parameters, runbookName != null ? new RunbookAssociationProperty(runbookName) : null, runOn, createdOn, lastModifiedOn, lastModifiedBy, description); } - - /// Initializes a new instance of HybridRunbookWorkerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets or sets the assigned machine IP address. - /// Gets or sets the registration time of the worker machine. - /// Last Heartbeat from the Worker. - /// Azure Resource Manager Id for a virtual machine. - /// Type of the HybridWorker. - /// Name of the HybridWorker. - /// A new instance for mocking. - public static HybridRunbookWorkerData HybridRunbookWorkerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ip = null, DateTimeOffset? registeredOn = null, DateTimeOffset? lastSeenOn = null, ResourceIdentifier vmResourceId = null, HybridWorkerType? workerType = null, string workerName = null) - { - return new HybridRunbookWorkerData(id, name, resourceType, systemData, ip, registeredOn, lastSeenOn, vmResourceId, workerType, workerName); - } - - /// Initializes a new instance of DeletedAutomationAccount. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Gets or sets the location of the resource. - /// Gets or sets the Automation Account Resource Id. - /// Gets or sets the Automation Account Id. - /// Gets or sets the location of the resource. - /// Gets the deletion time. - /// A new instance for mocking. - public static DeletedAutomationAccount DeletedAutomationAccount(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, ResourceIdentifier automationAccountResourceId = null, string automationAccountId = null, string locationPropertiesLocation = null, DateTimeOffset? deletedOn = null) - { - return new DeletedAutomationAccount(id, name, resourceType, systemData, location, automationAccountResourceId, automationAccountId, locationPropertiesLocation, deletedOn); - } - - /// Initializes a new instance of HybridRunbookWorkerGroupData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Type of the HybridWorkerGroup. - /// Sets the credential of a worker group. - /// A new instance for mocking. - public static HybridRunbookWorkerGroupData HybridRunbookWorkerGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HybridWorkerGroup? groupType = null, string credentialName = null) - { - return new HybridRunbookWorkerGroupData(id, name, resourceType, systemData, groupType, credentialName != null ? new RunAsCredentialAssociationProperty(credentialName) : null); - } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs index abf4c618907e..b8ea2f70ead6 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs @@ -69,20 +69,20 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, content, cancellationToken).ConfigureAwait(false); + var response = await _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken).ConfigureAwait(false); var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython2PackageResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); @@ -110,20 +110,20 @@ public virtual async Task> /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageCollection.CreateOrUpdate"); scope.Start(); try { - var response = _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, content, cancellationToken); + var response = _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken); var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython2PackageResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs index a0c0225bfa1e..25a5f6837a72 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs @@ -233,18 +233,18 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageResource.Update"); scope.Start(); try { - var response = await _automationAccountPython2PackagePython2PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var response = await _automationAccountPython2PackagePython2PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken).ConfigureAwait(false); return Response.FromValue(new AutomationAccountPython2PackageResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -267,18 +267,18 @@ public virtual async Task> Upd /// /// /// - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// is null. - public virtual Response Update(AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Update(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageResource.Update"); scope.Start(); try { - var response = _automationAccountPython2PackagePython2PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var response = _automationAccountPython2PackagePython2PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken); return Response.FromValue(new AutomationAccountPython2PackageResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -325,7 +325,7 @@ public virtual async Task> Add else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -379,7 +379,7 @@ public virtual Response AddTag(string k else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -432,7 +432,7 @@ public virtual async Task> Set else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); return result; @@ -481,7 +481,7 @@ public virtual Response SetTags(IDictio else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); patch.Tags.ReplaceWith(tags); var result = Update(patch, cancellationToken: cancellationToken); return result; @@ -529,7 +529,7 @@ public virtual async Task> Rem else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -581,7 +581,7 @@ public virtual Response RemoveTag(strin else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs new file mode 100644 index 000000000000..c470246afa2e --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutomationAccountPython3Packages method from an instance of . + /// + public partial class AutomationAccountPython3PackageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _automationAccountPython3PackagePython3PackageClientDiagnostics; + private readonly Python3PackageRestOperations _automationAccountPython3PackagePython3PackageRestClient; + + /// Initializes a new instance of the class for mocking. + protected AutomationAccountPython3PackageCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AutomationAccountPython3PackageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _automationAccountPython3PackagePython3PackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountPython3PackageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutomationAccountPython3PackageResource.ResourceType, out string automationAccountPython3PackagePython3PackageApiVersion); + _automationAccountPython3PackagePython3PackageRestClient = new Python3PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationAccountPython3PackagePython3PackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AutomationAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AutomationAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython3PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken); + var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython3PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Get"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Get"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve a list of python 3 packages. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages + /// + /// + /// Operation Id + /// Python3Package_ListByAutomationAccount + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _automationAccountPython3PackagePython3PackageRestClient.CreateListByAutomationAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _automationAccountPython3PackagePython3PackageRestClient.CreateListByAutomationAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountPython3PackageResource(Client, AutomationModuleData.DeserializeAutomationModuleData(e)), _automationAccountPython3PackagePython3PackageClientDiagnostics, Pipeline, "AutomationAccountPython3PackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Retrieve a list of python 3 packages. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages + /// + /// + /// Operation Id + /// Python3Package_ListByAutomationAccount + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _automationAccountPython3PackagePython3PackageRestClient.CreateListByAutomationAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _automationAccountPython3PackagePython3PackageRestClient.CreateListByAutomationAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountPython3PackageResource(Client, AutomationModuleData.DeserializeAutomationModuleData(e)), _automationAccountPython3PackagePython3PackageClientDiagnostics, Pipeline, "AutomationAccountPython3PackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Exists"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Exists"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs new file mode 100644 index 000000000000..712191559487 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs @@ -0,0 +1,601 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A Class representing an AutomationAccountPython3Package along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutomationAccountPython3PackageResource method. + /// Otherwise you can get one from its parent resource using the GetAutomationAccountPython3Package method. + /// + public partial class AutomationAccountPython3PackageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _automationAccountPython3PackagePython3PackageClientDiagnostics; + private readonly Python3PackageRestOperations _automationAccountPython3PackagePython3PackageRestClient; + private readonly AutomationModuleData _data; + + /// Initializes a new instance of the class for mocking. + protected AutomationAccountPython3PackageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutomationAccountPython3PackageResource(ArmClient client, AutomationModuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutomationAccountPython3PackageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _automationAccountPython3PackagePython3PackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string automationAccountPython3PackagePython3PackageApiVersion); + _automationAccountPython3PackagePython3PackageRestClient = new Python3PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationAccountPython3PackagePython3PackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Automation/automationAccounts/python3Packages"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutomationModuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieve the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Get"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Get"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the python 3 package by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Delete"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the python 3 package by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Delete"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Update + /// + /// + /// + /// The update parameters for python package. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Update"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the python 3 package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Update + /// + /// + /// + /// The update parameters for python package. + /// The cancellation token to use. + /// is null. + public virtual Response Update(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Update"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// + /// + /// Operation Id + /// Python3Package_Get + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs index 3813c0b5295d..74ccddd43482 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs @@ -37,32 +37,32 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _automationAccountClientDiagnostics; private readonly AutomationAccountRestOperations _automationAccountRestClient; + private readonly ClientDiagnostics _nodeCountInformationClientDiagnostics; + private readonly NodeCountInformationRestOperations _nodeCountInformationRestClient; private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; private readonly ClientDiagnostics _agentRegistrationInformationClientDiagnostics; private readonly AgentRegistrationInformationRestOperations _agentRegistrationInformationRestClient; - private readonly ClientDiagnostics _dscCompilationJobClientDiagnostics; - private readonly DscCompilationJobRestOperations _dscCompilationJobRestClient; - private readonly ClientDiagnostics _dscCompilationJobStreamClientDiagnostics; - private readonly DscCompilationJobStreamRestOperations _dscCompilationJobStreamRestClient; - private readonly ClientDiagnostics _nodeCountInformationClientDiagnostics; - private readonly NodeCountInformationRestOperations _nodeCountInformationRestClient; private readonly ClientDiagnostics _statisticsClientDiagnostics; private readonly StatisticsRestOperations _statisticsRestClient; private readonly ClientDiagnostics _usagesClientDiagnostics; private readonly UsagesRestOperations _usagesRestClient; private readonly ClientDiagnostics _keysClientDiagnostics; private readonly KeysRestOperations _keysRestClient; + private readonly ClientDiagnostics _dscCompilationJobClientDiagnostics; + private readonly DscCompilationJobRestOperations _dscCompilationJobRestClient; + private readonly ClientDiagnostics _dscCompilationJobStreamClientDiagnostics; + private readonly DscCompilationJobStreamRestOperations _dscCompilationJobStreamRestClient; private readonly ClientDiagnostics _linkedWorkspaceClientDiagnostics; private readonly LinkedWorkspaceRestOperations _linkedWorkspaceRestClient; private readonly ClientDiagnostics _objectDataTypesClientDiagnostics; private readonly ObjectDataTypesRestOperations _objectDataTypesRestClient; private readonly ClientDiagnostics _defaultClientDiagnostics; private readonly AutomationRestOperations _defaultRestClient; - private readonly ClientDiagnostics _softwareUpdateConfigurationRunsClientDiagnostics; - private readonly SoftwareUpdateConfigurationRunsRestOperations _softwareUpdateConfigurationRunsRestClient; private readonly ClientDiagnostics _softwareUpdateConfigurationMachineRunsClientDiagnostics; private readonly SoftwareUpdateConfigurationMachineRunsRestOperations _softwareUpdateConfigurationMachineRunsRestClient; + private readonly ClientDiagnostics _softwareUpdateConfigurationRunsClientDiagnostics; + private readonly SoftwareUpdateConfigurationRunsRestOperations _softwareUpdateConfigurationRunsRestClient; private readonly ClientDiagnostics _automationWebhookWebhookClientDiagnostics; private readonly WebhookRestOperations _automationWebhookWebhookRestClient; private readonly AutomationAccountData _data; @@ -89,33 +89,33 @@ internal AutomationAccountResource(ArmClient client, ResourceIdentifier id) : ba _automationAccountClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string automationAccountApiVersion); _automationAccountRestClient = new AutomationAccountRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationAccountApiVersion); + _nodeCountInformationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _nodeCountInformationRestClient = new NodeCountInformationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _agentRegistrationInformationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _agentRegistrationInformationRestClient = new AgentRegistrationInformationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _dscCompilationJobClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", DscCompilationJobResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DscCompilationJobResource.ResourceType, out string dscCompilationJobApiVersion); - _dscCompilationJobRestClient = new DscCompilationJobRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dscCompilationJobApiVersion); - _dscCompilationJobStreamClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _dscCompilationJobStreamRestClient = new DscCompilationJobStreamRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _nodeCountInformationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _nodeCountInformationRestClient = new NodeCountInformationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _statisticsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _statisticsRestClient = new StatisticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _usagesRestClient = new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _keysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _keysRestClient = new KeysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _dscCompilationJobClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", DscCompilationJobResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DscCompilationJobResource.ResourceType, out string dscCompilationJobApiVersion); + _dscCompilationJobRestClient = new DscCompilationJobRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dscCompilationJobApiVersion); + _dscCompilationJobStreamClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _dscCompilationJobStreamRestClient = new DscCompilationJobStreamRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _linkedWorkspaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _linkedWorkspaceRestClient = new LinkedWorkspaceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _objectDataTypesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _objectDataTypesRestClient = new ObjectDataTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _defaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _defaultRestClient = new AutomationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _softwareUpdateConfigurationRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _softwareUpdateConfigurationRunsRestClient = new SoftwareUpdateConfigurationRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _softwareUpdateConfigurationMachineRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _softwareUpdateConfigurationMachineRunsRestClient = new SoftwareUpdateConfigurationMachineRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _softwareUpdateConfigurationRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _softwareUpdateConfigurationRunsRestClient = new SoftwareUpdateConfigurationRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _automationWebhookWebhookClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationWebhookResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(AutomationWebhookResource.ResourceType, out string automationWebhookWebhookApiVersion); _automationWebhookWebhookRestClient = new WebhookRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationWebhookWebhookApiVersion); @@ -148,587 +148,591 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of AutomationPrivateEndpointConnectionResources in the AutomationAccount. - /// An object representing collection of AutomationPrivateEndpointConnectionResources and their operations over a AutomationPrivateEndpointConnectionResource. - public virtual AutomationPrivateEndpointConnectionCollection GetAutomationPrivateEndpointConnections() + /// Gets a collection of SoftwareUpdateConfigurationResources in the AutomationAccount. + /// An object representing collection of SoftwareUpdateConfigurationResources and their operations over a SoftwareUpdateConfigurationResource. + public virtual SoftwareUpdateConfigurationCollection GetSoftwareUpdateConfigurations() { - return GetCachedClient(Client => new AutomationPrivateEndpointConnectionCollection(Client, Id)); + return GetCachedClient(Client => new SoftwareUpdateConfigurationCollection(Client, Id)); } /// - /// Gets a private endpoint connection. + /// Get a single software update configuration by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// SoftwareUpdateConfigurations_GetByName /// /// /// - /// The name of the private endpoint connection. + /// The name of the software update configuration to be created. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetSoftwareUpdateConfigurationAsync(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return await GetAutomationPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + return await GetSoftwareUpdateConfigurations().GetAsync(softwareUpdateConfigurationName, clientRequestId, cancellationToken).ConfigureAwait(false); } /// - /// Gets a private endpoint connection. + /// Get a single software update configuration by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} /// /// /// Operation Id - /// PrivateEndpointConnections_Get + /// SoftwareUpdateConfigurations_GetByName /// /// /// - /// The name of the private endpoint connection. + /// The name of the software update configuration to be created. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public virtual Response GetSoftwareUpdateConfiguration(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return GetAutomationPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + return GetSoftwareUpdateConfigurations().Get(softwareUpdateConfigurationName, clientRequestId, cancellationToken); } - /// Gets a collection of AutomationAccountPython2PackageResources in the AutomationAccount. - /// An object representing collection of AutomationAccountPython2PackageResources and their operations over a AutomationAccountPython2PackageResource. - public virtual AutomationAccountPython2PackageCollection GetAutomationAccountPython2Packages() + /// Gets a collection of DscNodeResources in the AutomationAccount. + /// An object representing collection of DscNodeResources and their operations over a DscNodeResource. + public virtual DscNodeCollection GetDscNodes() { - return GetCachedClient(Client => new AutomationAccountPython2PackageCollection(Client, Id)); + return GetCachedClient(Client => new DscNodeCollection(Client, Id)); } /// - /// Retrieve the python 2 package identified by package name. + /// Retrieve the dsc node identified by node id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId} /// /// /// Operation Id - /// Python2Package_Get + /// DscNode_Get /// /// /// - /// The python package name. + /// The node id. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationAccountPython2PackageAsync(string packageName, CancellationToken cancellationToken = default) + public virtual async Task> GetDscNodeAsync(string nodeId, CancellationToken cancellationToken = default) { - return await GetAutomationAccountPython2Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); + return await GetDscNodes().GetAsync(nodeId, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the python 2 package identified by package name. + /// Retrieve the dsc node identified by node id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId} /// /// /// Operation Id - /// Python2Package_Get + /// DscNode_Get /// /// /// - /// The python package name. + /// The node id. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationAccountPython2Package(string packageName, CancellationToken cancellationToken = default) + public virtual Response GetDscNode(string nodeId, CancellationToken cancellationToken = default) { - return GetAutomationAccountPython2Packages().Get(packageName, cancellationToken); + return GetDscNodes().Get(nodeId, cancellationToken); } - /// Gets a collection of AutomationAccountModuleResources in the AutomationAccount. - /// An object representing collection of AutomationAccountModuleResources and their operations over a AutomationAccountModuleResource. - public virtual AutomationAccountModuleCollection GetAutomationAccountModules() + /// Gets a collection of AutomationCertificateResources in the AutomationAccount. + /// An object representing collection of AutomationCertificateResources and their operations over a AutomationCertificateResource. + public virtual AutomationCertificateCollection GetAutomationCertificates() { - return GetCachedClient(Client => new AutomationAccountModuleCollection(Client, Id)); + return GetCachedClient(Client => new AutomationCertificateCollection(Client, Id)); } /// - /// Retrieve the module identified by module name. + /// Retrieve the certificate identified by certificate name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} /// /// /// Operation Id - /// Module_Get + /// Certificate_Get /// /// /// - /// The module name. + /// The name of certificate. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationAccountModuleAsync(string moduleName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationCertificateAsync(string certificateName, CancellationToken cancellationToken = default) { - return await GetAutomationAccountModules().GetAsync(moduleName, cancellationToken).ConfigureAwait(false); + return await GetAutomationCertificates().GetAsync(certificateName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the module identified by module name. + /// Retrieve the certificate identified by certificate name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} /// /// /// Operation Id - /// Module_Get + /// Certificate_Get /// /// /// - /// The module name. + /// The name of certificate. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationAccountModule(string moduleName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationCertificate(string certificateName, CancellationToken cancellationToken = default) { - return GetAutomationAccountModules().Get(moduleName, cancellationToken); + return GetAutomationCertificates().Get(certificateName, cancellationToken); } - /// Gets a collection of DscNodeResources in the AutomationAccount. - /// An object representing collection of DscNodeResources and their operations over a DscNodeResource. - public virtual DscNodeCollection GetDscNodes() + /// Gets a collection of AutomationConnectionResources in the AutomationAccount. + /// An object representing collection of AutomationConnectionResources and their operations over a AutomationConnectionResource. + public virtual AutomationConnectionCollection GetAutomationConnections() { - return GetCachedClient(Client => new DscNodeCollection(Client, Id)); + return GetCachedClient(Client => new AutomationConnectionCollection(Client, Id)); } /// - /// Retrieve the dsc node identified by node id. + /// Retrieve the connection identified by connection name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} /// /// /// Operation Id - /// DscNode_Get + /// Connection_Get /// /// /// - /// The node id. + /// The name of connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetDscNodeAsync(string nodeId, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationConnectionAsync(string connectionName, CancellationToken cancellationToken = default) { - return await GetDscNodes().GetAsync(nodeId, cancellationToken).ConfigureAwait(false); + return await GetAutomationConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the dsc node identified by node id. + /// Retrieve the connection identified by connection name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodes/{nodeId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} /// /// /// Operation Id - /// DscNode_Get + /// Connection_Get /// /// /// - /// The node id. + /// The name of connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetDscNode(string nodeId, CancellationToken cancellationToken = default) + public virtual Response GetAutomationConnection(string connectionName, CancellationToken cancellationToken = default) { - return GetDscNodes().Get(nodeId, cancellationToken); + return GetAutomationConnections().Get(connectionName, cancellationToken); } - /// Gets a collection of DscNodeConfigurationResources in the AutomationAccount. - /// An object representing collection of DscNodeConfigurationResources and their operations over a DscNodeConfigurationResource. - public virtual DscNodeConfigurationCollection GetDscNodeConfigurations() + /// Gets a collection of AutomationConnectionTypeResources in the AutomationAccount. + /// An object representing collection of AutomationConnectionTypeResources and their operations over a AutomationConnectionTypeResource. + public virtual AutomationConnectionTypeCollection GetAutomationConnectionTypes() { - return GetCachedClient(Client => new DscNodeConfigurationCollection(Client, Id)); + return GetCachedClient(Client => new AutomationConnectionTypeCollection(Client, Id)); } /// - /// Retrieve the Dsc node configurations by node configuration. + /// Retrieve the connection type identified by connection type name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} /// /// /// Operation Id - /// DscNodeConfiguration_Get + /// ConnectionType_Get /// /// /// - /// The Dsc node configuration name. + /// The name of connection type. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetDscNodeConfigurationAsync(string nodeConfigurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationConnectionTypeAsync(string connectionTypeName, CancellationToken cancellationToken = default) { - return await GetDscNodeConfigurations().GetAsync(nodeConfigurationName, cancellationToken).ConfigureAwait(false); + return await GetAutomationConnectionTypes().GetAsync(connectionTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the Dsc node configurations by node configuration. + /// Retrieve the connection type identified by connection type name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} /// /// /// Operation Id - /// DscNodeConfiguration_Get + /// ConnectionType_Get /// /// /// - /// The Dsc node configuration name. + /// The name of connection type. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetDscNodeConfiguration(string nodeConfigurationName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationConnectionType(string connectionTypeName, CancellationToken cancellationToken = default) { - return GetDscNodeConfigurations().Get(nodeConfigurationName, cancellationToken); + return GetAutomationConnectionTypes().Get(connectionTypeName, cancellationToken); } - /// Gets a collection of DscCompilationJobResources in the AutomationAccount. - /// An object representing collection of DscCompilationJobResources and their operations over a DscCompilationJobResource. - public virtual DscCompilationJobCollection GetDscCompilationJobs() + /// Gets a collection of AutomationCredentialResources in the AutomationAccount. + /// An object representing collection of AutomationCredentialResources and their operations over a AutomationCredentialResource. + public virtual AutomationCredentialCollection GetAutomationCredentials() { - return GetCachedClient(Client => new DscCompilationJobCollection(Client, Id)); + return GetCachedClient(Client => new AutomationCredentialCollection(Client, Id)); } /// - /// Retrieve the Dsc configuration compilation job identified by job id. + /// Retrieve the credential identified by credential name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} /// /// /// Operation Id - /// DscCompilationJob_Get + /// Credential_Get /// /// /// - /// The DSC configuration Id. + /// The name of credential. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetDscCompilationJobAsync(string compilationJobName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationCredentialAsync(string credentialName, CancellationToken cancellationToken = default) { - return await GetDscCompilationJobs().GetAsync(compilationJobName, cancellationToken).ConfigureAwait(false); + return await GetAutomationCredentials().GetAsync(credentialName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the Dsc configuration compilation job identified by job id. + /// Retrieve the credential identified by credential name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} /// /// /// Operation Id - /// DscCompilationJob_Get + /// Credential_Get /// /// /// - /// The DSC configuration Id. + /// The name of credential. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetDscCompilationJob(string compilationJobName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationCredential(string credentialName, CancellationToken cancellationToken = default) { - return GetDscCompilationJobs().Get(compilationJobName, cancellationToken); + return GetAutomationCredentials().Get(credentialName, cancellationToken); } - /// Gets a collection of AutomationSourceControlResources in the AutomationAccount. - /// An object representing collection of AutomationSourceControlResources and their operations over a AutomationSourceControlResource. - public virtual AutomationSourceControlCollection GetAutomationSourceControls() + /// Gets a collection of DscCompilationJobResources in the AutomationAccount. + /// An object representing collection of DscCompilationJobResources and their operations over a DscCompilationJobResource. + public virtual DscCompilationJobCollection GetDscCompilationJobs() { - return GetCachedClient(Client => new AutomationSourceControlCollection(Client, Id)); + return GetCachedClient(Client => new DscCompilationJobCollection(Client, Id)); } /// - /// Retrieve the source control identified by source control name. + /// Retrieve the Dsc configuration compilation job identified by job id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName} /// /// /// Operation Id - /// SourceControl_Get + /// DscCompilationJob_Get /// /// /// - /// The name of source control. + /// The DSC configuration Id. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) + public virtual async Task> GetDscCompilationJobAsync(string compilationJobName, CancellationToken cancellationToken = default) { - return await GetAutomationSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); + return await GetDscCompilationJobs().GetAsync(compilationJobName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the source control identified by source control name. + /// Retrieve the Dsc configuration compilation job identified by job id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName} /// /// /// Operation Id - /// SourceControl_Get + /// DscCompilationJob_Get /// /// /// - /// The name of source control. + /// The DSC configuration Id. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationSourceControl(string sourceControlName, CancellationToken cancellationToken = default) + public virtual Response GetDscCompilationJob(string compilationJobName, CancellationToken cancellationToken = default) { - return GetAutomationSourceControls().Get(sourceControlName, cancellationToken); + return GetDscCompilationJobs().Get(compilationJobName, cancellationToken); } - /// Gets a collection of AutomationCertificateResources in the AutomationAccount. - /// An object representing collection of AutomationCertificateResources and their operations over a AutomationCertificateResource. - public virtual AutomationCertificateCollection GetAutomationCertificates() + /// Gets a collection of DscConfigurationResources in the AutomationAccount. + /// An object representing collection of DscConfigurationResources and their operations over a DscConfigurationResource. + public virtual DscConfigurationCollection GetDscConfigurations() { - return GetCachedClient(Client => new AutomationCertificateCollection(Client, Id)); + return GetCachedClient(Client => new DscConfigurationCollection(Client, Id)); } /// - /// Retrieve the certificate identified by certificate name. + /// Retrieve the configuration identified by configuration name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName} /// /// /// Operation Id - /// Certificate_Get + /// DscConfiguration_Get /// /// /// - /// The name of certificate. + /// The configuration name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationCertificateAsync(string certificateName, CancellationToken cancellationToken = default) + public virtual async Task> GetDscConfigurationAsync(string configurationName, CancellationToken cancellationToken = default) { - return await GetAutomationCertificates().GetAsync(certificateName, cancellationToken).ConfigureAwait(false); + return await GetDscConfigurations().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the certificate identified by certificate name. + /// Retrieve the configuration identified by configuration name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName} /// /// /// Operation Id - /// Certificate_Get + /// DscConfiguration_Get /// /// /// - /// The name of certificate. + /// The configuration name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationCertificate(string certificateName, CancellationToken cancellationToken = default) + public virtual Response GetDscConfiguration(string configurationName, CancellationToken cancellationToken = default) { - return GetAutomationCertificates().Get(certificateName, cancellationToken); + return GetDscConfigurations().Get(configurationName, cancellationToken); } - /// Gets a collection of AutomationConnectionResources in the AutomationAccount. - /// An object representing collection of AutomationConnectionResources and their operations over a AutomationConnectionResource. - public virtual AutomationConnectionCollection GetAutomationConnections() + /// Gets a collection of DscNodeConfigurationResources in the AutomationAccount. + /// An object representing collection of DscNodeConfigurationResources and their operations over a DscNodeConfigurationResource. + public virtual DscNodeConfigurationCollection GetDscNodeConfigurations() { - return GetCachedClient(Client => new AutomationConnectionCollection(Client, Id)); + return GetCachedClient(Client => new DscNodeConfigurationCollection(Client, Id)); } /// - /// Retrieve the connection identified by connection name. + /// Retrieve the Dsc node configurations by node configuration. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} /// /// /// Operation Id - /// Connection_Get + /// DscNodeConfiguration_Get /// /// /// - /// The name of connection. + /// The Dsc node configuration name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetDscNodeConfigurationAsync(string nodeConfigurationName, CancellationToken cancellationToken = default) { - return await GetAutomationConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + return await GetDscNodeConfigurations().GetAsync(nodeConfigurationName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the connection identified by connection name. + /// Retrieve the Dsc node configurations by node configuration. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} /// /// /// Operation Id - /// Connection_Get + /// DscNodeConfiguration_Get /// /// /// - /// The name of connection. + /// The Dsc node configuration name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationConnection(string connectionName, CancellationToken cancellationToken = default) + public virtual Response GetDscNodeConfiguration(string nodeConfigurationName, CancellationToken cancellationToken = default) { - return GetAutomationConnections().Get(connectionName, cancellationToken); + return GetDscNodeConfigurations().Get(nodeConfigurationName, cancellationToken); } - /// Gets a collection of AutomationConnectionTypeResources in the AutomationAccount. - /// An object representing collection of AutomationConnectionTypeResources and their operations over a AutomationConnectionTypeResource. - public virtual AutomationConnectionTypeCollection GetAutomationConnectionTypes() + /// Gets a collection of HybridRunbookWorkerGroupResources in the AutomationAccount. + /// An object representing collection of HybridRunbookWorkerGroupResources and their operations over a HybridRunbookWorkerGroupResource. + public virtual HybridRunbookWorkerGroupCollection GetHybridRunbookWorkerGroups() { - return GetCachedClient(Client => new AutomationConnectionTypeCollection(Client, Id)); + return GetCachedClient(Client => new HybridRunbookWorkerGroupCollection(Client, Id)); } /// - /// Retrieve the connection type identified by connection type name. + /// Retrieve a hybrid runbook worker group. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} /// /// /// Operation Id - /// ConnectionType_Get + /// HybridRunbookWorkerGroup_Get /// /// /// - /// The name of connection type. + /// The hybrid runbook worker group name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationConnectionTypeAsync(string connectionTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetHybridRunbookWorkerGroupAsync(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) { - return await GetAutomationConnectionTypes().GetAsync(connectionTypeName, cancellationToken).ConfigureAwait(false); + return await GetHybridRunbookWorkerGroups().GetAsync(hybridRunbookWorkerGroupName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the connection type identified by connection type name. + /// Retrieve a hybrid runbook worker group. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} /// /// /// Operation Id - /// ConnectionType_Get + /// HybridRunbookWorkerGroup_Get /// /// /// - /// The name of connection type. + /// The hybrid runbook worker group name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationConnectionType(string connectionTypeName, CancellationToken cancellationToken = default) + public virtual Response GetHybridRunbookWorkerGroup(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) { - return GetAutomationConnectionTypes().Get(connectionTypeName, cancellationToken); + return GetHybridRunbookWorkerGroups().Get(hybridRunbookWorkerGroupName, cancellationToken); } - /// Gets a collection of AutomationCredentialResources in the AutomationAccount. - /// An object representing collection of AutomationCredentialResources and their operations over a AutomationCredentialResource. - public virtual AutomationCredentialCollection GetAutomationCredentials() + /// Gets a collection of AutomationJobResources in the AutomationAccount. + /// An object representing collection of AutomationJobResources and their operations over a AutomationJobResource. + public virtual AutomationJobCollection GetAutomationJobs() { - return GetCachedClient(Client => new AutomationCredentialCollection(Client, Id)); + return GetCachedClient(Client => new AutomationJobCollection(Client, Id)); } /// - /// Retrieve the credential identified by credential name. + /// Retrieve the job identified by job name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName} /// /// /// Operation Id - /// Credential_Get + /// Job_Get /// /// /// - /// The name of credential. + /// The job name. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationCredentialAsync(string credentialName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationJobAsync(string jobName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return await GetAutomationCredentials().GetAsync(credentialName, cancellationToken).ConfigureAwait(false); + return await GetAutomationJobs().GetAsync(jobName, clientRequestId, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the credential identified by credential name. + /// Retrieve the job identified by job name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName} /// /// /// Operation Id - /// Credential_Get + /// Job_Get /// /// /// - /// The name of credential. + /// The job name. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationCredential(string credentialName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationJob(string jobName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return GetAutomationCredentials().Get(credentialName, cancellationToken); + return GetAutomationJobs().Get(jobName, clientRequestId, cancellationToken); } /// Gets a collection of AutomationJobScheduleResources in the AutomationAccount. @@ -780,379 +784,534 @@ public virtual Response GetAutomationJobSchedule( return GetAutomationJobSchedules().Get(jobScheduleId, cancellationToken); } - /// Gets a collection of AutomationScheduleResources in the AutomationAccount. - /// An object representing collection of AutomationScheduleResources and their operations over a AutomationScheduleResource. - public virtual AutomationScheduleCollection GetAutomationSchedules() + /// Gets a collection of AutomationAccountModuleResources in the AutomationAccount. + /// An object representing collection of AutomationAccountModuleResources and their operations over a AutomationAccountModuleResource. + public virtual AutomationAccountModuleCollection GetAutomationAccountModules() { - return GetCachedClient(Client => new AutomationScheduleCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountModuleCollection(Client, Id)); } /// - /// Retrieve the schedule identified by schedule name. + /// Retrieve the module identified by module name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} /// /// /// Operation Id - /// Schedule_Get + /// Module_Get /// /// /// - /// The schedule name. + /// The module name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationScheduleAsync(string scheduleName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountModuleAsync(string moduleName, CancellationToken cancellationToken = default) { - return await GetAutomationSchedules().GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountModules().GetAsync(moduleName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the schedule identified by schedule name. + /// Retrieve the module identified by module name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} /// /// /// Operation Id - /// Schedule_Get + /// Module_Get /// /// /// - /// The schedule name. + /// The module name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationSchedule(string scheduleName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountModule(string moduleName, CancellationToken cancellationToken = default) { - return GetAutomationSchedules().Get(scheduleName, cancellationToken); + return GetAutomationAccountModules().Get(moduleName, cancellationToken); } - /// Gets a collection of AutomationVariableResources in the AutomationAccount. - /// An object representing collection of AutomationVariableResources and their operations over a AutomationVariableResource. - public virtual AutomationVariableCollection GetAutomationVariables() + /// Gets a collection of AutomationAccountPython2PackageResources in the AutomationAccount. + /// An object representing collection of AutomationAccountPython2PackageResources and their operations over a AutomationAccountPython2PackageResource. + public virtual AutomationAccountPython2PackageCollection GetAutomationAccountPython2Packages() { - return GetCachedClient(Client => new AutomationVariableCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountPython2PackageCollection(Client, Id)); } /// - /// Retrieve the variable identified by variable name. + /// Retrieve the python 2 package identified by package name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} /// /// /// Operation Id - /// Variable_Get + /// Python2Package_Get /// /// /// - /// The name of variable. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationVariableAsync(string variableName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountPython2PackageAsync(string packageName, CancellationToken cancellationToken = default) { - return await GetAutomationVariables().GetAsync(variableName, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountPython2Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the variable identified by variable name. + /// Retrieve the python 2 package identified by package name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} /// /// /// Operation Id - /// Variable_Get + /// Python2Package_Get /// /// /// - /// The name of variable. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationVariable(string variableName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountPython2Package(string packageName, CancellationToken cancellationToken = default) { - return GetAutomationVariables().Get(variableName, cancellationToken); + return GetAutomationAccountPython2Packages().Get(packageName, cancellationToken); } - /// Gets a collection of AutomationWatcherResources in the AutomationAccount. - /// An object representing collection of AutomationWatcherResources and their operations over a AutomationWatcherResource. - public virtual AutomationWatcherCollection GetAutomationWatchers() + /// Gets a collection of AutomationAccountPython3PackageResources in the AutomationAccount. + /// An object representing collection of AutomationAccountPython3PackageResources and their operations over a AutomationAccountPython3PackageResource. + public virtual AutomationAccountPython3PackageCollection GetAutomationAccountPython3Packages() { - return GetCachedClient(Client => new AutomationWatcherCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountPython3PackageCollection(Client, Id)); } /// - /// Retrieve the watcher identified by watcher name. + /// Retrieve the python 3 package identified by package name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} /// /// /// Operation Id - /// Watcher_Get + /// Python3Package_Get /// /// /// - /// The watcher name. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationWatcherAsync(string watcherName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountPython3PackageAsync(string packageName, CancellationToken cancellationToken = default) { - return await GetAutomationWatchers().GetAsync(watcherName, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountPython3Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the watcher identified by watcher name. + /// Retrieve the python 3 package identified by package name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} /// /// /// Operation Id - /// Watcher_Get + /// Python3Package_Get /// /// /// - /// The watcher name. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationWatcher(string watcherName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountPython3Package(string packageName, CancellationToken cancellationToken = default) { - return GetAutomationWatchers().Get(watcherName, cancellationToken); + return GetAutomationAccountPython3Packages().Get(packageName, cancellationToken); } - /// Gets a collection of DscConfigurationResources in the AutomationAccount. - /// An object representing collection of DscConfigurationResources and their operations over a DscConfigurationResource. - public virtual DscConfigurationCollection GetDscConfigurations() + /// Gets a collection of AutomationPrivateEndpointConnectionResources in the AutomationAccount. + /// An object representing collection of AutomationPrivateEndpointConnectionResources and their operations over a AutomationPrivateEndpointConnectionResource. + public virtual AutomationPrivateEndpointConnectionCollection GetAutomationPrivateEndpointConnections() { - return GetCachedClient(Client => new DscConfigurationCollection(Client, Id)); + return GetCachedClient(Client => new AutomationPrivateEndpointConnectionCollection(Client, Id)); } /// - /// Retrieve the configuration identified by configuration name. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// DscConfiguration_Get + /// PrivateEndpointConnections_Get /// /// /// - /// The configuration name. + /// The name of the private endpoint connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetDscConfigurationAsync(string configurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return await GetDscConfigurations().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); + return await GetAutomationPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the configuration identified by configuration name. + /// Gets a private endpoint connection. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/privateEndpointConnections/{privateEndpointConnectionName} /// /// /// Operation Id - /// DscConfiguration_Get + /// PrivateEndpointConnections_Get /// /// /// - /// The configuration name. + /// The name of the private endpoint connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetDscConfiguration(string configurationName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) { - return GetDscConfigurations().Get(configurationName, cancellationToken); + return GetAutomationPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } - /// Gets a collection of AutomationJobResources in the AutomationAccount. - /// An object representing collection of AutomationJobResources and their operations over a AutomationJobResource. - public virtual AutomationJobCollection GetAutomationJobs() + /// Gets a collection of AutomationRunbookResources in the AutomationAccount. + /// An object representing collection of AutomationRunbookResources and their operations over a AutomationRunbookResource. + public virtual AutomationRunbookCollection GetAutomationRunbooks() { - return GetCachedClient(Client => new AutomationJobCollection(Client, Id)); + return GetCachedClient(Client => new AutomationRunbookCollection(Client, Id)); } /// - /// Retrieve the job identified by job name. + /// Retrieve the runbook identified by runbook name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} /// /// /// Operation Id - /// Job_Get + /// Runbook_Get /// /// /// - /// The job name. - /// Identifies this specific client request. + /// The runbook name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationJobAsync(string jobName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationRunbookAsync(string runbookName, CancellationToken cancellationToken = default) { - return await GetAutomationJobs().GetAsync(jobName, clientRequestId, cancellationToken).ConfigureAwait(false); + return await GetAutomationRunbooks().GetAsync(runbookName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the job identified by job name. + /// Retrieve the runbook identified by runbook name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} /// /// /// Operation Id - /// Job_Get + /// Runbook_Get /// /// /// - /// The job name. - /// Identifies this specific client request. + /// The runbook name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationJob(string jobName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetAutomationRunbook(string runbookName, CancellationToken cancellationToken = default) { - return GetAutomationJobs().Get(jobName, clientRequestId, cancellationToken); + return GetAutomationRunbooks().Get(runbookName, cancellationToken); } - /// Gets a collection of SoftwareUpdateConfigurationResources in the AutomationAccount. - /// An object representing collection of SoftwareUpdateConfigurationResources and their operations over a SoftwareUpdateConfigurationResource. - public virtual SoftwareUpdateConfigurationCollection GetSoftwareUpdateConfigurations() + /// Gets a collection of RuntimeEnvironmentResources in the AutomationAccount. + /// An object representing collection of RuntimeEnvironmentResources and their operations over a RuntimeEnvironmentResource. + public virtual RuntimeEnvironmentCollection GetRuntimeEnvironments() { - return GetCachedClient(Client => new SoftwareUpdateConfigurationCollection(Client, Id)); + return GetCachedClient(Client => new RuntimeEnvironmentCollection(Client, Id)); } /// - /// Get a single software update configuration by name. + /// Get information about the Runtime Environment /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} /// /// /// Operation Id - /// SoftwareUpdateConfigurations_GetByName + /// RuntimeEnvironments_Get /// /// /// - /// The name of the software update configuration to be created. - /// Identifies this specific client request. + /// The name of the Runtime Environment. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetSoftwareUpdateConfigurationAsync(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetRuntimeEnvironmentAsync(string runtimeEnvironmentName, CancellationToken cancellationToken = default) { - return await GetSoftwareUpdateConfigurations().GetAsync(softwareUpdateConfigurationName, clientRequestId, cancellationToken).ConfigureAwait(false); + return await GetRuntimeEnvironments().GetAsync(runtimeEnvironmentName, cancellationToken).ConfigureAwait(false); } /// - /// Get a single software update configuration by name. + /// Get information about the Runtime Environment /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} /// /// /// Operation Id - /// SoftwareUpdateConfigurations_GetByName + /// RuntimeEnvironments_Get /// /// /// - /// The name of the software update configuration to be created. - /// Identifies this specific client request. + /// The name of the Runtime Environment. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSoftwareUpdateConfiguration(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetRuntimeEnvironment(string runtimeEnvironmentName, CancellationToken cancellationToken = default) { - return GetSoftwareUpdateConfigurations().Get(softwareUpdateConfigurationName, clientRequestId, cancellationToken); + return GetRuntimeEnvironments().Get(runtimeEnvironmentName, cancellationToken); } - /// Gets a collection of AutomationRunbookResources in the AutomationAccount. - /// An object representing collection of AutomationRunbookResources and their operations over a AutomationRunbookResource. - public virtual AutomationRunbookCollection GetAutomationRunbooks() + /// Gets a collection of AutomationScheduleResources in the AutomationAccount. + /// An object representing collection of AutomationScheduleResources and their operations over a AutomationScheduleResource. + public virtual AutomationScheduleCollection GetAutomationSchedules() + { + return GetCachedClient(Client => new AutomationScheduleCollection(Client, Id)); + } + + /// + /// Retrieve the schedule identified by schedule name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedule_Get + /// + /// + /// + /// The schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAutomationScheduleAsync(string scheduleName, CancellationToken cancellationToken = default) + { + return await GetAutomationSchedules().GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the schedule identified by schedule name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// + /// + /// Operation Id + /// Schedule_Get + /// + /// + /// + /// The schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAutomationSchedule(string scheduleName, CancellationToken cancellationToken = default) + { + return GetAutomationSchedules().Get(scheduleName, cancellationToken); + } + + /// Gets a collection of AutomationSourceControlResources in the AutomationAccount. + /// An object representing collection of AutomationSourceControlResources and their operations over a AutomationSourceControlResource. + public virtual AutomationSourceControlCollection GetAutomationSourceControls() + { + return GetCachedClient(Client => new AutomationSourceControlCollection(Client, Id)); + } + + /// + /// Retrieve the source control identified by source control name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// + /// + /// Operation Id + /// SourceControl_Get + /// + /// + /// + /// The name of source control. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAutomationSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) + { + return await GetAutomationSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the source control identified by source control name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// + /// + /// Operation Id + /// SourceControl_Get + /// + /// + /// + /// The name of source control. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAutomationSourceControl(string sourceControlName, CancellationToken cancellationToken = default) + { + return GetAutomationSourceControls().Get(sourceControlName, cancellationToken); + } + + /// Gets a collection of AutomationVariableResources in the AutomationAccount. + /// An object representing collection of AutomationVariableResources and their operations over a AutomationVariableResource. + public virtual AutomationVariableCollection GetAutomationVariables() + { + return GetCachedClient(Client => new AutomationVariableCollection(Client, Id)); + } + + /// + /// Retrieve the variable identified by variable name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// + /// + /// Operation Id + /// Variable_Get + /// + /// + /// + /// The name of variable. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetAutomationVariableAsync(string variableName, CancellationToken cancellationToken = default) + { + return await GetAutomationVariables().GetAsync(variableName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the variable identified by variable name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// + /// + /// Operation Id + /// Variable_Get + /// + /// + /// + /// The name of variable. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetAutomationVariable(string variableName, CancellationToken cancellationToken = default) + { + return GetAutomationVariables().Get(variableName, cancellationToken); + } + + /// Gets a collection of AutomationWatcherResources in the AutomationAccount. + /// An object representing collection of AutomationWatcherResources and their operations over a AutomationWatcherResource. + public virtual AutomationWatcherCollection GetAutomationWatchers() { - return GetCachedClient(Client => new AutomationRunbookCollection(Client, Id)); + return GetCachedClient(Client => new AutomationWatcherCollection(Client, Id)); } /// - /// Retrieve the runbook identified by runbook name. + /// Retrieve the watcher identified by watcher name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} /// /// /// Operation Id - /// Runbook_Get + /// Watcher_Get /// /// /// - /// The runbook name. + /// The watcher name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetAutomationRunbookAsync(string runbookName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationWatcherAsync(string watcherName, CancellationToken cancellationToken = default) { - return await GetAutomationRunbooks().GetAsync(runbookName, cancellationToken).ConfigureAwait(false); + return await GetAutomationWatchers().GetAsync(watcherName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the runbook identified by runbook name. + /// Retrieve the watcher identified by watcher name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runbooks/{runbookName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} /// /// /// Operation Id - /// Runbook_Get + /// Watcher_Get /// /// /// - /// The runbook name. + /// The watcher name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetAutomationRunbook(string runbookName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationWatcher(string watcherName, CancellationToken cancellationToken = default) { - return GetAutomationRunbooks().Get(runbookName, cancellationToken); + return GetAutomationWatchers().Get(watcherName, cancellationToken); } /// Gets a collection of AutomationWebhookResources in the AutomationAccount. @@ -1208,59 +1367,6 @@ public virtual Response GetAutomationWebhook(string w return GetAutomationWebhooks().Get(webhookName, cancellationToken); } - /// Gets a collection of HybridRunbookWorkerGroupResources in the AutomationAccount. - /// An object representing collection of HybridRunbookWorkerGroupResources and their operations over a HybridRunbookWorkerGroupResource. - public virtual HybridRunbookWorkerGroupCollection GetHybridRunbookWorkerGroups() - { - return GetCachedClient(Client => new HybridRunbookWorkerGroupCollection(Client, Id)); - } - - /// - /// Retrieve a hybrid runbook worker group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} - /// - /// - /// Operation Id - /// HybridRunbookWorkerGroup_Get - /// - /// - /// - /// The hybrid runbook worker group name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetHybridRunbookWorkerGroupAsync(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) - { - return await GetHybridRunbookWorkerGroups().GetAsync(hybridRunbookWorkerGroupName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve a hybrid runbook worker group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} - /// - /// - /// Operation Id - /// HybridRunbookWorkerGroup_Get - /// - /// - /// - /// The hybrid runbook worker group name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetHybridRunbookWorkerGroup(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) - { - return GetHybridRunbookWorkerGroups().Get(hybridRunbookWorkerGroupName, cancellationToken); - } - /// /// Get information about an Automation Account. /// @@ -1461,6 +1567,50 @@ public virtual Response Update(AutomationAccountPatch } } + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType} + /// + /// + /// Operation Id + /// NodeCountInformation_Get + /// + /// + /// + /// The type of counts to retrieve. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllNodeCountInformationAsync(AutomationCountType countType, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeCountInformationRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, countType); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DscNodeCount.DeserializeDscNodeCount, _nodeCountInformationClientDiagnostics, Pipeline, "AutomationAccountResource.GetAllNodeCountInformation", "value", null, cancellationToken); + } + + /// + /// Retrieve counts for Dsc Nodes. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType} + /// + /// + /// Operation Id + /// NodeCountInformation_Get + /// + /// + /// + /// The type of counts to retrieve. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAllNodeCountInformation(AutomationCountType countType, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeCountInformationRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, countType); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, DscNodeCount.DeserializeDscNodeCount, _nodeCountInformationClientDiagnostics, Pipeline, "AutomationAccountResource.GetAllNodeCountInformation", "value", null, cancellationToken); + } + /// /// Gets the private link resources that need to be created for Automation account. /// @@ -1625,170 +1775,54 @@ public virtual Response RegenerateKeyAgentRegistrationInforma return response; } catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve the job stream identified by job stream id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId} - /// - /// - /// Operation Id - /// DscCompilationJob_GetStream - /// - /// - /// - /// The job id. - /// The job stream id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetStreamDscCompilationJobAsync(Guid jobId, string jobStreamId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobStreamId, nameof(jobStreamId)); - - using var scope = _dscCompilationJobClientDiagnostics.CreateScope("AutomationAccountResource.GetStreamDscCompilationJob"); - scope.Start(); - try - { - var response = await _dscCompilationJobRestClient.GetStreamAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId, jobStreamId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve the job stream identified by job stream id. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId} - /// - /// - /// Operation Id - /// DscCompilationJob_GetStream - /// - /// - /// - /// The job id. - /// The job stream id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetStreamDscCompilationJob(Guid jobId, string jobStreamId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(jobStreamId, nameof(jobStreamId)); - - using var scope = _dscCompilationJobClientDiagnostics.CreateScope("AutomationAccountResource.GetStreamDscCompilationJob"); - scope.Start(); - try - { - var response = _dscCompilationJobRestClient.GetStream(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId, jobStreamId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve all the job streams for the compilation Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams - /// - /// - /// Operation Id - /// DscCompilationJobStream_ListByJob - /// - /// - /// - /// The job id. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDscCompilationJobStreamsAsync(Guid jobId, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dscCompilationJobStreamRestClient.CreateListByJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, AutomationJobStream.DeserializeAutomationJobStream, _dscCompilationJobStreamClientDiagnostics, Pipeline, "AutomationAccountResource.GetDscCompilationJobStreams", "value", null, cancellationToken); - } - - /// - /// Retrieve all the job streams for the compilation Job. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams - /// - /// - /// Operation Id - /// DscCompilationJobStream_ListByJob - /// - /// - /// - /// The job id. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDscCompilationJobStreams(Guid jobId, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dscCompilationJobStreamRestClient.CreateListByJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, AutomationJobStream.DeserializeAutomationJobStream, _dscCompilationJobStreamClientDiagnostics, Pipeline, "AutomationAccountResource.GetDscCompilationJobStreams", "value", null, cancellationToken); + { + scope.Failed(e); + throw; + } } /// - /// Retrieve counts for Dsc Nodes. + /// Retrieve the deleted runbooks for an automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listDeletedRunbooks /// /// /// Operation Id - /// NodeCountInformation_Get + /// AutomationAccount_ListDeletedRunbooks /// /// /// - /// The type of counts to retrieve. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllNodeCountInformationAsync(AutomationCountType countType, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeletedRunbooksAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeCountInformationRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, countType); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DscNodeCount.DeserializeDscNodeCount, _nodeCountInformationClientDiagnostics, Pipeline, "AutomationAccountResource.GetAllNodeCountInformation", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _automationAccountRestClient.CreateListDeletedRunbooksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _automationAccountRestClient.CreateListDeletedRunbooksNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, DeletedRunbook.DeserializeDeletedRunbook, _automationAccountClientDiagnostics, Pipeline, "AutomationAccountResource.GetDeletedRunbooks", "value", "nextLink", cancellationToken); } /// - /// Retrieve counts for Dsc Nodes. + /// Retrieve the deleted runbooks for an automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodecounts/{countType} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listDeletedRunbooks /// /// /// Operation Id - /// NodeCountInformation_Get + /// AutomationAccount_ListDeletedRunbooks /// /// /// - /// The type of counts to retrieve. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAllNodeCountInformation(AutomationCountType countType, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeletedRunbooks(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeCountInformationRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, countType); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, DscNodeCount.DeserializeDscNodeCount, _nodeCountInformationClientDiagnostics, Pipeline, "AutomationAccountResource.GetAllNodeCountInformation", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _automationAccountRestClient.CreateListDeletedRunbooksRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _automationAccountRestClient.CreateListDeletedRunbooksNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, DeletedRunbook.DeserializeDeletedRunbook, _automationAccountClientDiagnostics, Pipeline, "AutomationAccountResource.GetDeletedRunbooks", "value", "nextLink", cancellationToken); } /// @@ -1919,6 +1953,122 @@ public virtual Pageable GetAutomationAccountKeys(CancellationToke return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, AutomationKey.DeserializeAutomationKey, _keysClientDiagnostics, Pipeline, "AutomationAccountResource.GetAutomationAccountKeys", "keys", null, cancellationToken); } + /// + /// Retrieve the job stream identified by job stream id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId} + /// + /// + /// Operation Id + /// DscCompilationJob_GetStream + /// + /// + /// + /// The job id. + /// The job stream id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetStreamDscCompilationJobAsync(Guid jobId, string jobStreamId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobStreamId, nameof(jobStreamId)); + + using var scope = _dscCompilationJobClientDiagnostics.CreateScope("AutomationAccountResource.GetStreamDscCompilationJob"); + scope.Start(); + try + { + var response = await _dscCompilationJobRestClient.GetStreamAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId, jobStreamId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the job stream identified by job stream id. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId} + /// + /// + /// Operation Id + /// DscCompilationJob_GetStream + /// + /// + /// + /// The job id. + /// The job stream id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetStreamDscCompilationJob(Guid jobId, string jobStreamId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobStreamId, nameof(jobStreamId)); + + using var scope = _dscCompilationJobClientDiagnostics.CreateScope("AutomationAccountResource.GetStreamDscCompilationJob"); + scope.Start(); + try + { + var response = _dscCompilationJobRestClient.GetStream(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId, jobStreamId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve all the job streams for the compilation Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams + /// + /// + /// Operation Id + /// DscCompilationJobStream_ListByJob + /// + /// + /// + /// The job id. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDscCompilationJobStreamsAsync(Guid jobId, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dscCompilationJobStreamRestClient.CreateListByJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, AutomationJobStream.DeserializeAutomationJobStream, _dscCompilationJobStreamClientDiagnostics, Pipeline, "AutomationAccountResource.GetDscCompilationJobStreams", "value", null, cancellationToken); + } + + /// + /// Retrieve all the job streams for the compilation Job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams + /// + /// + /// Operation Id + /// DscCompilationJobStream_ListByJob + /// + /// + /// + /// The job id. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDscCompilationJobStreams(Guid jobId, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dscCompilationJobStreamRestClient.CreateListByJobRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, AutomationJobStream.DeserializeAutomationJobStream, _dscCompilationJobStreamClientDiagnostics, Pipeline, "AutomationAccountResource.GetDscCompilationJobStreams", "value", null, cancellationToken); + } + /// /// Retrieve the linked workspace for the account id. /// @@ -2100,28 +2250,28 @@ public virtual Response ConvertGraphRunbookContent(Grap } /// - /// Get a single software update configuration Run by Id. + /// Get a single software update configuration machine run by Id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} /// /// /// Operation Id - /// SoftwareUpdateConfigurationRuns_GetById + /// SoftwareUpdateConfigurationMachineRuns_GetById /// /// /// - /// The Id of the software update configuration run. + /// The Id of the software update configuration machine run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual async Task> GetSoftwareUpdateConfigurationRunAsync(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSoftwareUpdateConfigurationMachineRunAsync(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRun"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRun"); scope.Start(); try { - var response = await _softwareUpdateConfigurationRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationMachineRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2132,28 +2282,28 @@ public virtual async Task> GetSoftwareU } /// - /// Get a single software update configuration Run by Id. + /// Get a single software update configuration machine run by Id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} /// /// /// Operation Id - /// SoftwareUpdateConfigurationRuns_GetById + /// SoftwareUpdateConfigurationMachineRuns_GetById /// /// /// - /// The Id of the software update configuration run. + /// The Id of the software update configuration machine run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual Response GetSoftwareUpdateConfigurationRun(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetSoftwareUpdateConfigurationMachineRun(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRun"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRun"); scope.Start(); try { - var response = _softwareUpdateConfigurationRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken); + var response = _softwareUpdateConfigurationMachineRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken); return response; } catch (Exception e) @@ -2164,78 +2314,78 @@ public virtual Response GetSoftwareUpdateConfigu } /// - /// Return list of software update configuration runs + /// Return list of software update configuration machine runs /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns /// /// /// Operation Id - /// SoftwareUpdateConfigurationRuns_List + /// SoftwareUpdateConfigurationMachineRuns_List /// /// /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// Number of entries you skip before returning results. + /// number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSoftwareUpdateConfigurationRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSoftwareUpdateConfigurationMachineRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, SoftwareUpdateConfigurationRun.DeserializeSoftwareUpdateConfigurationRun, _softwareUpdateConfigurationRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationRuns", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationMachineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, SoftwareUpdateConfigurationMachineRun.DeserializeSoftwareUpdateConfigurationMachineRun, _softwareUpdateConfigurationMachineRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns", "value", null, cancellationToken); } /// - /// Return list of software update configuration runs + /// Return list of software update configuration machine runs /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns /// /// /// Operation Id - /// SoftwareUpdateConfigurationRuns_List + /// SoftwareUpdateConfigurationMachineRuns_List /// /// /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// Number of entries you skip before returning results. + /// number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSoftwareUpdateConfigurationRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSoftwareUpdateConfigurationMachineRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, SoftwareUpdateConfigurationRun.DeserializeSoftwareUpdateConfigurationRun, _softwareUpdateConfigurationRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationRuns", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationMachineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, SoftwareUpdateConfigurationMachineRun.DeserializeSoftwareUpdateConfigurationMachineRun, _softwareUpdateConfigurationMachineRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns", "value", null, cancellationToken); } /// - /// Get a single software update configuration machine run by Id. + /// Get a single software update configuration Run by Id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} /// /// /// Operation Id - /// SoftwareUpdateConfigurationMachineRuns_GetById + /// SoftwareUpdateConfigurationRuns_GetById /// /// /// - /// The Id of the software update configuration machine run. + /// The Id of the software update configuration run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual async Task> GetSoftwareUpdateConfigurationMachineRunAsync(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSoftwareUpdateConfigurationRunAsync(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRun"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRun"); scope.Start(); try { - var response = await _softwareUpdateConfigurationMachineRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2246,28 +2396,28 @@ public virtual async Task> GetSo } /// - /// Get a single software update configuration machine run by Id. + /// Get a single software update configuration Run by Id. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} /// /// /// Operation Id - /// SoftwareUpdateConfigurationMachineRuns_GetById + /// SoftwareUpdateConfigurationRuns_GetById /// /// /// - /// The Id of the software update configuration machine run. + /// The Id of the software update configuration run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual Response GetSoftwareUpdateConfigurationMachineRun(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetSoftwareUpdateConfigurationRun(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRun"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRun"); scope.Start(); try { - var response = _softwareUpdateConfigurationMachineRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken); + var response = _softwareUpdateConfigurationRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken); return response; } catch (Exception e) @@ -2278,53 +2428,53 @@ public virtual Response GetSoftwareUpdate } /// - /// Return list of software update configuration machine runs + /// Return list of software update configuration runs /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns /// /// /// Operation Id - /// SoftwareUpdateConfigurationMachineRuns_List + /// SoftwareUpdateConfigurationRuns_List /// /// /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// number of entries you skip before returning results. + /// Number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSoftwareUpdateConfigurationMachineRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSoftwareUpdateConfigurationRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationMachineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, SoftwareUpdateConfigurationMachineRun.DeserializeSoftwareUpdateConfigurationMachineRun, _softwareUpdateConfigurationMachineRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, SoftwareUpdateConfigurationRun.DeserializeSoftwareUpdateConfigurationRun, _softwareUpdateConfigurationRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationRuns", "value", null, cancellationToken); } /// - /// Return list of software update configuration machine runs + /// Return list of software update configuration runs /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns /// /// /// Operation Id - /// SoftwareUpdateConfigurationMachineRuns_List + /// SoftwareUpdateConfigurationRuns_List /// /// /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// number of entries you skip before returning results. + /// Number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSoftwareUpdateConfigurationMachineRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSoftwareUpdateConfigurationRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationMachineRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, SoftwareUpdateConfigurationMachineRun.DeserializeSoftwareUpdateConfigurationMachineRun, _softwareUpdateConfigurationMachineRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _softwareUpdateConfigurationRunsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, SoftwareUpdateConfigurationRun.DeserializeSoftwareUpdateConfigurationRun, _softwareUpdateConfigurationRunsClientDiagnostics, Pipeline, "AutomationAccountResource.GetSoftwareUpdateConfigurationRuns", "value", null, cancellationToken); } /// diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobData.cs index c2b60fb2b67f..390d25bb5844 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobData.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobData.cs @@ -33,6 +33,7 @@ public AutomationJobData() /// Gets or sets the runbook. /// Gets or sets the job started by. /// Gets or sets the runOn which specifies the group name where the job is to be executed. + /// Runtime Environment Property. /// Gets or sets the id of the job. /// Gets or sets the creation time of the job. /// Gets or sets the status of the job. @@ -44,11 +45,12 @@ public AutomationJobData() /// Gets or sets the last status modified time of the job. /// Gets or sets the parameters of the job. /// The current provisioning state of the job. - internal AutomationJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RunbookAssociationProperty runbook, string startedBy, string runOn, Guid? jobId, DateTimeOffset? createdOn, AutomationJobStatus? status, string statusDetails, DateTimeOffset? startOn, DateTimeOffset? endOn, string exception, DateTimeOffset? lastModifiedOn, DateTimeOffset? lastStatusModifiedOn, IDictionary parameters, JobProvisioningState? provisioningState) : base(id, name, resourceType, systemData) + internal AutomationJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RunbookAssociationProperty runbook, string startedBy, string runOn, JobRuntimeEnvironment jobRuntimeEnvironment, Guid? jobId, DateTimeOffset? createdOn, AutomationJobStatus? status, string statusDetails, DateTimeOffset? startOn, DateTimeOffset? endOn, string exception, DateTimeOffset? lastModifiedOn, DateTimeOffset? lastStatusModifiedOn, IDictionary parameters, JobProvisioningState? provisioningState) : base(id, name, resourceType, systemData) { Runbook = runbook; StartedBy = startedBy; RunOn = runOn; + JobRuntimeEnvironment = jobRuntimeEnvironment; JobId = jobId; CreatedOn = createdOn; Status = status; @@ -80,6 +82,20 @@ public string RunbookName public string StartedBy { get; set; } /// Gets or sets the runOn which specifies the group name where the job is to be executed. public string RunOn { get; set; } + /// Runtime Environment Property. + internal JobRuntimeEnvironment JobRuntimeEnvironment { get; set; } + /// Name of Runtime Environment. + public string RuntimeEnvironmentName + { + get => JobRuntimeEnvironment is null ? default : JobRuntimeEnvironment.RuntimeEnvironmentName; + set + { + if (JobRuntimeEnvironment is null) + JobRuntimeEnvironment = new JobRuntimeEnvironment(); + JobRuntimeEnvironment.RuntimeEnvironmentName = value; + } + } + /// Gets or sets the id of the job. public Guid? JobId { get; set; } /// Gets or sets the creation time of the job. diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookData.cs index f7d4dc241ef8..189df16e2623 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookData.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookData.cs @@ -36,6 +36,7 @@ public AutomationRunbookData(AzureLocation location) : base(location) /// The tags. /// The location. /// Gets or sets the etag of the resource. + /// Runtime Environment of the runbook execution. /// Gets or sets the type of the runbook. /// Gets or sets the published runbook content link. /// Gets or sets the state of the runbook. @@ -51,9 +52,10 @@ public AutomationRunbookData(AzureLocation location) : base(location) /// Gets or sets the creation time. /// Gets or sets the last modified time. /// Gets or sets the description. - internal AutomationRunbookData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, AutomationRunbookType? runbookType, AutomationContentLink publishContentLink, RunbookState? state, bool? isLogVerboseEnabled, bool? isLogProgressEnabled, int? logActivityTrace, int? jobCount, IDictionary parameters, IList outputTypes, AutomationRunbookDraft draft, RunbookProvisioningState? provisioningState, string lastModifiedBy, DateTimeOffset? createdOn, DateTimeOffset? lastModifiedOn, string description) : base(id, name, resourceType, systemData, tags, location) + internal AutomationRunbookData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, string runtimeEnvironment, AutomationRunbookType? runbookType, AutomationContentLink publishContentLink, RunbookState? state, bool? isLogVerboseEnabled, bool? isLogProgressEnabled, int? logActivityTrace, int? jobCount, IDictionary parameters, IList outputTypes, AutomationRunbookDraft draft, RunbookProvisioningState? provisioningState, string lastModifiedBy, DateTimeOffset? createdOn, DateTimeOffset? lastModifiedOn, string description) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; + RuntimeEnvironment = runtimeEnvironment; RunbookType = runbookType; PublishContentLink = publishContentLink; State = state; @@ -73,6 +75,8 @@ internal AutomationRunbookData(ResourceIdentifier id, string name, ResourceType /// Gets or sets the etag of the resource. public ETag? ETag { get; set; } + /// Runtime Environment of the runbook execution. + public string RuntimeEnvironment { get; set; } /// Gets or sets the type of the runbook. public AutomationRunbookType? RunbookType { get; set; } /// Gets or sets the published runbook content link. diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs index fb4adce2a7e8..fee6f8c8c110 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs @@ -50,362 +50,362 @@ private static SubscriptionResourceExtensionClient GetSubscriptionResourceExtens return new SubscriptionResourceExtensionClient(client, scope); }); } - #region AutomationPrivateEndpointConnectionResource + #region SoftwareUpdateConfigurationResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationPrivateEndpointConnectionResource GetAutomationPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SoftwareUpdateConfigurationResource GetSoftwareUpdateConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationPrivateEndpointConnectionResource.ValidateResourceId(id); - return new AutomationPrivateEndpointConnectionResource(client, id); + SoftwareUpdateConfigurationResource.ValidateResourceId(id); + return new SoftwareUpdateConfigurationResource(client, id); } ); } #endregion - #region AutomationAccountPython2PackageResource + #region DscNodeResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationAccountPython2PackageResource GetAutomationAccountPython2PackageResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscNodeResource GetDscNodeResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationAccountPython2PackageResource.ValidateResourceId(id); - return new AutomationAccountPython2PackageResource(client, id); + DscNodeResource.ValidateResourceId(id); + return new DscNodeResource(client, id); } ); } #endregion - #region AutomationAccountModuleResource + #region AutomationAccountResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationAccountModuleResource GetAutomationAccountModuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationAccountResource GetAutomationAccountResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationAccountModuleResource.ValidateResourceId(id); - return new AutomationAccountModuleResource(client, id); + AutomationAccountResource.ValidateResourceId(id); + return new AutomationAccountResource(client, id); } ); } #endregion - #region DscNodeResource + #region AutomationCertificateResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscNodeResource GetDscNodeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationCertificateResource GetAutomationCertificateResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscNodeResource.ValidateResourceId(id); - return new DscNodeResource(client, id); + AutomationCertificateResource.ValidateResourceId(id); + return new AutomationCertificateResource(client, id); } ); } #endregion - #region DscNodeConfigurationResource + #region AutomationConnectionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscNodeConfigurationResource GetDscNodeConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationConnectionResource GetAutomationConnectionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscNodeConfigurationResource.ValidateResourceId(id); - return new DscNodeConfigurationResource(client, id); + AutomationConnectionResource.ValidateResourceId(id); + return new AutomationConnectionResource(client, id); } ); } #endregion - #region DscCompilationJobResource + #region AutomationConnectionTypeResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscCompilationJobResource GetDscCompilationJobResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationConnectionTypeResource GetAutomationConnectionTypeResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscCompilationJobResource.ValidateResourceId(id); - return new DscCompilationJobResource(client, id); + AutomationConnectionTypeResource.ValidateResourceId(id); + return new AutomationConnectionTypeResource(client, id); } ); } #endregion - #region AutomationSourceControlResource + #region AutomationCredentialResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationSourceControlResource GetAutomationSourceControlResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationCredentialResource GetAutomationCredentialResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationSourceControlResource.ValidateResourceId(id); - return new AutomationSourceControlResource(client, id); + AutomationCredentialResource.ValidateResourceId(id); + return new AutomationCredentialResource(client, id); } ); } #endregion - #region AutomationAccountResource + #region DscCompilationJobResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationAccountResource GetAutomationAccountResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscCompilationJobResource GetDscCompilationJobResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationAccountResource.ValidateResourceId(id); - return new AutomationAccountResource(client, id); + DscCompilationJobResource.ValidateResourceId(id); + return new DscCompilationJobResource(client, id); } ); } #endregion - #region AutomationCertificateResource + #region DscConfigurationResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationCertificateResource GetAutomationCertificateResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscConfigurationResource GetDscConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationCertificateResource.ValidateResourceId(id); - return new AutomationCertificateResource(client, id); + DscConfigurationResource.ValidateResourceId(id); + return new DscConfigurationResource(client, id); } ); } #endregion - #region AutomationConnectionResource + #region DscNodeConfigurationResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationConnectionResource GetAutomationConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscNodeConfigurationResource GetDscNodeConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationConnectionResource.ValidateResourceId(id); - return new AutomationConnectionResource(client, id); + DscNodeConfigurationResource.ValidateResourceId(id); + return new DscNodeConfigurationResource(client, id); } ); } #endregion - #region AutomationConnectionTypeResource + #region HybridRunbookWorkerResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationConnectionTypeResource GetAutomationConnectionTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridRunbookWorkerResource GetHybridRunbookWorkerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationConnectionTypeResource.ValidateResourceId(id); - return new AutomationConnectionTypeResource(client, id); + HybridRunbookWorkerResource.ValidateResourceId(id); + return new HybridRunbookWorkerResource(client, id); } ); } #endregion - #region AutomationCredentialResource + #region HybridRunbookWorkerGroupResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationCredentialResource GetAutomationCredentialResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridRunbookWorkerGroupResource GetHybridRunbookWorkerGroupResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationCredentialResource.ValidateResourceId(id); - return new AutomationCredentialResource(client, id); + HybridRunbookWorkerGroupResource.ValidateResourceId(id); + return new HybridRunbookWorkerGroupResource(client, id); } ); } #endregion - #region AutomationJobScheduleResource + #region AutomationJobResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationJobScheduleResource GetAutomationJobScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationJobResource GetAutomationJobResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationJobScheduleResource.ValidateResourceId(id); - return new AutomationJobScheduleResource(client, id); + AutomationJobResource.ValidateResourceId(id); + return new AutomationJobResource(client, id); } ); } #endregion - #region AutomationScheduleResource + #region AutomationJobScheduleResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationScheduleResource GetAutomationScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationJobScheduleResource GetAutomationJobScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationScheduleResource.ValidateResourceId(id); - return new AutomationScheduleResource(client, id); + AutomationJobScheduleResource.ValidateResourceId(id); + return new AutomationJobScheduleResource(client, id); } ); } #endregion - #region AutomationVariableResource + #region AutomationAccountModuleResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationVariableResource GetAutomationVariableResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationAccountModuleResource GetAutomationAccountModuleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationVariableResource.ValidateResourceId(id); - return new AutomationVariableResource(client, id); + AutomationAccountModuleResource.ValidateResourceId(id); + return new AutomationAccountModuleResource(client, id); } ); } #endregion - #region AutomationWatcherResource + #region AutomationAccountPython2PackageResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationWatcherResource GetAutomationWatcherResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationAccountPython2PackageResource GetAutomationAccountPython2PackageResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationWatcherResource.ValidateResourceId(id); - return new AutomationWatcherResource(client, id); + AutomationAccountPython2PackageResource.ValidateResourceId(id); + return new AutomationAccountPython2PackageResource(client, id); } ); } #endregion - #region DscConfigurationResource + #region AutomationAccountPython3PackageResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscConfigurationResource GetDscConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationAccountPython3PackageResource GetAutomationAccountPython3PackageResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscConfigurationResource.ValidateResourceId(id); - return new DscConfigurationResource(client, id); + AutomationAccountPython3PackageResource.ValidateResourceId(id); + return new AutomationAccountPython3PackageResource(client, id); } ); } #endregion - #region AutomationJobResource + #region PackageResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationJobResource GetAutomationJobResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static PackageResource GetPackageResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationJobResource.ValidateResourceId(id); - return new AutomationJobResource(client, id); + PackageResource.ValidateResourceId(id); + return new PackageResource(client, id); } ); } #endregion - #region SoftwareUpdateConfigurationResource + #region AutomationPrivateEndpointConnectionResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static SoftwareUpdateConfigurationResource GetSoftwareUpdateConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationPrivateEndpointConnectionResource GetAutomationPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SoftwareUpdateConfigurationResource.ValidateResourceId(id); - return new SoftwareUpdateConfigurationResource(client, id); + AutomationPrivateEndpointConnectionResource.ValidateResourceId(id); + return new AutomationPrivateEndpointConnectionResource(client, id); } ); } @@ -430,58 +430,115 @@ public static AutomationRunbookResource GetAutomationRunbookResource(this ArmCli } #endregion - #region AutomationWebhookResource + #region RuntimeEnvironmentResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationWebhookResource GetAutomationWebhookResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static RuntimeEnvironmentResource GetRuntimeEnvironmentResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationWebhookResource.ValidateResourceId(id); - return new AutomationWebhookResource(client, id); + RuntimeEnvironmentResource.ValidateResourceId(id); + return new RuntimeEnvironmentResource(client, id); } ); } #endregion - #region HybridRunbookWorkerResource + #region AutomationScheduleResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static HybridRunbookWorkerResource GetHybridRunbookWorkerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationScheduleResource GetAutomationScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - HybridRunbookWorkerResource.ValidateResourceId(id); - return new HybridRunbookWorkerResource(client, id); + AutomationScheduleResource.ValidateResourceId(id); + return new AutomationScheduleResource(client, id); } ); } #endregion - #region HybridRunbookWorkerGroupResource + #region AutomationSourceControlResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static HybridRunbookWorkerGroupResource GetHybridRunbookWorkerGroupResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationSourceControlResource GetAutomationSourceControlResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - HybridRunbookWorkerGroupResource.ValidateResourceId(id); - return new HybridRunbookWorkerGroupResource(client, id); + AutomationSourceControlResource.ValidateResourceId(id); + return new AutomationSourceControlResource(client, id); + } + ); + } + #endregion + + #region AutomationVariableResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AutomationVariableResource GetAutomationVariableResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AutomationVariableResource.ValidateResourceId(id); + return new AutomationVariableResource(client, id); + } + ); + } + #endregion + + #region AutomationWatcherResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AutomationWatcherResource GetAutomationWatcherResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AutomationWatcherResource.ValidateResourceId(id); + return new AutomationWatcherResource(client, id); + } + ); + } + #endregion + + #region AutomationWebhookResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AutomationWebhookResource GetAutomationWebhookResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AutomationWebhookResource.ValidateResourceId(id); + return new AutomationWebhookResource(client, id); } ); } @@ -544,87 +601,87 @@ public static Response GetAutomationAccount(this Reso } /// - /// Retrieve a list of accounts within a given subscription. + /// Retrieve deleted automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts /// /// /// Operation Id - /// AutomationAccount_List + /// deletedAutomationAccounts_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAutomationAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAutomationAccountsAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscriptionAsync(cancellationToken); } /// - /// Retrieve a list of accounts within a given subscription. + /// Retrieve deleted automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts /// /// /// Operation Id - /// AutomationAccount_List + /// deletedAutomationAccounts_ListBySubscription /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAutomationAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDeletedAutomationAccountsBySubscription(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAutomationAccounts(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscription(cancellationToken); } /// - /// Retrieve deleted automation account. + /// Retrieve a list of accounts within a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts /// /// /// Operation Id - /// deletedAutomationAccounts_ListBySubscription + /// AutomationAccount_List /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAutomationAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscriptionAsync(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAutomationAccountsAsync(cancellationToken); } /// - /// Retrieve deleted automation account. + /// Retrieve a list of accounts within a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts /// /// /// Operation Id - /// deletedAutomationAccounts_ListBySubscription + /// AutomationAccount_List /// /// /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDeletedAutomationAccountsBySubscription(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAutomationAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetSubscriptionResourceExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscription(cancellationToken); + return GetSubscriptionResourceExtensionClient(subscriptionResource).GetAutomationAccounts(cancellationToken); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 31a4ee41b117..c9329d410724 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -18,10 +18,10 @@ namespace Azure.ResourceManager.Automation /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _automationAccountClientDiagnostics; - private AutomationAccountRestOperations _automationAccountRestClient; private ClientDiagnostics _deletedAutomationAccountsClientDiagnostics; private DeletedAutomationAccountsRestOperations _deletedAutomationAccountsRestClient; + private ClientDiagnostics _automationAccountClientDiagnostics; + private AutomationAccountRestOperations _automationAccountRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -35,10 +35,10 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics AutomationAccountClientDiagnostics => _automationAccountClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountResource.ResourceType.Namespace, Diagnostics); - private AutomationAccountRestOperations AutomationAccountRestClient => _automationAccountRestClient ??= new AutomationAccountRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutomationAccountResource.ResourceType)); private ClientDiagnostics deletedAutomationAccountsClientDiagnostics => _deletedAutomationAccountsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); private DeletedAutomationAccountsRestOperations deletedAutomationAccountsRestClient => _deletedAutomationAccountsRestClient ??= new DeletedAutomationAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics AutomationAccountClientDiagnostics => _automationAccountClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountResource.ResourceType.Namespace, Diagnostics); + private AutomationAccountRestOperations AutomationAccountRestClient => _automationAccountRestClient ??= new AutomationAccountRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutomationAccountResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -47,89 +47,89 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Retrieve a list of accounts within a given subscription. + /// Retrieve deleted automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts /// /// /// Operation Id - /// AutomationAccount_List + /// deletedAutomationAccounts_ListBySubscription /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAutomationAccountsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AutomationAccountRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutomationAccountRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountResource(Client, AutomationAccountData.DeserializeAutomationAccountData(e)), AutomationAccountClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAutomationAccounts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => deletedAutomationAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeletedAutomationAccount.DeserializeDeletedAutomationAccount, deletedAutomationAccountsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription", "value", null, cancellationToken); } /// - /// Retrieve a list of accounts within a given subscription. + /// Retrieve deleted automation account. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts /// /// /// Operation Id - /// AutomationAccount_List + /// deletedAutomationAccounts_ListBySubscription /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAutomationAccounts(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeletedAutomationAccountsBySubscription(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AutomationAccountRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutomationAccountRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountResource(Client, AutomationAccountData.DeserializeAutomationAccountData(e)), AutomationAccountClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAutomationAccounts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => deletedAutomationAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, DeletedAutomationAccount.DeserializeDeletedAutomationAccount, deletedAutomationAccountsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription", "value", null, cancellationToken); } /// - /// Retrieve deleted automation account. + /// Retrieve a list of accounts within a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts /// /// /// Operation Id - /// deletedAutomationAccounts_ListBySubscription + /// AutomationAccount_List /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAutomationAccountsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => deletedAutomationAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeletedAutomationAccount.DeserializeDeletedAutomationAccount, deletedAutomationAccountsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AutomationAccountRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutomationAccountRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountResource(Client, AutomationAccountData.DeserializeAutomationAccountData(e)), AutomationAccountClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAutomationAccounts", "value", "nextLink", cancellationToken); } /// - /// Retrieve deleted automation account. + /// Retrieve a list of accounts within a given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts /// /// /// Operation Id - /// deletedAutomationAccounts_ListBySubscription + /// AutomationAccount_List /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDeletedAutomationAccountsBySubscription(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAutomationAccounts(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => deletedAutomationAccountsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, DeletedAutomationAccount.DeserializeDeletedAutomationAccount, deletedAutomationAccountsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription", "value", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AutomationAccountRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutomationAccountRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutomationAccountResource(Client, AutomationAccountData.DeserializeAutomationAccountData(e)), AutomationAccountClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetAutomationAccounts", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerCollection.cs index 9795d7b73d03..ad4b88d13051 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerCollection.cs @@ -69,20 +69,20 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The hybrid runbook worker id. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string hybridRunbookWorkerId, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); using var scope = _hybridRunbookWorkerClientDiagnostics.CreateScope("HybridRunbookWorkerCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _hybridRunbookWorkerRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, hybridRunbookWorkerId, content, cancellationToken).ConfigureAwait(false); + var response = await _hybridRunbookWorkerRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters, cancellationToken).ConfigureAwait(false); var operation = new AutomationArmOperation(Response.FromValue(new HybridRunbookWorkerResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); @@ -110,20 +110,20 @@ public virtual async Task> CreateOrUpd /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The hybrid runbook worker id. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string hybridRunbookWorkerId, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); using var scope = _hybridRunbookWorkerClientDiagnostics.CreateScope("HybridRunbookWorkerCollection.CreateOrUpdate"); scope.Start(); try { - var response = _hybridRunbookWorkerRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, hybridRunbookWorkerId, content, cancellationToken); + var response = _hybridRunbookWorkerRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters, cancellationToken); var operation = new AutomationArmOperation(Response.FromValue(new HybridRunbookWorkerResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerData.cs index 302712feac15..84358938fe62 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerData.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerData.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Automation.Models; using Azure.ResourceManager.Models; @@ -16,10 +17,11 @@ namespace Azure.ResourceManager.Automation /// A class representing the HybridRunbookWorker data model. /// Definition of hybrid runbook worker. /// - public partial class HybridRunbookWorkerData : ResourceData + public partial class HybridRunbookWorkerData : TrackedResourceData { /// Initializes a new instance of HybridRunbookWorkerData. - public HybridRunbookWorkerData() + /// The location. + public HybridRunbookWorkerData(AzureLocation location) : base(location) { } @@ -28,13 +30,15 @@ public HybridRunbookWorkerData() /// The name. /// The resourceType. /// The systemData. + /// The tags. + /// The location. /// Gets or sets the assigned machine IP address. /// Gets or sets the registration time of the worker machine. /// Last Heartbeat from the Worker. /// Azure Resource Manager Id for a virtual machine. /// Type of the HybridWorker. /// Name of the HybridWorker. - internal HybridRunbookWorkerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string ip, DateTimeOffset? registeredOn, DateTimeOffset? lastSeenOn, ResourceIdentifier vmResourceId, HybridWorkerType? workerType, string workerName) : base(id, name, resourceType, systemData) + internal HybridRunbookWorkerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string ip, DateTimeOffset? registeredOn, DateTimeOffset? lastSeenOn, ResourceIdentifier vmResourceId, HybridWorkerType? workerType, string workerName) : base(id, name, resourceType, systemData, tags, location) { IP = ip; RegisteredOn = registeredOn; diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupData.cs index 74d35d86c41b..366e358e93f5 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupData.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupData.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Automation.Models; using Azure.ResourceManager.Models; @@ -15,10 +16,11 @@ namespace Azure.ResourceManager.Automation /// A class representing the HybridRunbookWorkerGroup data model. /// Definition of hybrid runbook worker group. /// - public partial class HybridRunbookWorkerGroupData : ResourceData + public partial class HybridRunbookWorkerGroupData : TrackedResourceData { /// Initializes a new instance of HybridRunbookWorkerGroupData. - public HybridRunbookWorkerGroupData() + /// The location. + public HybridRunbookWorkerGroupData(AzureLocation location) : base(location) { } @@ -27,9 +29,11 @@ public HybridRunbookWorkerGroupData() /// The name. /// The resourceType. /// The systemData. + /// The tags. + /// The location. /// Type of the HybridWorkerGroup. /// Sets the credential of a worker group. - internal HybridRunbookWorkerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HybridWorkerGroup? groupType, RunAsCredentialAssociationProperty credential) : base(id, name, resourceType, systemData) + internal HybridRunbookWorkerGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, HybridWorkerGroup? groupType, RunAsCredentialAssociationProperty credential) : base(id, name, resourceType, systemData, tags, location) { GroupType = groupType; Credential = credential; diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.cs index 5b80699c1ecd..972b365bd7a6 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.cs @@ -220,7 +220,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Create a hybrid runbook worker. + /// Update a hybrid runbook worker. /// /// /// Request Path @@ -228,27 +228,23 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// HybridRunbookWorkers_Create + /// HybridRunbookWorkers_Patch /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); using var scope = _hybridRunbookWorkerClientDiagnostics.CreateScope("HybridRunbookWorkerResource.Update"); scope.Start(); try { - var response = await _hybridRunbookWorkerRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new AutomationArmOperation(Response.FromValue(new HybridRunbookWorkerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _hybridRunbookWorkerRestClient.PatchAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, hybridRunbookWorkerCreationParameters, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridRunbookWorkerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -258,7 +254,7 @@ public virtual async Task> UpdateAsync } /// - /// Create a hybrid runbook worker. + /// Update a hybrid runbook worker. /// /// /// Request Path @@ -266,27 +262,23 @@ public virtual async Task> UpdateAsync /// /// /// Operation Id - /// HybridRunbookWorkers_Create + /// HybridRunbookWorkers_Patch /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Update(HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); using var scope = _hybridRunbookWorkerClientDiagnostics.CreateScope("HybridRunbookWorkerResource.Update"); scope.Start(); try { - var response = _hybridRunbookWorkerRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new AutomationArmOperation(Response.FromValue(new HybridRunbookWorkerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; + var response = _hybridRunbookWorkerRestClient.Patch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, hybridRunbookWorkerCreationParameters, cancellationToken); + return Response.FromValue(new HybridRunbookWorkerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationContentLink.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationContentLink.cs index 8db527e9e527..fdcdcadf7568 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationContentLink.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationContentLink.cs @@ -18,7 +18,7 @@ public AutomationContentLink() } /// Initializes a new instance of AutomationContentLink. - /// Gets or sets the uri of the runbook content. + /// Gets or sets the uri of content. /// Gets or sets the hash. /// Gets or sets the version of the content. internal AutomationContentLink(Uri uri, AutomationContentHash contentHash, string version) @@ -28,7 +28,7 @@ internal AutomationContentLink(Uri uri, AutomationContentHash contentHash, strin Version = version; } - /// Gets or sets the uri of the runbook content. + /// Gets or sets the uri of content. public Uri Uri { get; set; } /// Gets or sets the hash. public AutomationContentHash ContentHash { get; set; } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.Serialization.cs index f3d79acba4a6..9095f1e8286a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.Serialization.cs @@ -19,6 +19,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(JobRuntimeEnvironment)) + { + writer.WritePropertyName("jobRuntimeEnvironment"u8); + writer.WriteObjectValue(JobRuntimeEnvironment); + } if (Optional.IsDefined(RunOn)) { writer.WritePropertyName("runOn"u8); @@ -40,12 +45,14 @@ internal static AutomationJobCollectionItemData DeserializeAutomationJobCollecti Optional systemData = default; Optional runbook = default; Optional jobId = default; + Optional startedBy = default; Optional creationTime = default; Optional status = default; Optional startTime = default; Optional endTime = default; Optional lastModifiedTime = default; Optional provisioningState = default; + Optional jobRuntimeEnvironment = default; Optional runOn = default; foreach (var property in element.EnumerateObject()) { @@ -100,6 +107,16 @@ internal static AutomationJobCollectionItemData DeserializeAutomationJobCollecti jobId = property0.Value.GetGuid(); continue; } + if (property0.NameEquals("startedBy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + startedBy = null; + continue; + } + startedBy = property0.Value.GetString(); + continue; + } if (property0.NameEquals("creationTime"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -153,6 +170,15 @@ internal static AutomationJobCollectionItemData DeserializeAutomationJobCollecti provisioningState = property0.Value.GetString(); continue; } + if (property0.NameEquals("jobRuntimeEnvironment"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobRuntimeEnvironment = JobRuntimeEnvironment.DeserializeJobRuntimeEnvironment(property0.Value); + continue; + } if (property0.NameEquals("runOn"u8)) { runOn = property0.Value.GetString(); @@ -162,7 +188,7 @@ internal static AutomationJobCollectionItemData DeserializeAutomationJobCollecti continue; } } - return new AutomationJobCollectionItemData(id, name, type, systemData.Value, runbook.Value, Optional.ToNullable(jobId), Optional.ToNullable(creationTime), Optional.ToNullable(status), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToNullable(lastModifiedTime), provisioningState.Value, runOn.Value); + return new AutomationJobCollectionItemData(id, name, type, systemData.Value, runbook.Value, Optional.ToNullable(jobId), startedBy.Value, Optional.ToNullable(creationTime), Optional.ToNullable(status), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToNullable(lastModifiedTime), provisioningState.Value, jobRuntimeEnvironment.Value, runOn.Value); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.cs index 0ddd6683165d..7d10d72ed3db 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobCollectionItemData.cs @@ -26,23 +26,27 @@ public AutomationJobCollectionItemData() /// The systemData. /// The runbook association. /// The id of the job. + /// Gets or sets the job started by. /// The creation time of the job. /// The status of the job. /// The start time of the job. /// The end time of the job. /// The last modified time of the job. /// The provisioning state of a resource. + /// Runtime Environment Property. /// Specifies the runOn group name where the job was executed. - internal AutomationJobCollectionItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RunbookAssociationProperty runbook, Guid? jobId, DateTimeOffset? createdOn, AutomationJobStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, DateTimeOffset? lastModifiedOn, string provisioningState, string runOn) : base(id, name, resourceType, systemData) + internal AutomationJobCollectionItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RunbookAssociationProperty runbook, Guid? jobId, string startedBy, DateTimeOffset? createdOn, AutomationJobStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, DateTimeOffset? lastModifiedOn, string provisioningState, JobRuntimeEnvironment jobRuntimeEnvironment, string runOn) : base(id, name, resourceType, systemData) { Runbook = runbook; JobId = jobId; + StartedBy = startedBy; CreatedOn = createdOn; Status = status; StartOn = startOn; EndOn = endOn; LastModifiedOn = lastModifiedOn; ProvisioningState = provisioningState; + JobRuntimeEnvironment = jobRuntimeEnvironment; RunOn = runOn; } @@ -56,6 +60,8 @@ public string RunbookName /// The id of the job. public Guid? JobId { get; } + /// Gets or sets the job started by. + public string StartedBy { get; } /// The creation time of the job. public DateTimeOffset? CreatedOn { get; } /// The status of the job. @@ -68,6 +74,20 @@ public string RunbookName public DateTimeOffset? LastModifiedOn { get; } /// The provisioning state of a resource. public string ProvisioningState { get; } + /// Runtime Environment Property. + internal JobRuntimeEnvironment JobRuntimeEnvironment { get; set; } + /// Name of Runtime Environment. + public string RuntimeEnvironmentName + { + get => JobRuntimeEnvironment is null ? default : JobRuntimeEnvironment.RuntimeEnvironmentName; + set + { + if (JobRuntimeEnvironment is null) + JobRuntimeEnvironment = new JobRuntimeEnvironment(); + JobRuntimeEnvironment.RuntimeEnvironmentName = value; + } + } + /// Specifies the runOn group name where the job was executed. public string RunOn { get; set; } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobData.Serialization.cs index 4c7c3e254e44..24da5d8b889c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobData.Serialization.cs @@ -36,6 +36,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("runOn"u8); writer.WriteStringValue(RunOn); } + if (Optional.IsDefined(JobRuntimeEnvironment)) + { + writer.WritePropertyName("jobRuntimeEnvironment"u8); + writer.WriteObjectValue(JobRuntimeEnvironment); + } if (Optional.IsDefined(JobId)) { writer.WritePropertyName("jobId"u8); @@ -142,6 +147,7 @@ internal static AutomationJobData DeserializeAutomationJobData(JsonElement eleme Optional runbook = default; Optional startedBy = default; Optional runOn = default; + Optional jobRuntimeEnvironment = default; Optional jobId = default; Optional creationTime = default; Optional status = default; @@ -207,6 +213,15 @@ internal static AutomationJobData DeserializeAutomationJobData(JsonElement eleme runOn = property0.Value.GetString(); continue; } + if (property0.NameEquals("jobRuntimeEnvironment"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobRuntimeEnvironment = JobRuntimeEnvironment.DeserializeJobRuntimeEnvironment(property0.Value); + continue; + } if (property0.NameEquals("jobId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -311,7 +326,7 @@ internal static AutomationJobData DeserializeAutomationJobData(JsonElement eleme continue; } } - return new AutomationJobData(id, name, type, systemData.Value, runbook.Value, startedBy.Value, runOn.Value, Optional.ToNullable(jobId), Optional.ToNullable(creationTime), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime), exception.Value, Optional.ToNullable(lastModifiedTime), Optional.ToNullable(lastStatusModifiedTime), Optional.ToDictionary(parameters), Optional.ToNullable(provisioningState)); + return new AutomationJobData(id, name, type, systemData.Value, runbook.Value, startedBy.Value, runOn.Value, jobRuntimeEnvironment.Value, Optional.ToNullable(jobId), Optional.ToNullable(creationTime), Optional.ToNullable(status), statusDetails.Value, Optional.ToNullable(startTime), Optional.ToNullable(endTime), exception.Value, Optional.ToNullable(lastModifiedTime), Optional.ToNullable(lastStatusModifiedTime), Optional.ToDictionary(parameters), Optional.ToNullable(provisioningState)); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobStream.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobStream.Serialization.cs index cdc5d7b5c678..799b16d81cad 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobStream.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationJobStream.Serialization.cs @@ -77,6 +77,11 @@ internal static AutomationJobStream DeserializeAutomationJobStream(JsonElement e } if (property0.NameEquals("summary"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + summary = null; + continue; + } summary = property0.Value.GetString(); continue; } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationModuleData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationModuleData.Serialization.cs index c0bf469f0dd9..db4a1cc66058 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationModuleData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationModuleData.Serialization.cs @@ -63,7 +63,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + writer.WriteStringValue(ProvisioningState.Value.ToString()); } if (Optional.IsDefined(ContentLink)) { @@ -224,7 +224,7 @@ internal static AutomationModuleData DeserializeAutomationModuleData(JsonElement { continue; } - provisioningState = property0.Value.GetString().ToModuleProvisioningState(); + provisioningState = new ModuleProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("contentLink"u8)) diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.Serialization.cs index d7d869125f33..267ec89543f0 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.Serialization.cs @@ -48,6 +48,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("logProgress"u8); writer.WriteBooleanValue(IsLogProgressEnabled.Value); } + if (Optional.IsDefined(RuntimeEnvironment)) + { + writer.WritePropertyName("runtimeEnvironment"u8); + writer.WriteStringValue(RuntimeEnvironment); + } writer.WritePropertyName("runbookType"u8); writer.WriteStringValue(RunbookType.ToString()); if (Optional.IsDefined(Draft)) diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.cs index f8012b028697..5dcdb3e88e16 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookCreateOrUpdateContent.cs @@ -31,6 +31,8 @@ public AutomationRunbookCreateOrUpdateContent(AutomationRunbookType runbookType) public bool? IsLogVerboseEnabled { get; set; } /// Gets or sets progress log option. public bool? IsLogProgressEnabled { get; set; } + /// Environment of the runbook. + public string RuntimeEnvironment { get; set; } /// Gets or sets the type of the runbook. public AutomationRunbookType RunbookType { get; } /// Gets or sets the draft runbook properties. diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookData.Serialization.cs index b4c74331395e..6dc7d29a9128 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookData.Serialization.cs @@ -40,6 +40,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Location); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(RuntimeEnvironment)) + { + writer.WritePropertyName("runtimeEnvironment"u8); + writer.WriteStringValue(RuntimeEnvironment); + } if (Optional.IsDefined(RunbookType)) { writer.WritePropertyName("runbookType"u8); @@ -143,6 +148,7 @@ internal static AutomationRunbookData DeserializeAutomationRunbookData(JsonEleme string name = default; ResourceType type = default; Optional systemData = default; + Optional runtimeEnvironment = default; Optional runbookType = default; Optional publishContentLink = default; Optional state = default; @@ -221,6 +227,11 @@ internal static AutomationRunbookData DeserializeAutomationRunbookData(JsonEleme } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("runtimeEnvironment"u8)) + { + runtimeEnvironment = property0.Value.GetString(); + continue; + } if (property0.NameEquals("runbookType"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -362,7 +373,7 @@ internal static AutomationRunbookData DeserializeAutomationRunbookData(JsonEleme continue; } } - return new AutomationRunbookData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(etag), Optional.ToNullable(runbookType), publishContentLink.Value, Optional.ToNullable(state), Optional.ToNullable(logVerbose), Optional.ToNullable(logProgress), Optional.ToNullable(logActivityTrace), Optional.ToNullable(jobCount), Optional.ToDictionary(parameters), Optional.ToList(outputTypes), draft.Value, Optional.ToNullable(provisioningState), lastModifiedBy.Value, Optional.ToNullable(creationTime), Optional.ToNullable(lastModifiedTime), description.Value); + return new AutomationRunbookData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(etag), runtimeEnvironment.Value, Optional.ToNullable(runbookType), publishContentLink.Value, Optional.ToNullable(state), Optional.ToNullable(logVerbose), Optional.ToNullable(logProgress), Optional.ToNullable(logActivityTrace), Optional.ToNullable(jobCount), Optional.ToDictionary(parameters), Optional.ToList(outputTypes), draft.Value, Optional.ToNullable(provisioningState), lastModifiedBy.Value, Optional.ToNullable(creationTime), Optional.ToNullable(lastModifiedTime), description.Value); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookType.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookType.cs index 3fd7d4bd640e..c35c6ec1d3f7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookType.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationRunbookType.cs @@ -30,6 +30,7 @@ public AutomationRunbookType(string value) private const string GraphPowerShellValue = "GraphPowerShell"; private const string Python2Value = "Python2"; private const string Python3Value = "Python3"; + private const string PythonValue = "Python"; /// Script. public static AutomationRunbookType Script { get; } = new AutomationRunbookType(ScriptValue); @@ -47,6 +48,8 @@ public AutomationRunbookType(string value) public static AutomationRunbookType Python2 { get; } = new AutomationRunbookType(Python2Value); /// Python3. public static AutomationRunbookType Python3 { get; } = new AutomationRunbookType(Python3Value); + /// Python. + public static AutomationRunbookType Python { get; } = new AutomationRunbookType(PythonValue); /// Determines if two values are the same. public static bool operator ==(AutomationRunbookType left, AutomationRunbookType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.Serialization.cs new file mode 100644 index 000000000000..a9a052d7bac6 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.Serialization.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class DeletedRunbook + { + internal static DeletedRunbook DeserializeDeletedRunbook(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional name = default; + Optional location = default; + Optional runbookId = default; + Optional runbookType = default; + Optional runtime = default; + Optional runtimeEnvironment = default; + Optional creationTime = default; + Optional deletionTime = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("runbookId"u8)) + { + runbookId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("runbookType"u8)) + { + runbookType = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("runtime"u8)) + { + runtime = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("runtimeEnvironment"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + runtimeEnvironment = null; + continue; + } + runtimeEnvironment = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("creationTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("deletionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deletionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + } + continue; + } + } + return new DeletedRunbook(id.Value, name.Value, Optional.ToNullable(location), runbookId.Value, runbookType.Value, runtime.Value, runtimeEnvironment.Value, Optional.ToNullable(creationTime), Optional.ToNullable(deletionTime)); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.cs new file mode 100644 index 000000000000..cfe03b190175 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbook.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + /// Definition of deleted runbook. + public partial class DeletedRunbook + { + /// Initializes a new instance of DeletedRunbook. + internal DeletedRunbook() + { + } + + /// Initializes a new instance of DeletedRunbook. + /// The resource id. + /// Gets or sets name of the resource. + /// Gets or sets the location of the resource. + /// Gets or sets the Runbook Id. + /// Type of the runbook. + /// Gets or sets runtime of the runbook. + /// Environment of the runbook. + /// Gets or sets the creation time. + /// Gets or sets the last modified time. + internal DeletedRunbook(string id, string name, AzureLocation? location, string runbookId, string runbookType, string runtime, string runtimeEnvironment, DateTimeOffset? createdOn, DateTimeOffset? deletedOn) + { + Id = id; + Name = name; + Location = location; + RunbookId = runbookId; + RunbookType = runbookType; + Runtime = runtime; + RuntimeEnvironment = runtimeEnvironment; + CreatedOn = createdOn; + DeletedOn = deletedOn; + } + + /// The resource id. + public string Id { get; } + /// Gets or sets name of the resource. + public string Name { get; } + /// Gets or sets the location of the resource. + public AzureLocation? Location { get; } + /// Gets or sets the Runbook Id. + public string RunbookId { get; } + /// Type of the runbook. + public string RunbookType { get; } + /// Gets or sets runtime of the runbook. + public string Runtime { get; } + /// Environment of the runbook. + public string RuntimeEnvironment { get; } + /// Gets or sets the creation time. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets the last modified time. + public DateTimeOffset? DeletedOn { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.Serialization.cs new file mode 100644 index 000000000000..f8da6c8049a7 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + internal partial class DeletedRunbookListResult + { + internal static DeletedRunbookListResult DeserializeDeletedRunbookListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeletedRunbook.DeserializeDeletedRunbook(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new DeletedRunbookListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.cs new file mode 100644 index 000000000000..a62db518401f --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/DeletedRunbookListResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + /// The response model for the list deleted runbook. + internal partial class DeletedRunbookListResult + { + /// Initializes a new instance of DeletedRunbookListResult. + internal DeletedRunbookListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of DeletedRunbookListResult. + /// List of deleted runbooks in automation account. + /// Gets or sets the next link. + internal DeletedRunbookListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// List of deleted runbooks in automation account. + public IReadOnlyList Value { get; } + /// Gets or sets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.Serialization.cs similarity index 73% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.Serialization.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.Serialization.cs index daf9a3f9f180..aba877559d69 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.Serialization.cs @@ -10,16 +10,11 @@ namespace Azure.ResourceManager.Automation.Models { - public partial class HybridRunbookWorkerCreateOrUpdateContent : IUtf8JsonSerializable + public partial class HybridRunbookWorkerCreateParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(VmResourceId)) diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.cs similarity index 75% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.cs index b44d52ebd9c1..adb36cdabe1c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateOrUpdateContent.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerCreateParameters.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.Automation.Models { /// The parameters supplied to the create hybrid runbook worker operation. - public partial class HybridRunbookWorkerCreateOrUpdateContent + public partial class HybridRunbookWorkerCreateParameters { - /// Initializes a new instance of HybridRunbookWorkerCreateOrUpdateContent. - public HybridRunbookWorkerCreateOrUpdateContent() + /// Initializes a new instance of HybridRunbookWorkerCreateParameters. + public HybridRunbookWorkerCreateParameters() { } /// Gets or sets the name of the resource. - public string Name { get; set; } + public string Name { get; } /// Azure Resource Manager Id for a virtual machine. public ResourceIdentifier VmResourceId { get; set; } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerData.Serialization.cs index a724cf760816..bfd9a61f0cb7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerData.Serialization.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Automation.Models; @@ -18,6 +19,19 @@ public partial class HybridRunbookWorkerData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IP)) @@ -60,6 +74,8 @@ internal static HybridRunbookWorkerData DeserializeHybridRunbookWorkerData(JsonE { return null; } + Optional> tags = default; + AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -72,6 +88,25 @@ internal static HybridRunbookWorkerData DeserializeHybridRunbookWorkerData(JsonE Optional workerName = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -155,7 +190,7 @@ internal static HybridRunbookWorkerData DeserializeHybridRunbookWorkerData(JsonE continue; } } - return new HybridRunbookWorkerData(id, name, type, systemData.Value, ip.Value, Optional.ToNullable(registeredDateTime), Optional.ToNullable(lastSeenDateTime), vmResourceId.Value, Optional.ToNullable(workerType), workerName.Value); + return new HybridRunbookWorkerData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, ip.Value, Optional.ToNullable(registeredDateTime), Optional.ToNullable(lastSeenDateTime), vmResourceId.Value, Optional.ToNullable(workerType), workerName.Value); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerGroupData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerGroupData.Serialization.cs index 68016053d295..32ed1167d8e3 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerGroupData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HybridRunbookWorkerGroupData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Automation.Models; @@ -17,6 +18,19 @@ public partial class HybridRunbookWorkerGroupData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(GroupType)) @@ -39,6 +53,8 @@ internal static HybridRunbookWorkerGroupData DeserializeHybridRunbookWorkerGroup { return null; } + Optional> tags = default; + AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -47,6 +63,25 @@ internal static HybridRunbookWorkerGroupData DeserializeHybridRunbookWorkerGroup Optional credential = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -102,7 +137,7 @@ internal static HybridRunbookWorkerGroupData DeserializeHybridRunbookWorkerGroup continue; } } - return new HybridRunbookWorkerGroupData(id, name, type, systemData.Value, Optional.ToNullable(groupType), credential.Value); + return new HybridRunbookWorkerGroupData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(groupType), credential.Value); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.Serialization.cs new file mode 100644 index 000000000000..e0f9a9296c5f --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + internal partial class JobRuntimeEnvironment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RuntimeEnvironmentName)) + { + writer.WritePropertyName("runtimeEnvironmentName"u8); + writer.WriteStringValue(RuntimeEnvironmentName); + } + writer.WriteEndObject(); + } + + internal static JobRuntimeEnvironment DeserializeJobRuntimeEnvironment(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional runtimeEnvironmentName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runtimeEnvironmentName"u8)) + { + runtimeEnvironmentName = property.Value.GetString(); + continue; + } + } + return new JobRuntimeEnvironment(runtimeEnvironmentName.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.cs new file mode 100644 index 000000000000..9b98201407f3 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/JobRuntimeEnvironment.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Automation.Models +{ + /// The runbook property associated with the entity. + internal partial class JobRuntimeEnvironment + { + /// Initializes a new instance of JobRuntimeEnvironment. + public JobRuntimeEnvironment() + { + } + + /// Initializes a new instance of JobRuntimeEnvironment. + /// Name of Runtime Environment. + internal JobRuntimeEnvironment(string runtimeEnvironmentName) + { + RuntimeEnvironmentName = runtimeEnvironmentName; + } + + /// Name of Runtime Environment. + public string RuntimeEnvironmentName { get; set; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs deleted file mode 100644 index 12f404ef471a..000000000000 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.Automation.Models -{ - internal static partial class ModuleProvisioningStateExtensions - { - public static string ToSerialString(this ModuleProvisioningState value) => value switch - { - ModuleProvisioningState.Created => "Created", - ModuleProvisioningState.Creating => "Creating", - ModuleProvisioningState.StartingImportModuleRunbook => "StartingImportModuleRunbook", - ModuleProvisioningState.RunningImportModuleRunbook => "RunningImportModuleRunbook", - ModuleProvisioningState.ContentRetrieved => "ContentRetrieved", - ModuleProvisioningState.ContentDownloaded => "ContentDownloaded", - ModuleProvisioningState.ContentValidated => "ContentValidated", - ModuleProvisioningState.ConnectionTypeImported => "ConnectionTypeImported", - ModuleProvisioningState.ContentStored => "ContentStored", - ModuleProvisioningState.ModuleDataStored => "ModuleDataStored", - ModuleProvisioningState.ActivitiesStored => "ActivitiesStored", - ModuleProvisioningState.ModuleImportRunbookComplete => "ModuleImportRunbookComplete", - ModuleProvisioningState.Succeeded => "Succeeded", - ModuleProvisioningState.Failed => "Failed", - ModuleProvisioningState.Cancelled => "Cancelled", - ModuleProvisioningState.Updating => "Updating", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModuleProvisioningState value.") - }; - - public static ModuleProvisioningState ToModuleProvisioningState(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Created")) return ModuleProvisioningState.Created; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Creating")) return ModuleProvisioningState.Creating; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "StartingImportModuleRunbook")) return ModuleProvisioningState.StartingImportModuleRunbook; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "RunningImportModuleRunbook")) return ModuleProvisioningState.RunningImportModuleRunbook; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ContentRetrieved")) return ModuleProvisioningState.ContentRetrieved; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ContentDownloaded")) return ModuleProvisioningState.ContentDownloaded; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ContentValidated")) return ModuleProvisioningState.ContentValidated; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ConnectionTypeImported")) return ModuleProvisioningState.ConnectionTypeImported; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ContentStored")) return ModuleProvisioningState.ContentStored; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ModuleDataStored")) return ModuleProvisioningState.ModuleDataStored; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ActivitiesStored")) return ModuleProvisioningState.ActivitiesStored; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ModuleImportRunbookComplete")) return ModuleProvisioningState.ModuleImportRunbookComplete; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Succeeded")) return ModuleProvisioningState.Succeeded; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Failed")) return ModuleProvisioningState.Failed; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Cancelled")) return ModuleProvisioningState.Cancelled; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Updating")) return ModuleProvisioningState.Updating; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModuleProvisioningState value."); - } - } -} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs index 630023c2ebd5..72dc334a5108 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs @@ -5,42 +5,89 @@ #nullable disable +using System; +using System.ComponentModel; + namespace Azure.ResourceManager.Automation.Models { /// Gets or sets the provisioning state of the module. - public enum ModuleProvisioningState + public readonly partial struct ModuleProvisioningState : IEquatable { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ModuleProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string CreatingValue = "Creating"; + private const string StartingImportModuleRunbookValue = "StartingImportModuleRunbook"; + private const string RunningImportModuleRunbookValue = "RunningImportModuleRunbook"; + private const string ContentRetrievedValue = "ContentRetrieved"; + private const string ContentDownloadedValue = "ContentDownloaded"; + private const string ContentValidatedValue = "ContentValidated"; + private const string ConnectionTypeImportedValue = "ConnectionTypeImported"; + private const string ContentStoredValue = "ContentStored"; + private const string ModuleDataStoredValue = "ModuleDataStored"; + private const string ActivitiesStoredValue = "ActivitiesStored"; + private const string ModuleImportRunbookCompleteValue = "ModuleImportRunbookComplete"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string UpdatingValue = "Updating"; + /// Created. - Created, + public static ModuleProvisioningState Created { get; } = new ModuleProvisioningState(CreatedValue); /// Creating. - Creating, + public static ModuleProvisioningState Creating { get; } = new ModuleProvisioningState(CreatingValue); /// StartingImportModuleRunbook. - StartingImportModuleRunbook, + public static ModuleProvisioningState StartingImportModuleRunbook { get; } = new ModuleProvisioningState(StartingImportModuleRunbookValue); /// RunningImportModuleRunbook. - RunningImportModuleRunbook, + public static ModuleProvisioningState RunningImportModuleRunbook { get; } = new ModuleProvisioningState(RunningImportModuleRunbookValue); /// ContentRetrieved. - ContentRetrieved, + public static ModuleProvisioningState ContentRetrieved { get; } = new ModuleProvisioningState(ContentRetrievedValue); /// ContentDownloaded. - ContentDownloaded, + public static ModuleProvisioningState ContentDownloaded { get; } = new ModuleProvisioningState(ContentDownloadedValue); /// ContentValidated. - ContentValidated, + public static ModuleProvisioningState ContentValidated { get; } = new ModuleProvisioningState(ContentValidatedValue); /// ConnectionTypeImported. - ConnectionTypeImported, + public static ModuleProvisioningState ConnectionTypeImported { get; } = new ModuleProvisioningState(ConnectionTypeImportedValue); /// ContentStored. - ContentStored, + public static ModuleProvisioningState ContentStored { get; } = new ModuleProvisioningState(ContentStoredValue); /// ModuleDataStored. - ModuleDataStored, + public static ModuleProvisioningState ModuleDataStored { get; } = new ModuleProvisioningState(ModuleDataStoredValue); /// ActivitiesStored. - ActivitiesStored, + public static ModuleProvisioningState ActivitiesStored { get; } = new ModuleProvisioningState(ActivitiesStoredValue); /// ModuleImportRunbookComplete. - ModuleImportRunbookComplete, + public static ModuleProvisioningState ModuleImportRunbookComplete { get; } = new ModuleProvisioningState(ModuleImportRunbookCompleteValue); /// Succeeded. - Succeeded, + public static ModuleProvisioningState Succeeded { get; } = new ModuleProvisioningState(SucceededValue); /// Failed. - Failed, + public static ModuleProvisioningState Failed { get; } = new ModuleProvisioningState(FailedValue); /// Cancelled. - Cancelled, + public static ModuleProvisioningState Cancelled { get; } = new ModuleProvisioningState(CancelledValue); /// Updating. - Updating + public static ModuleProvisioningState Updating { get; } = new ModuleProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(ModuleProvisioningState left, ModuleProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ModuleProvisioningState left, ModuleProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ModuleProvisioningState(string value) => new ModuleProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ModuleProvisioningState other && Equals(other); + /// + public bool Equals(ModuleProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.Serialization.cs new file mode 100644 index 000000000000..33297ee43ce9 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class PackageCreateOrUpdateContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AllOf)) + { + writer.WritePropertyName("allOf"u8); + writer.WriteObjectValue(AllOf); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("contentLink"u8); + writer.WriteObjectValue(ContentLink); + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.cs new file mode 100644 index 000000000000..98f655924ebd --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageCreateOrUpdateContent.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + /// The parameters supplied to the create or update package operation. + public partial class PackageCreateOrUpdateContent + { + /// Initializes a new instance of PackageCreateOrUpdateContent. + /// Gets or sets the package content link. + /// is null. + public PackageCreateOrUpdateContent(AutomationContentLink contentLink) + { + Argument.AssertNotNull(contentLink, nameof(contentLink)); + + ContentLink = contentLink; + } + + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + public TrackedResource AllOf { get; set; } + /// Gets or sets the package content link. + public AutomationContentLink ContentLink { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageData.Serialization.cs new file mode 100644 index 000000000000..f8b3a52b6976 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageData.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Automation.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation +{ + public partial class PackageData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Default)) + { + writer.WritePropertyName("default"u8); + writer.WriteBooleanValue(Default.Value); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(SizeInBytes)) + { + writer.WritePropertyName("sizeInBytes"u8); + writer.WriteNumberValue(SizeInBytes.Value); + } + if (Optional.IsDefined(ContentLink)) + { + writer.WritePropertyName("contentLink"u8); + writer.WriteObjectValue(ContentLink); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static PackageData DeserializePackageData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional @default = default; + Optional version = default; + Optional sizeInBytes = default; + Optional provisioningState = default; + Optional contentLink = default; + Optional error = default; + Optional allOf = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("default"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @default = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("sizeInBytes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeInBytes = property0.Value.GetInt64(); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PackageProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("contentLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentLink = AutomationContentLink.DeserializeAutomationContentLink(property0.Value); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = PackageErrorInfo.DeserializePackageErrorInfo(property0.Value); + continue; + } + if (property0.NameEquals("allOf"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allOf = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } + } + continue; + } + } + return new PackageData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(@default), version.Value, Optional.ToNullable(sizeInBytes), Optional.ToNullable(provisioningState), contentLink.Value, error.Value, allOf); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.Serialization.cs new file mode 100644 index 000000000000..b576c449d6c9 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class PackageErrorInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + writer.WriteEndObject(); + } + + internal static PackageErrorInfo DeserializePackageErrorInfo(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new PackageErrorInfo(code.Value, message.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.cs new file mode 100644 index 000000000000..a17693152b8b --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageErrorInfo.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Automation.Models +{ + /// Definition of the package error info type. + public partial class PackageErrorInfo + { + /// Initializes a new instance of PackageErrorInfo. + public PackageErrorInfo() + { + } + + /// Initializes a new instance of PackageErrorInfo. + /// Package import error code. + /// Package import error message. + internal PackageErrorInfo(string code, string message) + { + Code = code; + Message = message; + } + + /// Package import error code. + public string Code { get; set; } + /// Package import error message. + public string Message { get; set; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.Serialization.cs new file mode 100644 index 000000000000..5c964ffe0d14 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Automation; + +namespace Azure.ResourceManager.Automation.Models +{ + internal partial class PackageListResult + { + internal static PackageListResult DeserializePackageListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PackageData.DeserializePackageData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new PackageListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.cs new file mode 100644 index 000000000000..cebc48e16a62 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Automation; + +namespace Azure.ResourceManager.Automation.Models +{ + /// The response model for the list runtime environments operation. + internal partial class PackageListResult + { + /// Initializes a new instance of PackageListResult. + internal PackageListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of PackageListResult. + /// list of the Packages of the runtime environment. + /// Gets the next link. + internal PackageListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// list of the Packages of the runtime environment. + public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.Serialization.cs new file mode 100644 index 000000000000..e5c42b40e577 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class PackagePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AllOf)) + { + writer.WritePropertyName("allOf"u8); + writer.WriteObjectValue(AllOf); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ContentLink)) + { + writer.WritePropertyName("contentLink"u8); + writer.WriteObjectValue(ContentLink); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.cs new file mode 100644 index 000000000000..7d7f55a0b9a0 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackagePatch.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Automation.Models +{ + /// The parameters supplied to the update package operation. + public partial class PackagePatch + { + /// Initializes a new instance of PackagePatch. + public PackagePatch() + { + } + + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + public TrackedResource AllOf { get; set; } + /// Gets or sets the package content link. + public AutomationContentLink ContentLink { get; set; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageProvisioningState.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageProvisioningState.cs new file mode 100644 index 000000000000..0d8dce4e1027 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PackageProvisioningState.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Automation.Models +{ + /// Gets or sets the provisioning state of the Package. + public readonly partial struct PackageProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PackageProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string CreatingValue = "Creating"; + private const string StartingImportModuleRunbookValue = "StartingImportModuleRunbook"; + private const string RunningImportModuleRunbookValue = "RunningImportModuleRunbook"; + private const string ContentRetrievedValue = "ContentRetrieved"; + private const string ContentDownloadedValue = "ContentDownloaded"; + private const string ContentValidatedValue = "ContentValidated"; + private const string ConnectionTypeImportedValue = "ConnectionTypeImported"; + private const string ContentStoredValue = "ContentStored"; + private const string ModuleDataStoredValue = "ModuleDataStored"; + private const string ActivitiesStoredValue = "ActivitiesStored"; + private const string ModuleImportRunbookCompleteValue = "ModuleImportRunbookComplete"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string UpdatingValue = "Updating"; + + /// Created. + public static PackageProvisioningState Created { get; } = new PackageProvisioningState(CreatedValue); + /// Creating. + public static PackageProvisioningState Creating { get; } = new PackageProvisioningState(CreatingValue); + /// StartingImportModuleRunbook. + public static PackageProvisioningState StartingImportModuleRunbook { get; } = new PackageProvisioningState(StartingImportModuleRunbookValue); + /// RunningImportModuleRunbook. + public static PackageProvisioningState RunningImportModuleRunbook { get; } = new PackageProvisioningState(RunningImportModuleRunbookValue); + /// ContentRetrieved. + public static PackageProvisioningState ContentRetrieved { get; } = new PackageProvisioningState(ContentRetrievedValue); + /// ContentDownloaded. + public static PackageProvisioningState ContentDownloaded { get; } = new PackageProvisioningState(ContentDownloadedValue); + /// ContentValidated. + public static PackageProvisioningState ContentValidated { get; } = new PackageProvisioningState(ContentValidatedValue); + /// ConnectionTypeImported. + public static PackageProvisioningState ConnectionTypeImported { get; } = new PackageProvisioningState(ConnectionTypeImportedValue); + /// ContentStored. + public static PackageProvisioningState ContentStored { get; } = new PackageProvisioningState(ContentStoredValue); + /// ModuleDataStored. + public static PackageProvisioningState ModuleDataStored { get; } = new PackageProvisioningState(ModuleDataStoredValue); + /// ActivitiesStored. + public static PackageProvisioningState ActivitiesStored { get; } = new PackageProvisioningState(ActivitiesStoredValue); + /// ModuleImportRunbookComplete. + public static PackageProvisioningState ModuleImportRunbookComplete { get; } = new PackageProvisioningState(ModuleImportRunbookCompleteValue); + /// Succeeded. + public static PackageProvisioningState Succeeded { get; } = new PackageProvisioningState(SucceededValue); + /// Failed. + public static PackageProvisioningState Failed { get; } = new PackageProvisioningState(FailedValue); + /// Canceled. + public static PackageProvisioningState Canceled { get; } = new PackageProvisioningState(CanceledValue); + /// Updating. + public static PackageProvisioningState Updating { get; } = new PackageProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(PackageProvisioningState left, PackageProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PackageProvisioningState left, PackageProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PackageProvisioningState(string value) => new PackageProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PackageProvisioningState other && Equals(other); + /// + public bool Equals(PackageProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs similarity index 91% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs index d31378ddbb58..0ac19f40d481 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Automation.Models { - public partial class AutomationAccountPython2PackageCreateOrUpdateContent : IUtf8JsonSerializable + public partial class PythonPackageCreateParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs similarity index 77% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs index d5b4e28384f1..1e69b06bd120 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs @@ -12,12 +12,12 @@ namespace Azure.ResourceManager.Automation.Models { /// The parameters supplied to the create or update module operation. - public partial class AutomationAccountPython2PackageCreateOrUpdateContent + public partial class PythonPackageCreateParameters { - /// Initializes a new instance of AutomationAccountPython2PackageCreateOrUpdateContent. + /// Initializes a new instance of PythonPackageCreateParameters. /// Gets or sets the module content link. /// is null. - public AutomationAccountPython2PackageCreateOrUpdateContent(AutomationContentLink contentLink) + public PythonPackageCreateParameters(AutomationContentLink contentLink) { Argument.AssertNotNull(contentLink, nameof(contentLink)); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs similarity index 90% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs index 8f2073e414f8..a4414d712a04 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Automation.Models { - public partial class AutomationAccountPython2PackagePatch : IUtf8JsonSerializable + public partial class PythonPackageUpdateParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs similarity index 72% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs index 8e7e70b8feb3..580027aae863 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs @@ -11,10 +11,10 @@ namespace Azure.ResourceManager.Automation.Models { /// The parameters supplied to the update module operation. - public partial class AutomationAccountPython2PackagePatch + public partial class PythonPackageUpdateParameters { - /// Initializes a new instance of AutomationAccountPython2PackagePatch. - public AutomationAccountPython2PackagePatch() + /// Initializes a new instance of PythonPackageUpdateParameters. + public PythonPackageUpdateParameters() { Tags = new ChangeTrackingDictionary(); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.Serialization.cs index 017e2f76e34e..775809034c28 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("runOn"u8); writer.WriteStringValue(RunOn); } + if (Optional.IsDefined(RuntimeEnvironment)) + { + writer.WritePropertyName("runtimeEnvironment"u8); + writer.WriteStringValue(RuntimeEnvironment); + } writer.WriteEndObject(); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.cs index 05eb744bd64c..2284282e5ebf 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookTestJobCreateContent.cs @@ -23,5 +23,7 @@ public RunbookTestJobCreateContent() public IDictionary Parameters { get; } /// Gets or sets the runOn which specifies the group name where the job is to be executed. public string RunOn { get; set; } + /// The runtime Environment Name on which job needs to be tested. + public string RuntimeEnvironment { get; set; } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentData.Serialization.cs new file mode 100644 index 000000000000..bd74824c1b9e --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentData.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation +{ + public partial class RuntimeEnvironmentData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DefaultPackages)) + { + writer.WritePropertyName("defaultPackages"u8); + writer.WriteStartObject(); + foreach (var item in DefaultPackages) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("runtime"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static RuntimeEnvironmentData DeserializeRuntimeEnvironmentData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + Optional> defaultPackages = default; + Optional description = default; + Optional language = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("defaultPackages"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + defaultPackages = dictionary; + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("runtime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("language"u8)) + { + language = property1.Value.GetString(); + continue; + } + if (property1.NameEquals("version"u8)) + { + version = property1.Value.GetString(); + continue; + } + } + continue; + } + } + continue; + } + } + return new RuntimeEnvironmentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToDictionary(defaultPackages), description.Value, language.Value, version.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.Serialization.cs new file mode 100644 index 000000000000..5422b8cb16be --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Automation; + +namespace Azure.ResourceManager.Automation.Models +{ + internal partial class RuntimeEnvironmentListResult + { + internal static RuntimeEnvironmentListResult DeserializeRuntimeEnvironmentListResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> value = default; + Optional nextLink = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(item)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + } + return new RuntimeEnvironmentListResult(Optional.ToList(value), nextLink.Value); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.cs new file mode 100644 index 000000000000..4391022e17c4 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Automation; + +namespace Azure.ResourceManager.Automation.Models +{ + /// List of all the Runtime Environments of automation account. + internal partial class RuntimeEnvironmentListResult + { + /// Initializes a new instance of RuntimeEnvironmentListResult. + internal RuntimeEnvironmentListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of RuntimeEnvironmentListResult. + /// list of RuntimeEnvironment. + /// Gets or sets the next link. + internal RuntimeEnvironmentListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// list of RuntimeEnvironment. + public IReadOnlyList Value { get; } + /// Gets or sets the next link. + public string NextLink { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.Serialization.cs new file mode 100644 index 000000000000..c62ec7a6524a --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class RuntimeEnvironmentPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DefaultPackages)) + { + writer.WritePropertyName("defaultPackages"u8); + writer.WriteStartObject(); + foreach (var item in DefaultPackages) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.cs new file mode 100644 index 000000000000..e1226565e8e2 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RuntimeEnvironmentPatch.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation.Models +{ + /// The parameters supplied to the update automation account operation. + public partial class RuntimeEnvironmentPatch + { + /// Initializes a new instance of RuntimeEnvironmentPatch. + public RuntimeEnvironmentPatch() + { + DefaultPackages = new ChangeTrackingDictionary(); + } + + /// Metadata pertaining to creation and last modification of the resource. + public SystemData SystemData { get; } + /// List of Default packages for Environment. + public IDictionary DefaultPackages { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.Serialization.cs new file mode 100644 index 000000000000..db757ba01b81 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation.Models +{ + public partial class TrackedResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static TrackedResource DeserializeTrackedResource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new TrackedResource(id, name, type, systemData.Value, Optional.ToDictionary(tags), location); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.cs new file mode 100644 index 000000000000..65842d7e74dd --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/TrackedResource.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation.Models +{ + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + public partial class TrackedResource : ResourceData + { + /// Initializes a new instance of TrackedResource. + /// The geo-location where the resource lives. + public TrackedResource(AzureLocation location) + { + Tags = new ChangeTrackingDictionary(); + Location = location; + } + + /// Initializes a new instance of TrackedResource. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource tags. + /// The geo-location where the resource lives. + internal TrackedResource(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location) : base(id, name, resourceType, systemData) + { + Tags = tags; + Location = location; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The geo-location where the resource lives. + public AzureLocation Location { get; set; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageCollection.cs new file mode 100644 index 000000000000..c0d4756c2f51 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageCollection.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPackages method from an instance of . + /// + public partial class PackageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _packageClientDiagnostics; + private readonly PackageRestOperations _packageRestClient; + private readonly ClientDiagnostics _packageClientDiagnostics0; + private readonly PackagesRestOperations _packageRestClient0; + + /// Initializes a new instance of the class for mocking. + protected PackageCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PackageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _packageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", PackageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PackageResource.ResourceType, out string packageApiVersion); + _packageRestClient = new PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, packageApiVersion); + _packageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", PackageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PackageResource.ResourceType, out string packageApiVersion); + _packageRestClient = new PackagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, packageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != RuntimeEnvironmentResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, RuntimeEnvironmentResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Package. + /// The create or update parameters for Package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _packageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, content, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(Response.FromValue(new PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the package identified by package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_CreateOrUpdate + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of Package. + /// The create or update parameters for Package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _packageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, content, cancellationToken); + var operation = new AutomationArmOperation(Response.FromValue(new PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.Get"); + scope.Start(); + try + { + var response = await _packageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.Get"); + scope.Start(); + try + { + var response = _packageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the a list of Packages + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages + /// + /// + /// Operation Id + /// Packages_ListByRuntimeEnvironment + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _packageRestClient.CreateListByRuntimeEnvironmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _packageRestClient.CreateListByRuntimeEnvironmentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PackageResource(Client, PackageData.DeserializePackageData(e)), _packageClientDiagnostics, Pipeline, "PackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Retrieve the a list of Packages + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages + /// + /// + /// Operation Id + /// Packages_ListByRuntimeEnvironment + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _packageRestClient.CreateListByRuntimeEnvironmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _packageRestClient.CreateListByRuntimeEnvironmentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PackageResource(Client, PackageData.DeserializePackageData(e)), _packageClientDiagnostics, Pipeline, "PackageCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.Exists"); + scope.Start(); + try + { + var response = await _packageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.Exists"); + scope.Start(); + try + { + var response = _packageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _packageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageCollection.GetIfExists"); + scope.Start(); + try + { + var response = _packageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, packageName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageData.cs new file mode 100644 index 000000000000..62f5ff36ac86 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageData.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Automation.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing the Package data model. + /// Definition of the Package type. + /// + public partial class PackageData : TrackedResourceData + { + /// Initializes a new instance of PackageData. + /// The location. + public PackageData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of PackageData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Gets or sets the isGlobal flag of the package. + /// Gets or sets the version of the Package. + /// Gets or sets the size in bytes of the Package. + /// Gets or sets the provisioning state of the Package. + /// Gets or sets the contentLink of the Package. + /// Gets or sets the error info of the Package. + /// Metadata pertaining to creation and last modification of the resource. + internal PackageData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, bool? @default, string version, long? sizeInBytes, PackageProvisioningState? provisioningState, AutomationContentLink contentLink, PackageErrorInfo error, SystemData allOf) : base(id, name, resourceType, systemData, tags, location) + { + Default = @default; + Version = version; + SizeInBytes = sizeInBytes; + ProvisioningState = provisioningState; + ContentLink = contentLink; + Error = error; + AllOf = allOf; + } + + /// Gets or sets the isGlobal flag of the package. + public bool? Default { get; set; } + /// Gets or sets the version of the Package. + public string Version { get; set; } + /// Gets or sets the size in bytes of the Package. + public long? SizeInBytes { get; set; } + /// Gets or sets the provisioning state of the Package. + public PackageProvisioningState? ProvisioningState { get; } + /// Gets or sets the contentLink of the Package. + public AutomationContentLink ContentLink { get; set; } + /// Gets or sets the error info of the Package. + public PackageErrorInfo Error { get; set; } + /// Metadata pertaining to creation and last modification of the resource. + public SystemData AllOf { get; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageResource.cs new file mode 100644 index 000000000000..5f23ad4a77e0 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/PackageResource.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A Class representing a Package along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPackageResource method. + /// Otherwise you can get one from its parent resource using the GetPackage method. + /// + public partial class PackageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _packageClientDiagnostics; + private readonly PackageRestOperations _packageRestClient; + private readonly PackageData _data; + + /// Initializes a new instance of the class for mocking. + protected PackageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PackageResource(ArmClient client, PackageData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PackageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _packageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string packageApiVersion); + _packageRestClient = new PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, packageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Automation/automationAccounts/runtimeEnvironments/packages"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PackageData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Get"); + scope.Start(); + try + { + var response = await _packageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Get"); + scope.Start(); + try + { + var response = _packageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the package by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Delete"); + scope.Start(); + try + { + var response = await _packageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the package by name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Delete"); + scope.Start(); + try + { + var response = _packageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Update + /// + /// + /// + /// The update parameters for Package. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(PackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Update"); + scope.Start(); + try + { + var response = await _packageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Update + /// + /// + /// + /// The update parameters for Package. + /// The cancellation token to use. + /// is null. + public virtual Response Update(PackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _packageClientDiagnostics.CreateScope("PackageResource.Update"); + scope.Start(); + try + { + var response = _packageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs index 730c4bf28060..37d3ec85f9bc 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs @@ -33,7 +33,7 @@ public ActivityRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AgentRegistrationInformationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AgentRegistrationInformationRestOperations.cs index d0ee93d38414..c60d6423edb1 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AgentRegistrationInformationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AgentRegistrationInformationRestOperations.cs @@ -33,7 +33,7 @@ public AgentRegistrationInformationRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs index fb8924576173..e90be5ad9d7e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs @@ -33,7 +33,7 @@ public AutomationAccountRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -503,6 +503,85 @@ public Response List(string subscriptionId, Cancell } } + internal HttpMessage CreateListDeletedRunbooksRequest(string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/listDeletedRunbooks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the deleted runbooks for an automation account. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListDeletedRunbooksAsync(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListDeletedRunbooksRequest(subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeletedRunbookListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeletedRunbookListResult.DeserializeDeletedRunbookListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the deleted runbooks for an automation account. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListDeletedRunbooks(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListDeletedRunbooksRequest(subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeletedRunbookListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeletedRunbookListResult.DeserializeDeletedRunbookListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); @@ -642,5 +721,81 @@ public Response ListNextPage(string nextLink, strin throw new RequestFailedException(message.Response); } } + + internal HttpMessage CreateListDeletedRunbooksNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the deleted runbooks for an automation account. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListDeletedRunbooksNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListDeletedRunbooksNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeletedRunbookListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeletedRunbookListResult.DeserializeDeletedRunbookListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the deleted runbooks for an automation account. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListDeletedRunbooksNextPage(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListDeletedRunbooksNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeletedRunbookListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeletedRunbookListResult.DeserializeDeletedRunbookListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs index 8bba8a024da1..8128e809a266 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs @@ -33,7 +33,7 @@ public AutomationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs index 4c6fa807f5c5..ece01abb6e55 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs @@ -33,7 +33,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs index 9dac78844eae..d64e1986ddbe 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs @@ -33,7 +33,7 @@ public ConnectionRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs index 61912b2814d9..88278c4897a7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs @@ -33,7 +33,7 @@ public ConnectionTypeRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs index 460f78381e05..2deeaaf50333 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs @@ -33,7 +33,7 @@ public CredentialRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DeletedAutomationAccountsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DeletedAutomationAccountsRestOperations.cs index e357d9490d2a..0ffefcf39cad 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DeletedAutomationAccountsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DeletedAutomationAccountsRestOperations.cs @@ -33,7 +33,7 @@ public DeletedAutomationAccountsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-31"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobRestOperations.cs index 1a18943ee1ce..72b52f31ba42 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobRestOperations.cs @@ -33,7 +33,7 @@ public DscCompilationJobRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobStreamRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobStreamRestOperations.cs index 54c9b07bf98f..6d3bf19ca25c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobStreamRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscCompilationJobStreamRestOperations.cs @@ -33,7 +33,7 @@ public DscCompilationJobStreamRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs index 2fb3243517f3..b8d590c14af4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs @@ -34,7 +34,7 @@ public DscConfigurationRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs index c3894607ede3..64d3f4f41a45 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs @@ -33,7 +33,7 @@ public DscNodeConfigurationRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeRestOperations.cs index 18cf3579734a..c53ee3e0ef0f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeRestOperations.cs @@ -33,7 +33,7 @@ public DscNodeRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs index a44f3f999984..696a23dbf973 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs @@ -33,7 +33,7 @@ public FieldsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs index 6c696bc75152..2b734dcf7638 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs @@ -33,7 +33,7 @@ public HybridRunbookWorkerGroupRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -247,6 +247,7 @@ public async Task> CreateAsync(string sub switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerGroupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); @@ -280,6 +281,7 @@ public Response Create(string subscriptionId, stri switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerGroupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs index eea189dc3f5a..c72a0f2e2e4c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs @@ -33,7 +33,7 @@ public HybridRunbookWorkersRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -213,7 +213,7 @@ public Response Get(string subscriptionId, string resou } } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateOrUpdateContent content) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,9 +234,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(hybridRunbookWorkerCreationParameters); + request.Content = content; _userAgent.Apply(message); return message; } @@ -247,24 +247,25 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// The name of the automation account. /// The hybrid runbook worker group name. /// The hybrid runbook worker id. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(hybridRunbookWorkerGroupName, nameof(hybridRunbookWorkerGroupName)); Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, content); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); @@ -282,20 +283,119 @@ public async Task> CreateAsync(string subscrip /// The name of the automation account. /// The hybrid runbook worker group name. /// The hybrid runbook worker id. - /// The create or update parameters for hybrid runbook worker. + /// The create or update parameters for hybrid runbook worker. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(hybridRunbookWorkerGroupName, nameof(hybridRunbookWorkerGroupName)); Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + HybridRunbookWorkerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = HybridRunbookWorkerData.DeserializeHybridRunbookWorkerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreatePatchRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/hybridRunbookWorkerGroups/", false); + uri.AppendPath(hybridRunbookWorkerGroupName, true); + uri.AppendPath("/hybridRunbookWorkers/", false); + uri.AppendPath(hybridRunbookWorkerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(hybridRunbookWorkerCreationParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a hybrid runbook worker. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The hybrid runbook worker group name. + /// The hybrid runbook worker id. + /// The create or update parameters for hybrid runbook worker. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> PatchAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(hybridRunbookWorkerGroupName, nameof(hybridRunbookWorkerGroupName)); + Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); + + using var message = CreatePatchRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HybridRunbookWorkerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = HybridRunbookWorkerData.DeserializeHybridRunbookWorkerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a hybrid runbook worker. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The hybrid runbook worker group name. + /// The hybrid runbook worker id. + /// The create or update parameters for hybrid runbook worker. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Patch(string subscriptionId, string resourceGroupName, string automationAccountName, string hybridRunbookWorkerGroupName, string hybridRunbookWorkerId, HybridRunbookWorkerCreateParameters hybridRunbookWorkerCreationParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(hybridRunbookWorkerGroupName, nameof(hybridRunbookWorkerGroupName)); + Argument.AssertNotNullOrEmpty(hybridRunbookWorkerId, nameof(hybridRunbookWorkerId)); + Argument.AssertNotNull(hybridRunbookWorkerCreationParameters, nameof(hybridRunbookWorkerCreationParameters)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, content); + using var message = CreatePatchRequest(subscriptionId, resourceGroupName, automationAccountName, hybridRunbookWorkerGroupName, hybridRunbookWorkerId, hybridRunbookWorkerCreationParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs index 030001ee55f8..bb80f219b84f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs @@ -34,7 +34,7 @@ public JobRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs index f5e1bbb64e46..ccccf060e253 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs @@ -33,7 +33,7 @@ public JobScheduleRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs index 31456023d2bc..0f0b2a328e7f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs @@ -33,7 +33,7 @@ public JobStreamRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs index 7533178f3bfb..0e958f5cc561 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs @@ -33,7 +33,7 @@ public KeysRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs index e68393737e08..330454b56a81 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs @@ -33,7 +33,7 @@ public LinkedWorkspaceRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs index b532922dbd85..c71cdeaed2b7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs @@ -33,7 +33,7 @@ public ModuleRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeCountInformationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeCountInformationRestOperations.cs index de26d76067c7..08b47732f060 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeCountInformationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeCountInformationRestOperations.cs @@ -33,7 +33,7 @@ public NodeCountInformationRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeReportsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeReportsRestOperations.cs index b072d41c007e..32aad65eb770 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeReportsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/NodeReportsRestOperations.cs @@ -33,7 +33,7 @@ public NodeReportsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs index a9f1dcd1a258..a04bdd6a45e7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs @@ -33,7 +33,7 @@ public ObjectDataTypesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackageRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackageRestOperations.cs new file mode 100644 index 000000000000..a745915f3f62 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackageRestOperations.cs @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + internal partial class PackageRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PackageRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PackageRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-05-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendPath("/packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. The name is case insensitive. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The Package name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. The name is case insensitive. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The Package name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendPath("/packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the Package identified by Package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The Package name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PackageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the Package identified by Package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The Package name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PackageData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackageCreateOrUpdateContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendPath("/packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Create or update the package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The name of Package. + /// The create or update parameters for Package. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + PackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The name of Package. + /// The create or update parameters for Package. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + PackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackagePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendPath("/packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the Package identified by Package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The name of Package. + /// The update parameters for Package. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PackageData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the Package identified by Package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The name of Package. + /// The update parameters for Package. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, string packageName, PackagePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, packageName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PackageData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PackageData.DeserializePackageData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackagesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackagesRestOperations.cs new file mode 100644 index 000000000000..a55921fac060 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PackagesRestOperations.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + internal partial class PackagesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PackagesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PackagesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-05-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateListByRuntimeEnvironmentRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendPath("/packages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the a list of Packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByRuntimeEnvironmentAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateListByRuntimeEnvironmentRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PackageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PackageListResult.DeserializePackageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the a list of Packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByRuntimeEnvironment(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateListByRuntimeEnvironmentRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PackageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PackageListResult.DeserializePackageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByRuntimeEnvironmentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the a list of Packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByRuntimeEnvironmentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateListByRuntimeEnvironmentNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PackageListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PackageListResult.DeserializePackageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the a list of Packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByRuntimeEnvironmentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateListByRuntimeEnvironmentNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PackageListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PackageListResult.DeserializePackageListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index ca9457a84e8f..06e54bb14908 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -33,7 +33,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 22efd95de23d..59d220c652e2 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -33,7 +33,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs index fa26d06f1a2a..b5de00414c42 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs @@ -33,7 +33,7 @@ public Python2PackageRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -199,7 +199,7 @@ public Response Get(string subscriptionId, string resource } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -218,9 +218,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageCreateParameters); + request.Content = content; _userAgent.Apply(message); return message; } @@ -230,19 +230,19 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, content); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -264,19 +264,19 @@ public async Task> CreateOrUpdateAsync(string sub /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, content); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -293,7 +293,7 @@ public Response CreateOrUpdate(string subscriptionId, stri } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -313,7 +313,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); + content.JsonWriter.WriteObjectValue(pythonPackageUpdateParameters); request.Content = content; _userAgent.Apply(message); return message; @@ -324,19 +324,19 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -357,19 +357,19 @@ public async Task> UpdateAsync(string subscriptio /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs new file mode 100644 index 000000000000..9114f8f78727 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + internal partial class Python3PackageRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of Python3PackageRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public Python3PackageRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-05-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the python 3 package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the python 3 package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutomationModuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutomationModuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageCreateParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AutomationModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AutomationModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageUpdateParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutomationModuleData.DeserializeAutomationModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountRequest(string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of python 3 packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountAsync(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutomationModuleListResult.DeserializeAutomationModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of python 3 packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccount(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutomationModuleListResult.DeserializeAutomationModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of python 3 packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AutomationModuleListResult.DeserializeAutomationModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of python 3 packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutomationModuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AutomationModuleListResult.DeserializeAutomationModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs index 44230bd4d3fe..1614944c3377 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs @@ -34,7 +34,7 @@ public RunbookDraftRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -126,7 +126,7 @@ public Response GetContent(string subscriptionId, string resourceGroupNa /// Name of an Azure Resource group. /// The name of the automation account. /// The runbook name. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -155,7 +155,7 @@ public async Task ReplaceContentAsync(string subscriptionId, string re /// Name of an Azure Resource group. /// The name of the automation account. /// The runbook name. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs index db97ed2c36b9..c68ff0728c58 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs @@ -34,7 +34,7 @@ public RunbookRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RuntimeEnvironmentsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RuntimeEnvironmentsRestOperations.cs new file mode 100644 index 000000000000..7107196412f7 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RuntimeEnvironmentsRestOperations.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + internal partial class RuntimeEnvironmentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RuntimeEnvironmentsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RuntimeEnvironmentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-05-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update an Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// Parameters supplied to the Runtime Environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update an Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// Parameters supplied to the Runtime Environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// Parameters supplied to the create the runtime environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + RuntimeEnvironmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// Parameters supplied to the create the runtime environment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, RuntimeEnvironmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + RuntimeEnvironmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments/", false); + uri.AppendPath(runtimeEnvironmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get information about the Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RuntimeEnvironmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get information about the Runtime Environment. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, runtimeEnvironmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RuntimeEnvironmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountRequest(string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/runtimeEnvironments", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of RuntimeEnvironments. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountAsync(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RuntimeEnvironmentListResult.DeserializeRuntimeEnvironmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of RuntimeEnvironments. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccount(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RuntimeEnvironmentListResult.DeserializeRuntimeEnvironmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of RuntimeEnvironments. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RuntimeEnvironmentListResult.DeserializeRuntimeEnvironmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of RuntimeEnvironments. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RuntimeEnvironmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RuntimeEnvironmentListResult.DeserializeRuntimeEnvironmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs index 039481b56683..535f33b78d6e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs @@ -33,7 +33,7 @@ public ScheduleRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs index 8419a29e66b9..c9d5c4f78115 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs @@ -33,7 +33,7 @@ public SoftwareUpdateConfigurationMachineRunsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs index ebdabc7b11e0..4ae2dd0580b4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs @@ -33,7 +33,7 @@ public SoftwareUpdateConfigurationRunsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationsRestOperations.cs index 6fde91c078e6..f272f7038433 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationsRestOperations.cs @@ -33,7 +33,7 @@ public SoftwareUpdateConfigurationsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs index 4c088b7c4aca..172838d25713 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs index f61bf8c8d445..f6d211cb21ca 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlSyncJobRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs index d0155cca6751..26ae22f36ba0 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlSyncJobStreamsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs index 0b19c3b3b5f9..20e68884b2a7 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs @@ -33,7 +33,7 @@ public StatisticsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs index e051e18faf2d..50d81d3b206d 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs @@ -33,7 +33,7 @@ public TestJobRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs index 4f02c96457fd..913ae50215ea 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs @@ -33,7 +33,7 @@ public TestJobStreamsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs index 6e617a03bf32..e56d8c5870cd 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs @@ -33,7 +33,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs index 070768c9cc0f..5d1fa9f2aebb 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs @@ -33,7 +33,7 @@ public VariableRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WatcherRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WatcherRestOperations.cs index 57f377785a97..ae0bac2bacac 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WatcherRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WatcherRestOperations.cs @@ -33,7 +33,7 @@ public WatcherRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WebhookRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WebhookRestOperations.cs index 1fc18b8f9d58..809cf98df7e4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WebhookRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/WebhookRestOperations.cs @@ -33,7 +33,7 @@ public WebhookRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2015-10-31"; + _apiVersion = apiVersion ?? "2023-05-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentCollection.cs new file mode 100644 index 000000000000..09024ab47d26 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentCollection.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetRuntimeEnvironments method from an instance of . + /// + public partial class RuntimeEnvironmentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _runtimeEnvironmentClientDiagnostics; + private readonly RuntimeEnvironmentsRestOperations _runtimeEnvironmentRestClient; + + /// Initializes a new instance of the class for mocking. + protected RuntimeEnvironmentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal RuntimeEnvironmentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _runtimeEnvironmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", RuntimeEnvironmentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RuntimeEnvironmentResource.ResourceType, out string runtimeEnvironmentApiVersion); + _runtimeEnvironmentRestClient = new RuntimeEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, runtimeEnvironmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AutomationAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AutomationAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or update Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Runtime Environment. + /// Parameters supplied to the create the runtime environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string runtimeEnvironmentName, RuntimeEnvironmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, data, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(Response.FromValue(new RuntimeEnvironmentResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Create + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Runtime Environment. + /// Parameters supplied to the create the runtime environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string runtimeEnvironmentName, RuntimeEnvironmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, data, cancellationToken); + var operation = new AutomationArmOperation(Response.FromValue(new RuntimeEnvironmentResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about the Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.Get"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about the Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.Get"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve a list of RuntimeEnvironments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments + /// + /// + /// Operation Id + /// RuntimeEnvironments_ListByAutomationAccount + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _runtimeEnvironmentRestClient.CreateListByAutomationAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _runtimeEnvironmentRestClient.CreateListByAutomationAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RuntimeEnvironmentResource(Client, RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(e)), _runtimeEnvironmentClientDiagnostics, Pipeline, "RuntimeEnvironmentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Retrieve a list of RuntimeEnvironments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments + /// + /// + /// Operation Id + /// RuntimeEnvironments_ListByAutomationAccount + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _runtimeEnvironmentRestClient.CreateListByAutomationAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _runtimeEnvironmentRestClient.CreateListByAutomationAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RuntimeEnvironmentResource(Client, RuntimeEnvironmentData.DeserializeRuntimeEnvironmentData(e)), _runtimeEnvironmentClientDiagnostics, Pipeline, "RuntimeEnvironmentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.Exists"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.Exists"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The name of the Runtime Environment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string runtimeEnvironmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runtimeEnvironmentName, nameof(runtimeEnvironmentName)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, runtimeEnvironmentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentData.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentData.cs new file mode 100644 index 000000000000..2ea90f3c913d --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentData.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing the RuntimeEnvironment data model. + /// Definition of the Runtime Environment type. + /// + public partial class RuntimeEnvironmentData : TrackedResourceData + { + /// Initializes a new instance of RuntimeEnvironmentData. + /// The location. + public RuntimeEnvironmentData(AzureLocation location) : base(location) + { + DefaultPackages = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of RuntimeEnvironmentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// List of Default packages for Environment. + /// Gets or sets the description. + /// Language of Runtime Environment. + /// Version of Language. + internal RuntimeEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IDictionary defaultPackages, string description, string language, string version) : base(id, name, resourceType, systemData, tags, location) + { + DefaultPackages = defaultPackages; + Description = description; + Language = language; + Version = version; + } + + /// List of Default packages for Environment. + public IDictionary DefaultPackages { get; } + /// Gets or sets the description. + public string Description { get; set; } + /// Language of Runtime Environment. + public string Language { get; set; } + /// Version of Language. + public string Version { get; set; } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentResource.cs new file mode 100644 index 000000000000..45d2623bd4ff --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RuntimeEnvironmentResource.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A Class representing a RuntimeEnvironment along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetRuntimeEnvironmentResource method. + /// Otherwise you can get one from its parent resource using the GetRuntimeEnvironment method. + /// + public partial class RuntimeEnvironmentResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string automationAccountName, string runtimeEnvironmentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _runtimeEnvironmentClientDiagnostics; + private readonly RuntimeEnvironmentsRestOperations _runtimeEnvironmentRestClient; + private readonly RuntimeEnvironmentData _data; + + /// Initializes a new instance of the class for mocking. + protected RuntimeEnvironmentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RuntimeEnvironmentResource(ArmClient client, RuntimeEnvironmentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal RuntimeEnvironmentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _runtimeEnvironmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string runtimeEnvironmentApiVersion); + _runtimeEnvironmentRestClient = new RuntimeEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, runtimeEnvironmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Automation/automationAccounts/runtimeEnvironments"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual RuntimeEnvironmentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of PackageResources in the RuntimeEnvironment. + /// An object representing collection of PackageResources and their operations over a PackageResource. + public virtual PackageCollection GetPackages() + { + return GetCachedClient(Client => new PackageCollection(Client, Id)); + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetPackageAsync(string packageName, CancellationToken cancellationToken = default) + { + return await GetPackages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the Package identified by Package name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName} + /// + /// + /// Operation Id + /// Package_Get + /// + /// + /// + /// The Package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetPackage(string packageName, CancellationToken cancellationToken = default) + { + return GetPackages().Get(packageName, cancellationToken); + } + + /// + /// Get information about the Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Get"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about the Runtime Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Get"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Runtime Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Delete"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the Runtime Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Delete + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Delete"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update an Runtime Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Update + /// + /// + /// + /// Parameters supplied to the Runtime Environment. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(RuntimeEnvironmentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Update"); + scope.Start(); + try + { + var response = await _runtimeEnvironmentRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update an Runtime Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName} + /// + /// + /// Operation Id + /// RuntimeEnvironments_Update + /// + /// + /// + /// Parameters supplied to the Runtime Environment. + /// The cancellation token to use. + /// is null. + public virtual Response Update(RuntimeEnvironmentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _runtimeEnvironmentClientDiagnostics.CreateScope("RuntimeEnvironmentResource.Update"); + scope.Start(); + try + { + var response = _runtimeEnvironmentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new RuntimeEnvironmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md b/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md index fee1b8f7a8d1..acd2e725f3f6 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md +++ b/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Automation namespace: Azure.ResourceManager.Automation -require: https://github.com/Azure/azure-rest-api-specs/blob/d1b0569d8adbd342a1111d6a69764d099f5f717c/specification/automation/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automation/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: