diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md index 1c978d6bf152f..fba0c9c52640a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2023-07-12) + +- Azure Resource Manager Dynatrace client library for Java. This package contains Microsoft Azure SDK for Dynatrace Management SDK. Package tag package-2023-04-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md index 7888684827b52..2b2bf40ba1eaa 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Dynatrace client library for Java. -This package contains Microsoft Azure SDK for Dynatrace Management SDK. Package tag package-2021-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Dynatrace Management SDK. Package tag package-2023-04-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dynatrace - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md index 7ffe4ff5e5a9d..286aee1dd5ed7 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md @@ -5,8 +5,9 @@ - [CreateOrUpdate](#monitors_createorupdate) - [Delete](#monitors_delete) -- [GetAccountCredentials](#monitors_getaccountcredentials) - [GetByResourceGroup](#monitors_getbyresourcegroup) +- [GetMarketplaceSaaSResourceDetails](#monitors_getmarketplacesaasresourcedetails) +- [GetMetricStatus](#monitors_getmetricstatus) - [GetSsoDetails](#monitors_getssodetails) - [GetVMHostPayload](#monitors_getvmhostpayload) - [List](#monitors_list) @@ -33,7 +34,6 @@ - [Delete](#tagrules_delete) - [Get](#tagrules_get) - [List](#tagrules_list) -- [Update](#tagrules_update) ### Monitors_CreateOrUpdate ```java @@ -54,7 +54,7 @@ import java.util.Map; /** Samples for Monitors CreateOrUpdate. */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MaximumSet_Gen. @@ -94,7 +94,7 @@ public final class MonitorsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MinimumSet_Gen. @@ -127,12 +127,10 @@ public final class MonitorsCreateOrUpdateSamples { ### Monitors_Delete ```java -import com.azure.core.util.Context; - /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MinimumSet_Gen.json */ /** * Sample code: Monitors_Delete_MinimumSet_Gen. @@ -140,11 +138,11 @@ public final class MonitorsDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MaximumSet_Gen.json */ /** * Sample code: Monitors_Delete_MaximumSet_Gen. @@ -152,75 +150,122 @@ public final class MonitorsDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + +### Monitors_GetByResourceGroup + +```java +/** Samples for Monitors GetByResourceGroup. */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_Get_MinimumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_Get_MaximumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` -### Monitors_GetAccountCredentials +### Monitors_GetMarketplaceSaaSResourceDetails ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; -/** Samples for Monitors GetAccountCredentials. */ -public final class MonitorsGetAccountCredentialsSamples { +/** Samples for Monitors GetMarketplaceSaaSResourceDetails. */ +public final class MonitorsGetMarketplaceSaaSResourceDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetAccountCredentials_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json */ /** - * Sample code: Monitors_GetAccountCredentials_MaximumSet_Gen. + * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen. * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetAccountCredentialsMaximumSetGen( + public static void monitorsGetMarketplaceSaaSResourceDetailsMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getAccountCredentialsWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getMarketplaceSaaSResourceDetailsWithResponse( + new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetAccountCredentials_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json */ /** - * Sample code: Monitors_GetAccountCredentials_MinimumSet_Gen. + * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen. * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetAccountCredentialsMinimumSetGen( + public static void monitorsGetMarketplaceSaaSResourceDetailsMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getAccountCredentialsWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getMarketplaceSaaSResourceDetailsWithResponse( + new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), + com.azure.core.util.Context.NONE); } } ``` -### Monitors_GetByResourceGroup +### Monitors_GetMetricStatus ```java -import com.azure.core.util.Context; - -/** Samples for Monitors GetByResourceGroup. */ -public final class MonitorsGetByResourceGroupSamples { +/** Samples for Monitors GetMetricStatus. */ +public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** - * Sample code: Monitors_Get_MinimumSet_Gen. + * Sample code: Monitors_GetMetricStatus_MinimumSet_Gen. * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + public static void monitorsGetMetricStatusMinimumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** - * Sample code: Monitors_Get_MaximumSet_Gen. + * Sample code: Monitors_GetMetricStatus_MaximumSet_Gen. * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + public static void monitorsGetMetricStatusMaximumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } } ``` @@ -228,13 +273,12 @@ public final class MonitorsGetByResourceGroupSamples { ### Monitors_GetSsoDetails ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; /** Samples for Monitors GetSsoDetails. */ public final class MonitorsGetSsoDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetSSODetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MaximumSet_Gen. @@ -249,11 +293,11 @@ public final class MonitorsGetSsoDetailsSamples { "myResourceGroup", "myMonitor", new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetSSODetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MinimumSet_Gen. @@ -264,7 +308,11 @@ public final class MonitorsGetSsoDetailsSamples { com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager .monitors() - .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", new SsoDetailsRequest(), Context.NONE); + .getSsoDetailsWithResponse( + "myResourceGroup", + "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), + com.azure.core.util.Context.NONE); } } ``` @@ -272,12 +320,10 @@ public final class MonitorsGetSsoDetailsSamples { ### Monitors_GetVMHostPayload ```java -import com.azure.core.util.Context; - /** Samples for Monitors GetVMHostPayload. */ public final class MonitorsGetVMHostPayloadSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MinimumSet_Gen. @@ -286,11 +332,13 @@ public final class MonitorsGetVMHostPayloadSamples { */ public static void monitorsGetVMHostPayloadMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MaximumSet_Gen. @@ -299,7 +347,9 @@ public final class MonitorsGetVMHostPayloadSamples { */ public static void monitorsGetVMHostPayloadMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -307,12 +357,10 @@ public final class MonitorsGetVMHostPayloadSamples { ### Monitors_List ```java -import com.azure.core.util.Context; - /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MinimumSet_Gen. @@ -321,11 +369,11 @@ public final class MonitorsListSamples { */ public static void monitorsListBySubscriptionIdMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MaximumSet_Gen. @@ -334,7 +382,7 @@ public final class MonitorsListSamples { */ public static void monitorsListBySubscriptionIdMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } } ``` @@ -342,12 +390,10 @@ public final class MonitorsListSamples { ### Monitors_ListAppServices ```java -import com.azure.core.util.Context; - /** Samples for Monitors ListAppServices. */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MaximumSet_Gen. @@ -356,11 +402,11 @@ public final class MonitorsListAppServicesSamples { */ public static void monitorsListAppServicesMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listAppServices("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MinimumSet_Gen. @@ -369,7 +415,7 @@ public final class MonitorsListAppServicesSamples { */ public static void monitorsListAppServicesMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listAppServices("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -377,12 +423,10 @@ public final class MonitorsListAppServicesSamples { ### Monitors_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MinimumSet_Gen. @@ -391,11 +435,11 @@ public final class MonitorsListByResourceGroupSamples { */ public static void monitorsListByResourceGroupMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MaximumSet_Gen. @@ -404,7 +448,7 @@ public final class MonitorsListByResourceGroupSamples { */ public static void monitorsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } ``` @@ -412,12 +456,10 @@ public final class MonitorsListByResourceGroupSamples { ### Monitors_ListHosts ```java -import com.azure.core.util.Context; - /** Samples for Monitors ListHosts. */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListHosts_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MinimumSet_Gen. @@ -425,11 +467,11 @@ public final class MonitorsListHostsSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListHosts_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MaximumSet_Gen. @@ -437,7 +479,7 @@ public final class MonitorsListHostsSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -445,13 +487,12 @@ public final class MonitorsListHostsSamples { ### Monitors_ListLinkableEnvironments ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; /** Samples for Monitors ListLinkableEnvironments. */ public final class MonitorsListLinkableEnvironmentsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MinimumSet_Gen. @@ -462,11 +503,18 @@ public final class MonitorsListLinkableEnvironmentsSamples { com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager .monitors() - .listLinkableEnvironments("myResourceGroup", "myMonitor", new LinkableEnvironmentRequest(), Context.NONE); + .listLinkableEnvironments( + "myResourceGroup", + "myMonitor", + new LinkableEnvironmentRequest() + .withTenantId("00000000-0000-0000-0000-000000000000") + .withUserPrincipal("alice@microsoft.com") + .withRegion("East US"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MaximumSet_Gen. @@ -484,7 +532,7 @@ public final class MonitorsListLinkableEnvironmentsSamples { .withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -492,12 +540,10 @@ public final class MonitorsListLinkableEnvironmentsSamples { ### Monitors_ListMonitoredResources ```java -import com.azure.core.util.Context; - /** Samples for Monitors ListMonitoredResources. */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MinimumSet_Gen. @@ -506,11 +552,11 @@ public final class MonitorsListMonitoredResourcesSamples { */ public static void monitorsListMonitoredResourcesMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MaximumSet_Gen. @@ -519,7 +565,7 @@ public final class MonitorsListMonitoredResourcesSamples { */ public static void monitorsListMonitoredResourcesMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -527,24 +573,14 @@ public final class MonitorsListMonitoredResourcesSamples { ### Monitors_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnProperties; -import com.azure.resourcemanager.dynatrace.models.AccountInfo; -import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties; -import com.azure.resourcemanager.dynatrace.models.EnvironmentInfo; -import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; import com.azure.resourcemanager.dynatrace.models.MonitorResource; -import com.azure.resourcemanager.dynatrace.models.MonitoringStatus; -import com.azure.resourcemanager.dynatrace.models.PlanData; -import com.azure.resourcemanager.dynatrace.models.UserInfo; -import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MinimumSet_Gen.json */ /** * Sample code: Monitors_Update_MinimumSet_Gen. @@ -553,12 +589,15 @@ public final class MonitorsUpdateSamples { */ public static void monitorsUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { MonitorResource resource = - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MaximumSet_Gen.json */ /** * Sample code: Monitors_Update_MaximumSet_Gen. @@ -567,31 +606,11 @@ public final class MonitorsUpdateSamples { */ public static void monitorsUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { MonitorResource resource = - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); - resource - .update() - .withTags(mapOf("Environment", "Dev")) - .withMonitoringStatus(MonitoringStatus.ENABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withDynatraceEnvironmentProperties( - new DynatraceEnvironmentProperties() - .withAccountInfo(new AccountInfo()) - .withEnvironmentInfo(new EnvironmentInfo()) - .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) - .withUserInfo( - new UserInfo() - .withFirstName("Alice") - .withLastName("Bobab") - .withEmailAddress("alice@microsoft.com") - .withPhoneNumber("123456") - .withCountry("westus2")) - .withPlanData( - new PlanData() - .withUsageType("Committed") - .withBillingCycle("Monthly") - .withPlanDetails("dynatraceapitestplan") - .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) - .apply(); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Environment", "Dev")).apply(); } @SuppressWarnings("unchecked") @@ -610,12 +629,10 @@ public final class MonitorsUpdateSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet_Gen. @@ -623,11 +640,11 @@ public final class OperationsListSamples { * @param manager Entry point to DynatraceManager. */ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet_Gen. @@ -635,7 +652,7 @@ public final class OperationsListSamples { * @param manager Entry point to DynatraceManager. */ public static void operationsListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -649,7 +666,7 @@ import java.util.Arrays; /** Samples for SingleSignOn CreateOrUpdate. */ public final class SingleSignOnCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MaximumSet_Gen. @@ -670,7 +687,7 @@ public final class SingleSignOnCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MinimumSet_Gen. @@ -693,12 +710,10 @@ public final class SingleSignOnCreateOrUpdateSamples { ### SingleSignOn_Get ```java -import com.azure.core.util.Context; - /** Samples for SingleSignOn Get. */ public final class SingleSignOnGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MinimumSet_Gen. @@ -706,11 +721,13 @@ public final class SingleSignOnGetSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager + .singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MaximumSet_Gen. @@ -718,7 +735,9 @@ public final class SingleSignOnGetSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager + .singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } ``` @@ -726,12 +745,10 @@ public final class SingleSignOnGetSamples { ### SingleSignOn_List ```java -import com.azure.core.util.Context; - /** Samples for SingleSignOn List. */ public final class SingleSignOnListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MaximumSet_Gen. @@ -739,11 +756,11 @@ public final class SingleSignOnListSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().list("myResourceGroup", "myMonitor", Context.NONE); + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MinimumSet_Gen. @@ -751,7 +768,7 @@ public final class SingleSignOnListSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().list("myResourceGroup", "myMonitor", Context.NONE); + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -765,13 +782,14 @@ import com.azure.resourcemanager.dynatrace.models.MetricRules; import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendSubscriptionLogsStatus; +import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import java.util.Arrays; /** Samples for TagRules CreateOrUpdate. */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MaximumSet_Gen. @@ -802,6 +820,7 @@ public final class TagRulesCreateOrUpdateSamples { .withAction(TagAction.EXCLUDE)))) .withMetricRules( new MetricRules() + .withSendingMetrics(SendingMetricsStatus.ENABLED) .withFilteringTags( Arrays .asList( @@ -813,7 +832,7 @@ public final class TagRulesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MinimumSet_Gen. @@ -830,12 +849,10 @@ public final class TagRulesCreateOrUpdateSamples { ### TagRules_Delete ```java -import com.azure.core.util.Context; - /** Samples for TagRules Delete. */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MinimumSet_Gen.json */ /** * Sample code: TagRules_Delete_MinimumSet_Gen. @@ -843,11 +860,11 @@ public final class TagRulesDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().delete("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MaximumSet_Gen.json */ /** * Sample code: TagRules_Delete_MaximumSet_Gen. @@ -855,7 +872,7 @@ public final class TagRulesDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().delete("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } ``` @@ -863,12 +880,10 @@ public final class TagRulesDeleteSamples { ### TagRules_Get ```java -import com.azure.core.util.Context; - /** Samples for TagRules Get. */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MinimumSet_Gen.json */ /** * Sample code: TagRules_Get_MinimumSet_Gen. @@ -876,11 +891,11 @@ public final class TagRulesGetSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MaximumSet_Gen.json */ /** * Sample code: TagRules_Get_MaximumSet_Gen. @@ -888,7 +903,7 @@ public final class TagRulesGetSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } ``` @@ -896,12 +911,10 @@ public final class TagRulesGetSamples { ### TagRules_List ```java -import com.azure.core.util.Context; - /** Samples for TagRules List. */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MaximumSet_Gen.json */ /** * Sample code: TagRules_List_MaximumSet_Gen. @@ -909,11 +922,11 @@ public final class TagRulesListSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MinimumSet_Gen.json */ /** * Sample code: TagRules_List_MinimumSet_Gen. @@ -921,80 +934,7 @@ public final class TagRulesListSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); - } -} -``` - -### TagRules_Update - -```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.dynatrace.models.FilteringTag; -import com.azure.resourcemanager.dynatrace.models.LogRules; -import com.azure.resourcemanager.dynatrace.models.MetricRules; -import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; -import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; -import com.azure.resourcemanager.dynatrace.models.SendSubscriptionLogsStatus; -import com.azure.resourcemanager.dynatrace.models.TagAction; -import com.azure.resourcemanager.dynatrace.models.TagRule; -import java.util.Arrays; - -/** Samples for TagRules Update. */ -public final class TagRulesUpdateSamples { - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Update_MaximumSet_Gen.json - */ - /** - * Sample code: TagRules_Update_MaximumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void tagRulesUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - TagRule resource = - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE).getValue(); - resource - .update() - .withLogRules( - new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("Environment") - .withValue("Dev") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules( - new MetricRules() - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE)))) - .apply(); - } - - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Update_MinimumSet_Gen.json - */ - /** - * Sample code: TagRules_Update_MinimumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void tagRulesUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - TagRule resource = - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE).getValue(); - resource.update().apply(); + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml b/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml index f732c0e951b1c..96dcb74a04b2f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for Dynatrace Management - This package contains Microsoft Azure SDK for Dynatrace Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-09-01. + This package contains Microsoft Azure SDK for Dynatrace Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-04-27. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java index 5e16ef998a747..075903270b1ce 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java @@ -215,7 +215,7 @@ public DynatraceManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.dynatrace") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java index 6e387d3251c6f..5db710a7c20e7 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java @@ -11,48 +11,22 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner; import com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner; import com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.SsoDetailsResponseInner; import com.azure.resourcemanager.dynatrace.fluent.models.VMExtensionPayloadInner; import com.azure.resourcemanager.dynatrace.fluent.models.VMInfoInner; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; import com.azure.resourcemanager.dynatrace.models.MonitorResourceUpdate; import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; /** An instance of this class provides access to all the operations defined in MonitorsClient. */ public interface MonitorsClient { - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AccountInfoSecureInner getAccountCredentials(String resourceGroupName, String monitorName); - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAccountCredentialsWithResponse( - String resourceGroupName, String monitorName, Context context); - /** * List the resources currently being monitored by the Dynatrace monitor resource. * @@ -88,56 +62,56 @@ PagedIterable listMonitoredResources( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String monitorName); + Response getVMHostPayloadWithResponse( + String resourceGroupName, String monitorName, Context context); /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent along with {@link Response}. + * @return response of payload to be passed while installing VM agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context); + VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String monitorName); /** * Get a MonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource. + * @return a MonitorResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context); /** * Get a MonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource along with {@link Response}. + * @return a MonitorResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context); + MonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName); /** * Create a MonitorResource. @@ -206,13 +180,15 @@ MonitorResourceInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dynatrace Monitor Resource. + * @return dynatrace Monitor Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitorResourceInner update(String resourceGroupName, String monitorName, MonitorResourceUpdate resource); + Response updateWithResponse( + String resourceGroupName, String monitorName, MonitorResourceUpdate resource, Context context); /** * Update a MonitorResource. @@ -220,15 +196,13 @@ MonitorResourceInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dynatrace Monitor Resource along with {@link Response}. + * @return dynatrace Monitor Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String monitorName, MonitorResourceUpdate resource, Context context); + MonitorResourceInner update(String resourceGroupName, String monitorName, MonitorResourceUpdate resource); /** * Delete a MonitorResource. @@ -330,7 +304,38 @@ Response updateWithResponse( PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMarketplaceSaaSResourceDetailsWithResponse( + MarketplaceSaaSResourceDetailsRequest request, Context context); + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MarketplaceSaaSResourceDetailsResponseInner getMarketplaceSaaSResourceDetails( + MarketplaceSaaSResourceDetailsRequest request); + + /** + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -343,7 +348,7 @@ Response updateWithResponse( PagedIterable listHosts(String resourceGroupName, String monitorName); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -356,6 +361,34 @@ Response updateWithResponse( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listHosts(String resourceGroupName, String monitorName, Context context); + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMetricStatusWithResponse( + String resourceGroupName, String monitorName, Context context); + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName); + /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. * @@ -390,29 +423,33 @@ Response updateWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param request The details of the get sso details request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner. + * @return the SSO configuration details from the partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SsoDetailsResponseInner getSsoDetails(String resourceGroupName, String monitorName); + Response getSsoDetailsWithResponse( + String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context); /** * Gets the SSO configuration details from the partner. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param request The details of the get sso details request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner along with {@link Response}. + * @return the SSO configuration details from the partner. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getSsoDetailsWithResponse( - String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context); + SsoDetailsResponseInner getSsoDetails(String resourceGroupName, String monitorName); /** * Gets all the Dynatrace environments that a user can link a azure resource to. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java index cd47fc356d532..11ff253bc42ae 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java @@ -101,13 +101,15 @@ DynatraceSingleSignOnResourceInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DynatraceSingleSignOnResource. + * @return a DynatraceSingleSignOnResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DynatraceSingleSignOnResourceInner get(String resourceGroupName, String monitorName, String configurationName); + Response getWithResponse( + String resourceGroupName, String monitorName, String configurationName, Context context); /** * Get a DynatraceSingleSignOnResource. @@ -115,15 +117,13 @@ DynatraceSingleSignOnResourceInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DynatraceSingleSignOnResource along with {@link Response}. + * @return a DynatraceSingleSignOnResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context); + DynatraceSingleSignOnResourceInner get(String resourceGroupName, String monitorName, String configurationName); /** * List all DynatraceSingleSignOnResource by monitorName. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java index 908816df9140f..7b1d2184ed668 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java @@ -12,7 +12,6 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner; -import com.azure.resourcemanager.dynatrace.models.TagRuleUpdate; /** An instance of this class provides access to all the operations defined in TagRulesClient. */ public interface TagRulesClient { @@ -22,13 +21,15 @@ public interface TagRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule. + * @return a TagRule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName); + Response getWithResponse( + String resourceGroupName, String monitorName, String ruleSetName, Context context); /** * Get a TagRule. @@ -36,15 +37,13 @@ public interface TagRulesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a TagRule. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName); /** * Create a TagRule. @@ -112,38 +111,6 @@ TagRuleInner createOrUpdate( TagRuleInner createOrUpdate( String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context); - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - TagRuleInner update(String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource); - - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource, Context context); - /** * Delete a TagRule. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AccountInfoSecureInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AccountInfoSecureInner.java deleted file mode 100644 index a9473873c66d2..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AccountInfoSecureInner.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dynatrace account API Key. */ -@Immutable -public final class AccountInfoSecureInner { - /* - * Account Id of the account this environment is linked to - */ - @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) - private String accountId; - - /* - * API Key of the user account - */ - @JsonProperty(value = "apiKey", access = JsonProperty.Access.WRITE_ONLY) - private String apiKey; - - /* - * Region in which the account is created - */ - @JsonProperty(value = "regionId", access = JsonProperty.Access.WRITE_ONLY) - private String regionId; - - /** - * Get the accountId property: Account Id of the account this environment is linked to. - * - * @return the accountId value. - */ - public String accountId() { - return this.accountId; - } - - /** - * Get the apiKey property: API Key of the user account. - * - * @return the apiKey value. - */ - public String apiKey() { - return this.apiKey; - } - - /** - * Get the regionId property: Region in which the account is created. - * - * @return the regionId value. - */ - public String regionId() { - return this.regionId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java index 3beba34e7a653..b98b37db7c1a6 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java @@ -69,6 +69,10 @@ public final class AppServiceInfoInner { @JsonProperty(value = "hostName") private String hostname; + /** Creates an instance of AppServiceInfoInner class. */ + public AppServiceInfoInner() { + } + /** * Get the resourceId property: App service resource ID. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java index 0a664acb30216..0df68d016c334 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java @@ -43,6 +43,10 @@ public final class DynatraceSingleSignOnProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /** Creates an instance of DynatraceSingleSignOnProperties class. */ + public DynatraceSingleSignOnProperties() { + } + /** * Get the singleSignOnState property: State of Single Sign On. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java index 3545720f75da1..1e83f4b339161 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java @@ -28,6 +28,10 @@ public final class DynatraceSingleSignOnResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of DynatraceSingleSignOnResourceInner class. */ + public DynatraceSingleSignOnResourceInner() { + } + /** * Get the innerProperties property: The resource-specific properties for this resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java index 26c2d9fb2f549..bb6c2d21d3e5b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java @@ -29,6 +29,10 @@ public final class LinkableEnvironmentResponseInner { @JsonProperty(value = "planData") private PlanData planData; + /** Creates an instance of LinkableEnvironmentResponseInner class. */ + public LinkableEnvironmentResponseInner() { + } + /** * Get the environmentId property: environment id for which user is an admin. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java new file mode 100644 index 0000000000000..461215f3e2657 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Marketplace SaaS resource details linked to the given tenant Id. */ +@Fluent +public final class MarketplaceSaaSResourceDetailsResponseInner { + /* + * Id of the Marketplace SaaS Resource + */ + @JsonProperty(value = "marketplaceSaaSResourceId") + private String marketplaceSaaSResourceId; + + /* + * Id of the plan + */ + @JsonProperty(value = "planId") + private String planId; + + /* + * Marketplace subscription status + */ + @JsonProperty(value = "marketplaceSubscriptionStatus") + private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + + /** Creates an instance of MarketplaceSaaSResourceDetailsResponseInner class. */ + public MarketplaceSaaSResourceDetailsResponseInner() { + } + + /** + * Get the marketplaceSaaSResourceId property: Id of the Marketplace SaaS Resource. + * + * @return the marketplaceSaaSResourceId value. + */ + public String marketplaceSaaSResourceId() { + return this.marketplaceSaaSResourceId; + } + + /** + * Set the marketplaceSaaSResourceId property: Id of the Marketplace SaaS Resource. + * + * @param marketplaceSaaSResourceId the marketplaceSaaSResourceId value to set. + * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. + */ + public MarketplaceSaaSResourceDetailsResponseInner withMarketplaceSaaSResourceId(String marketplaceSaaSResourceId) { + this.marketplaceSaaSResourceId = marketplaceSaaSResourceId; + return this; + } + + /** + * Get the planId property: Id of the plan. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Set the planId property: Id of the plan. + * + * @param planId the planId value to set. + * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. + */ + public MarketplaceSaaSResourceDetailsResponseInner withPlanId(String planId) { + this.planId = planId; + return this; + } + + /** + * Get the marketplaceSubscriptionStatus property: Marketplace subscription status. + * + * @return the marketplaceSubscriptionStatus value. + */ + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.marketplaceSubscriptionStatus; + } + + /** + * Set the marketplaceSubscriptionStatus property: Marketplace subscription status. + * + * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. + * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. + */ + public MarketplaceSaaSResourceDetailsResponseInner withMarketplaceSubscriptionStatus( + MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { + this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java new file mode 100644 index 0000000000000..adbaf8b77b89f --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Response of get metrics status operation. */ +@Fluent +public final class MetricsStatusResponseInner { + /* + * Azure resource IDs + */ + @JsonProperty(value = "azureResourceIds") + private List azureResourceIds; + + /** Creates an instance of MetricsStatusResponseInner class. */ + public MetricsStatusResponseInner() { + } + + /** + * Get the azureResourceIds property: Azure resource IDs. + * + * @return the azureResourceIds value. + */ + public List azureResourceIds() { + return this.azureResourceIds; + } + + /** + * Set the azureResourceIds property: Azure resource IDs. + * + * @param azureResourceIds the azureResourceIds value to set. + * @return the MetricsStatusResponseInner object itself. + */ + public MetricsStatusResponseInner withAzureResourceIds(List azureResourceIds) { + this.azureResourceIds = azureResourceIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java index 8dde276b57fc8..e772db1fb252a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java @@ -65,6 +65,10 @@ public final class MonitorProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /** Creates an instance of MonitorProperties class. */ + public MonitorProperties() { + } + /** * Get the monitoringStatus property: Status of the monitor. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java index 1c336220acf9a..13800bdd0de60 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java @@ -40,6 +40,10 @@ public final class MonitorResourceInner extends Resource { @JsonProperty(value = "identity") private IdentityProperties identity; + /** Creates an instance of MonitorResourceInner class. */ + public MonitorResourceInner() { + } + /** * Get the innerProperties property: The resource-specific properties for this resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java index f34c7578eab6e..15d5d973c3c24 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java @@ -42,6 +42,10 @@ public final class MonitoredResourceInner { @JsonProperty(value = "reasonForLogsStatus") private String reasonForLogsStatus; + /** Creates an instance of MonitoredResourceInner class. */ + public MonitoredResourceInner() { + } + /** * Get the id property: The ARM id of the resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java index d89f7e5ba2147..ee1cf5f6aa682 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java @@ -31,6 +31,10 @@ public final class MonitoringTagRulesProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /** Creates an instance of MonitoringTagRulesProperties class. */ + public MonitoringTagRulesProperties() { + } + /** * Get the logRules property: Set of rules for sending logs for the Monitor resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java index 0a7095481a462..990ee3022d44f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java @@ -50,6 +50,10 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java index 0ee062dfc6dbc..596d83bebb588 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java @@ -42,6 +42,10 @@ public final class SsoDetailsResponseInner { @JsonProperty(value = "adminUsers") private List adminUsers; + /** Creates an instance of SsoDetailsResponseInner class. */ + public SsoDetailsResponseInner() { + } + /** * Get the isSsoEnabled property: Whether the SSO is enabled for this resource or not. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java index 377d7778041fd..afb3e6fd9f0be 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java @@ -28,6 +28,10 @@ public final class TagRuleInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of TagRuleInner class. */ + public TagRuleInner() { + } + /** * Get the innerProperties property: The resource-specific properties for this resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java index 2b9bee45a3b18..33f961351fd4d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java @@ -22,6 +22,10 @@ public final class VMExtensionPayloadInner { @JsonProperty(value = "environmentId") private String environmentId; + /** Creates an instance of VMExtensionPayloadInner class. */ + public VMExtensionPayloadInner() { + } + /** * Get the ingestionKey property: Ingestion key of the environment. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java index 53f5a6beafbdd..6f54fb2c58e13 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java @@ -69,6 +69,10 @@ public final class VMInfoInner { @JsonProperty(value = "hostName") private String hostname; + /** Creates an instance of VMInfoInner class. */ + public VMInfoInner() { + } + /** * Get the resourceId property: Azure VM resource ID. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/AccountInfoSecureImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/AccountInfoSecureImpl.java deleted file mode 100644 index e60046ccd29aa..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/AccountInfoSecureImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.implementation; - -import com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner; -import com.azure.resourcemanager.dynatrace.models.AccountInfoSecure; - -public final class AccountInfoSecureImpl implements AccountInfoSecure { - private AccountInfoSecureInner innerObject; - - private final com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager; - - AccountInfoSecureImpl( - AccountInfoSecureInner innerObject, com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String accountId() { - return this.innerModel().accountId(); - } - - public String apiKey() { - return this.innerModel().apiKey(); - } - - public String regionId() { - return this.innerModel().regionId(); - } - - public AccountInfoSecureInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.dynatrace.DynatraceManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java index 70f09878ae3b4..4851173ba7416 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java @@ -181,7 +181,7 @@ public SingleSignOnsClient getSingleSignOns() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-09-01"; + this.apiVersion = "2023-04-27"; this.monitors = new MonitorsClientImpl(this); this.operations = new OperationsClientImpl(this); this.tagRules = new TagRulesClientImpl(this); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MarketplaceSaaSResourceDetailsResponseImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MarketplaceSaaSResourceDetailsResponseImpl.java new file mode 100644 index 0000000000000..f16bdb1b42089 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MarketplaceSaaSResourceDetailsResponseImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.implementation; + +import com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsResponse; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; + +public final class MarketplaceSaaSResourceDetailsResponseImpl implements MarketplaceSaaSResourceDetailsResponse { + private MarketplaceSaaSResourceDetailsResponseInner innerObject; + + private final com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager; + + MarketplaceSaaSResourceDetailsResponseImpl( + MarketplaceSaaSResourceDetailsResponseInner innerObject, + com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String marketplaceSaaSResourceId() { + return this.innerModel().marketplaceSaaSResourceId(); + } + + public String planId() { + return this.innerModel().planId(); + } + + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.innerModel().marketplaceSubscriptionStatus(); + } + + public MarketplaceSaaSResourceDetailsResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dynatrace.DynatraceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MetricsStatusResponseImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MetricsStatusResponseImpl.java new file mode 100644 index 0000000000000..a53be1e6ccdc8 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MetricsStatusResponseImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.implementation; + +import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; +import com.azure.resourcemanager.dynatrace.models.MetricsStatusResponse; +import java.util.Collections; +import java.util.List; + +public final class MetricsStatusResponseImpl implements MetricsStatusResponse { + private MetricsStatusResponseInner innerObject; + + private final com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager; + + MetricsStatusResponseImpl( + MetricsStatusResponseInner innerObject, com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List azureResourceIds() { + List inner = this.innerModel().azureResourceIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public MetricsStatusResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.dynatrace.DynatraceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java index 59c69da394d75..6a58e97917853 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java @@ -10,7 +10,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; -import com.azure.resourcemanager.dynatrace.models.AccountInfoSecure; import com.azure.resourcemanager.dynatrace.models.AppServiceInfo; import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties; import com.azure.resourcemanager.dynatrace.models.IdentityProperties; @@ -18,6 +17,7 @@ import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentResponse; import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; +import com.azure.resourcemanager.dynatrace.models.MetricsStatusResponse; import com.azure.resourcemanager.dynatrace.models.MonitorResource; import com.azure.resourcemanager.dynatrace.models.MonitorResourceUpdate; import com.azure.resourcemanager.dynatrace.models.MonitoredResource; @@ -210,14 +210,6 @@ public MonitorResource refresh(Context context) { return this; } - public AccountInfoSecure getAccountCredentials() { - return serviceManager.monitors().getAccountCredentials(resourceGroupName, monitorName); - } - - public Response getAccountCredentialsWithResponse(Context context) { - return serviceManager.monitors().getAccountCredentialsWithResponse(resourceGroupName, monitorName, context); - } - public PagedIterable listMonitoredResources() { return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName); } @@ -226,14 +218,14 @@ public PagedIterable listMonitoredResources(Context context) return serviceManager.monitors().listMonitoredResources(resourceGroupName, monitorName, context); } - public VMExtensionPayload getVMHostPayload() { - return serviceManager.monitors().getVMHostPayload(resourceGroupName, monitorName); - } - public Response getVMHostPayloadWithResponse(Context context) { return serviceManager.monitors().getVMHostPayloadWithResponse(resourceGroupName, monitorName, context); } + public VMExtensionPayload getVMHostPayload() { + return serviceManager.monitors().getVMHostPayload(resourceGroupName, monitorName); + } + public PagedIterable listHosts() { return serviceManager.monitors().listHosts(resourceGroupName, monitorName); } @@ -242,6 +234,14 @@ public PagedIterable listHosts(Context context) { return serviceManager.monitors().listHosts(resourceGroupName, monitorName, context); } + public Response getMetricStatusWithResponse(Context context) { + return serviceManager.monitors().getMetricStatusWithResponse(resourceGroupName, monitorName, context); + } + + public MetricsStatusResponse getMetricStatus() { + return serviceManager.monitors().getMetricStatus(resourceGroupName, monitorName); + } + public PagedIterable listAppServices() { return serviceManager.monitors().listAppServices(resourceGroupName, monitorName); } @@ -250,14 +250,14 @@ public PagedIterable listAppServices(Context context) { return serviceManager.monitors().listAppServices(resourceGroupName, monitorName, context); } - public SsoDetailsResponse getSsoDetails() { - return serviceManager.monitors().getSsoDetails(resourceGroupName, monitorName); - } - public Response getSsoDetailsWithResponse(SsoDetailsRequest request, Context context) { return serviceManager.monitors().getSsoDetailsWithResponse(resourceGroupName, monitorName, request, context); } + public SsoDetailsResponse getSsoDetails() { + return serviceManager.monitors().getSsoDetails(resourceGroupName, monitorName); + } + public PagedIterable listLinkableEnvironments(LinkableEnvironmentRequest request) { return serviceManager.monitors().listLinkableEnvironments(resourceGroupName, monitorName, request); } @@ -293,55 +293,30 @@ public MonitorResourceImpl withIdentity(IdentityProperties identity) { } public MonitorResourceImpl withMonitoringStatus(MonitoringStatus monitoringStatus) { - if (isInCreateMode()) { - this.innerModel().withMonitoringStatus(monitoringStatus); - return this; - } else { - this.updateResource.withMonitoringStatus(monitoringStatus); - return this; - } + this.innerModel().withMonitoringStatus(monitoringStatus); + return this; } public MonitorResourceImpl withMarketplaceSubscriptionStatus( MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { - if (isInCreateMode()) { - this.innerModel().withMarketplaceSubscriptionStatus(marketplaceSubscriptionStatus); - return this; - } else { - this.updateResource.withMarketplaceSubscriptionStatus(marketplaceSubscriptionStatus); - return this; - } + this.innerModel().withMarketplaceSubscriptionStatus(marketplaceSubscriptionStatus); + return this; } public MonitorResourceImpl withDynatraceEnvironmentProperties( DynatraceEnvironmentProperties dynatraceEnvironmentProperties) { - if (isInCreateMode()) { - this.innerModel().withDynatraceEnvironmentProperties(dynatraceEnvironmentProperties); - return this; - } else { - this.updateResource.withDynatraceEnvironmentProperties(dynatraceEnvironmentProperties); - return this; - } + this.innerModel().withDynatraceEnvironmentProperties(dynatraceEnvironmentProperties); + return this; } public MonitorResourceImpl withUserInfo(UserInfo userInfo) { - if (isInCreateMode()) { - this.innerModel().withUserInfo(userInfo); - return this; - } else { - this.updateResource.withUserInfo(userInfo); - return this; - } + this.innerModel().withUserInfo(userInfo); + return this; } public MonitorResourceImpl withPlanData(PlanData planData) { - if (isInCreateMode()) { - this.innerModel().withPlanData(planData); - return this; - } else { - this.updateResource.withPlanData(planData); - return this; - } + this.innerModel().withPlanData(planData); + return this; } private boolean isInCreateMode() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java index d8f9333183d14..80a3f9e1eabe4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java @@ -34,9 +34,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dynatrace.fluent.MonitorsClient; -import com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner; import com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner; import com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.SsoDetailsResponseInner; @@ -45,6 +46,7 @@ import com.azure.resourcemanager.dynatrace.models.AppServiceListResponse; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentListResponse; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; import com.azure.resourcemanager.dynatrace.models.MonitorResourceListResult; import com.azure.resourcemanager.dynatrace.models.MonitorResourceUpdate; import com.azure.resourcemanager.dynatrace.models.MonitoredResourceListResponse; @@ -78,26 +80,10 @@ public final class MonitorsClientImpl implements MonitorsClient { */ @Host("{$host}") @ServiceInterface(name = "DynatraceObservabili") - private interface MonitorsService { + public interface MonitorsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/getAccountCredentials") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getAccountCredentials( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/listMonitoredResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/listMonitoredResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listMonitoredResources( @@ -111,8 +97,7 @@ Mono> listMonitoredResources( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/getVMHostPayload") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/getVMHostPayload") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getVMHostPayload( @@ -126,8 +111,7 @@ Mono> getVMHostPayload( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -141,8 +125,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -157,8 +140,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -173,8 +155,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -199,8 +180,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -211,10 +191,24 @@ Mono> listByResourceGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Dynatrace.Observability/getMarketplaceSaaSResourceDetails") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {404}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMarketplaceSaaSResourceDetails( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MarketplaceSaaSResourceDetailsRequest request, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/listHosts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/listHosts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listHosts( @@ -228,8 +222,21 @@ Mono> listHosts( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/listAppServices") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/getMetricStatus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMetricStatus( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/listAppServices") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listAppServices( @@ -243,9 +250,11 @@ Mono> listAppServices( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/getSSODetails") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/getSSODetails") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {401}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getSsoDetails( @HostParam("$host") String endpoint, @@ -259,8 +268,7 @@ Mono> getSsoDetails( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/listLinkableEnvironments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/listLinkableEnvironments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLinkableEnvironments( @@ -334,150 +342,6 @@ Mono> listLinkableEnvironmentsNext( Context context); } - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAccountCredentialsWithResponseAsync( - String resourceGroupName, String monitorName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getAccountCredentials( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAccountCredentialsWithResponseAsync( - String resourceGroupName, String monitorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getAccountCredentials( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - accept, - context); - } - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAccountCredentialsAsync(String resourceGroupName, String monitorName) { - return getAccountCredentialsWithResponseAsync(resourceGroupName, monitorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AccountInfoSecureInner getAccountCredentials(String resourceGroupName, String monitorName) { - return getAccountCredentialsAsync(resourceGroupName, monitorName).block(); - } - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAccountCredentialsWithResponse( - String resourceGroupName, String monitorName, Context context) { - return getAccountCredentialsWithResponseAsync(resourceGroupName, monitorName, context).block(); - } - /** * List the resources currently being monitored by the Dynatrace monitor resource. * @@ -782,14 +646,16 @@ private Mono getVMHostPayloadAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String monitorName) { - return getVMHostPayloadAsync(resourceGroupName, monitorName).block(); + public Response getVMHostPayloadWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getVMHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** @@ -797,16 +663,14 @@ public VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent along with {@link Response}. + * @return response of payload to be passed while installing VM agent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context) { - return getVMHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); + public VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String monitorName) { + return getVMHostPayloadWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** @@ -924,14 +788,16 @@ private Mono getByResourceGroupAsync(String resourceGroupN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource. + * @return a MonitorResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) { - return getByResourceGroupAsync(resourceGroupName, monitorName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** @@ -939,16 +805,14 @@ public MonitorResourceInner getByResourceGroup(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource along with {@link Response}. + * @return a MonitorResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); + public MonitorResourceInner getByResourceGroup(String resourceGroupName, String monitorName) { + return getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } /** @@ -1123,7 +987,7 @@ private PollerFlux, MonitorResourceInner> begin @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitorResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, MonitorResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource).getSyncPoller(); } /** @@ -1141,7 +1005,7 @@ public SyncPoller, MonitorResourceInner> beginC @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MonitorResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, MonitorResourceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, resource, context).getSyncPoller(); } /** @@ -1350,14 +1214,16 @@ private Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dynatrace Monitor Resource. + * @return dynatrace Monitor Resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitorResourceInner update(String resourceGroupName, String monitorName, MonitorResourceUpdate resource) { - return updateAsync(resourceGroupName, monitorName, resource).block(); + public Response updateWithResponse( + String resourceGroupName, String monitorName, MonitorResourceUpdate resource, Context context) { + return updateWithResponseAsync(resourceGroupName, monitorName, resource, context).block(); } /** @@ -1366,16 +1232,14 @@ public MonitorResourceInner update(String resourceGroupName, String monitorName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dynatrace Monitor Resource along with {@link Response}. + * @return dynatrace Monitor Resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String monitorName, MonitorResourceUpdate resource, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, resource, context).block(); + public MonitorResourceInner update(String resourceGroupName, String monitorName, MonitorResourceUpdate resource) { + return updateWithResponse(resourceGroupName, monitorName, resource, Context.NONE).getValue(); } /** @@ -1523,7 +1387,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName) { - return beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); } /** @@ -1540,7 +1404,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String monitorName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); } /** @@ -1914,7 +1778,149 @@ public PagedIterable listByResourceGroup(String resourceGr } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getMarketplaceSaaSResourceDetailsWithResponseAsync(MarketplaceSaaSResourceDetailsRequest request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getMarketplaceSaaSResourceDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getMarketplaceSaaSResourceDetailsWithResponseAsync( + MarketplaceSaaSResourceDetailsRequest request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getMarketplaceSaaSResourceDetails( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + request, + accept, + context); + } + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMarketplaceSaaSResourceDetailsAsync( + MarketplaceSaaSResourceDetailsRequest request) { + return getMarketplaceSaaSResourceDetailsWithResponseAsync(request) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMarketplaceSaaSResourceDetailsWithResponse( + MarketplaceSaaSResourceDetailsRequest request, Context context) { + return getMarketplaceSaaSResourceDetailsWithResponseAsync(request, context).block(); + } + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MarketplaceSaaSResourceDetailsResponseInner getMarketplaceSaaSResourceDetails( + MarketplaceSaaSResourceDetailsRequest request) { + return getMarketplaceSaaSResourceDetailsWithResponse(request, Context.NONE).getValue(); + } + + /** + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -1971,7 +1977,7 @@ private Mono> listHostsSinglePageAsync(String resourc } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -2027,7 +2033,7 @@ private Mono> listHostsSinglePageAsync( } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -2044,7 +2050,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, String m } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -2062,7 +2068,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, String m } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -2077,7 +2083,7 @@ public PagedIterable listHosts(String resourceGroupName, String mon } /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -2092,6 +2098,148 @@ public PagedIterable listHosts(String resourceGroupName, String mon return new PagedIterable<>(listHostsAsync(resourceGroupName, monitorName, context)); } + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMetricStatusWithResponseAsync( + String resourceGroupName, String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getMetricStatus( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMetricStatusWithResponseAsync( + String resourceGroupName, String monitorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getMetricStatus( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + monitorName, + accept, + context); + } + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMetricStatusAsync(String resourceGroupName, String monitorName) { + return getMetricStatusWithResponseAsync(resourceGroupName, monitorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricStatusWithResponse( + String resourceGroupName, String monitorName, Context context) { + return getMetricStatusWithResponseAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, String monitorName) { + return getMetricStatusWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } + /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. * @@ -2284,6 +2432,7 @@ public PagedIterable listAppServices( * @param request The details of the get sso details request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response} on successful completion of * {@link Mono}. @@ -2339,6 +2488,7 @@ private Mono> getSsoDetailsWithResponseAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response} on successful completion of * {@link Mono}. @@ -2387,15 +2537,15 @@ private Mono> getSsoDetailsWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param request The details of the get sso details request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getSsoDetailsAsync( - String resourceGroupName, String monitorName, SsoDetailsRequest request) { + private Mono getSsoDetailsAsync(String resourceGroupName, String monitorName) { + final SsoDetailsRequest request = null; return getSsoDetailsWithResponseAsync(resourceGroupName, monitorName, request) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -2405,16 +2555,18 @@ private Mono getSsoDetailsAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param request The details of the get sso details request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner on successful completion of {@link Mono}. + * @return the SSO configuration details from the partner along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getSsoDetailsAsync(String resourceGroupName, String monitorName) { - final SsoDetailsRequest request = null; - return getSsoDetailsWithResponseAsync(resourceGroupName, monitorName, request) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response getSsoDetailsWithResponse( + String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context) { + return getSsoDetailsWithResponseAsync(resourceGroupName, monitorName, request, context).block(); } /** @@ -2424,31 +2576,14 @@ private Mono getSsoDetailsAsync(String resourceGroupNam * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner. */ @ServiceMethod(returns = ReturnType.SINGLE) public SsoDetailsResponseInner getSsoDetails(String resourceGroupName, String monitorName) { final SsoDetailsRequest request = null; - return getSsoDetailsAsync(resourceGroupName, monitorName, request).block(); - } - - /** - * Gets the SSO configuration details from the partner. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param request The details of the get sso details request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSsoDetailsWithResponse( - String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context) { - return getSsoDetailsWithResponseAsync(resourceGroupName, monitorName, request, context).block(); + return getSsoDetailsWithResponse(resourceGroupName, monitorName, request, Context.NONE).getValue(); } /** diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java index dc156af635fe4..d1dec42d325f5 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java @@ -10,18 +10,21 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.dynatrace.fluent.MonitorsClient; -import com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner; import com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner; import com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner; +import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner; import com.azure.resourcemanager.dynatrace.fluent.models.SsoDetailsResponseInner; import com.azure.resourcemanager.dynatrace.fluent.models.VMExtensionPayloadInner; import com.azure.resourcemanager.dynatrace.fluent.models.VMInfoInner; -import com.azure.resourcemanager.dynatrace.models.AccountInfoSecure; import com.azure.resourcemanager.dynatrace.models.AppServiceInfo; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentResponse; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsResponse; +import com.azure.resourcemanager.dynatrace.models.MetricsStatusResponse; import com.azure.resourcemanager.dynatrace.models.MonitorResource; import com.azure.resourcemanager.dynatrace.models.MonitoredResource; import com.azure.resourcemanager.dynatrace.models.Monitors; @@ -43,30 +46,6 @@ public MonitorsImpl( this.serviceManager = serviceManager; } - public AccountInfoSecure getAccountCredentials(String resourceGroupName, String monitorName) { - AccountInfoSecureInner inner = this.serviceClient().getAccountCredentials(resourceGroupName, monitorName); - if (inner != null) { - return new AccountInfoSecureImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getAccountCredentialsWithResponse( - String resourceGroupName, String monitorName, Context context) { - Response inner = - this.serviceClient().getAccountCredentialsWithResponse(resourceGroupName, monitorName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AccountInfoSecureImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); @@ -80,15 +59,6 @@ public PagedIterable listMonitoredResources( return Utils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } - public VMExtensionPayload getVMHostPayload(String resourceGroupName, String monitorName) { - VMExtensionPayloadInner inner = this.serviceClient().getVMHostPayload(resourceGroupName, monitorName); - if (inner != null) { - return new VMExtensionPayloadImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getVMHostPayloadWithResponse( String resourceGroupName, String monitorName, Context context) { Response inner = @@ -104,10 +74,10 @@ public Response getVMHostPayloadWithResponse( } } - public MonitorResource getByResourceGroup(String resourceGroupName, String monitorName) { - MonitorResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, monitorName); + public VMExtensionPayload getVMHostPayload(String resourceGroupName, String monitorName) { + VMExtensionPayloadInner inner = this.serviceClient().getVMHostPayload(resourceGroupName, monitorName); if (inner != null) { - return new MonitorResourceImpl(inner, this.manager()); + return new VMExtensionPayloadImpl(inner, this.manager()); } else { return null; } @@ -128,6 +98,15 @@ public Response getByResourceGroupWithResponse( } } + public MonitorResource getByResourceGroup(String resourceGroupName, String monitorName) { + MonitorResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, monitorName); + if (inner != null) { + return new MonitorResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String monitorName) { this.serviceClient().delete(resourceGroupName, monitorName); } @@ -157,6 +136,32 @@ public PagedIterable listByResourceGroup(String resourceGroupNa return Utils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); } + public Response getMarketplaceSaaSResourceDetailsWithResponse( + MarketplaceSaaSResourceDetailsRequest request, Context context) { + Response inner = + this.serviceClient().getMarketplaceSaaSResourceDetailsWithResponse(request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MarketplaceSaaSResourceDetailsResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MarketplaceSaaSResourceDetailsResponse getMarketplaceSaaSResourceDetails( + MarketplaceSaaSResourceDetailsRequest request) { + MarketplaceSaaSResourceDetailsResponseInner inner = + this.serviceClient().getMarketplaceSaaSResourceDetails(request); + if (inner != null) { + return new MarketplaceSaaSResourceDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listHosts(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listHosts(resourceGroupName, monitorName); return Utils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); @@ -167,6 +172,30 @@ public PagedIterable listHosts(String resourceGroupName, String monitorN return Utils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); } + public Response getMetricStatusWithResponse( + String resourceGroupName, String monitorName, Context context) { + Response inner = + this.serviceClient().getMetricStatusWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MetricsStatusResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MetricsStatusResponse getMetricStatus(String resourceGroupName, String monitorName) { + MetricsStatusResponseInner inner = this.serviceClient().getMetricStatus(resourceGroupName, monitorName); + if (inner != null) { + return new MetricsStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listAppServices(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listAppServices(resourceGroupName, monitorName); return Utils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); @@ -179,15 +208,6 @@ public PagedIterable listAppServices( return Utils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); } - public SsoDetailsResponse getSsoDetails(String resourceGroupName, String monitorName) { - SsoDetailsResponseInner inner = this.serviceClient().getSsoDetails(resourceGroupName, monitorName); - if (inner != null) { - return new SsoDetailsResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getSsoDetailsWithResponse( String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context) { Response inner = @@ -203,6 +223,15 @@ public Response getSsoDetailsWithResponse( } } + public SsoDetailsResponse getSsoDetails(String resourceGroupName, String monitorName) { + SsoDetailsResponseInner inner = this.serviceClient().getSsoDetails(resourceGroupName, monitorName); + if (inner != null) { + return new SsoDetailsResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listLinkableEnvironments( String resourceGroupName, String monitorName, LinkableEnvironmentRequest request) { PagedIterable inner = diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java index da4a73f64b566..130d03da1c0d4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "DynatraceObservabili") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Dynatrace.Observability/operations") @ExpectedResponses({200}) diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java index b9aa039a28263..facae51c051c4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java @@ -62,11 +62,10 @@ public final class SingleSignOnsClientImpl implements SingleSignOnsClient { */ @Host("{$host}") @ServiceInterface(name = "DynatraceObservabili") - private interface SingleSignOnsService { + public interface SingleSignOnsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -82,8 +81,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -98,8 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/singleSignOnConfigurations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/singleSignOnConfigurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -335,7 +332,9 @@ private Mono>> createOrUpdateWithResponseAsync( String monitorName, String configurationName, DynatraceSingleSignOnResourceInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, resource).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, resource) + .getSyncPoller(); } /** @@ -359,7 +358,8 @@ private Mono>> createOrUpdateWithResponseAsync( String configurationName, DynatraceSingleSignOnResourceInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, resource, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, resource, context) .getSyncPoller(); } @@ -585,15 +585,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DynatraceSingleSignOnResource. + * @return a DynatraceSingleSignOnResource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DynatraceSingleSignOnResourceInner get( - String resourceGroupName, String monitorName, String configurationName) { - return getAsync(resourceGroupName, monitorName, configurationName).block(); + public Response getWithResponse( + String resourceGroupName, String monitorName, String configurationName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); } /** @@ -602,16 +603,15 @@ public DynatraceSingleSignOnResourceInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DynatraceSingleSignOnResource along with {@link Response}. + * @return a DynatraceSingleSignOnResource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); + public DynatraceSingleSignOnResourceInner get( + String resourceGroupName, String monitorName, String configurationName) { + return getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE).getValue(); } /** diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java index 41b051b07febb..ca618ab9148c9 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java @@ -27,16 +27,6 @@ public SingleSignOnsImpl( this.serviceManager = serviceManager; } - public DynatraceSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName) { - DynatraceSingleSignOnResourceInner inner = - this.serviceClient().get(resourceGroupName, monitorName, configurationName); - if (inner != null) { - return new DynatraceSingleSignOnResourceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String monitorName, String configurationName, Context context) { Response inner = @@ -52,6 +42,16 @@ public Response getWithResponse( } } + public DynatraceSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName) { + DynatraceSingleSignOnResourceInner inner = + this.serviceClient().get(resourceGroupName, monitorName, configurationName); + if (inner != null) { + return new DynatraceSingleSignOnResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java index 18596597d9817..eba799cb67598 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java @@ -11,7 +11,6 @@ import com.azure.resourcemanager.dynatrace.models.MetricRules; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; import com.azure.resourcemanager.dynatrace.models.TagRule; -import com.azure.resourcemanager.dynatrace.models.TagRuleUpdate; public final class TagRuleImpl implements TagRule, TagRule.Definition, TagRule.Update { private TagRuleInner innerObject; @@ -64,8 +63,6 @@ private com.azure.resourcemanager.dynatrace.DynatraceManager manager() { private String ruleSetName; - private TagRuleUpdate updateResource; - public TagRuleImpl withExistingMonitor(String resourceGroupName, String monitorName) { this.resourceGroupName = resourceGroupName; this.monitorName = monitorName; @@ -97,7 +94,6 @@ public TagRule create(Context context) { } public TagRuleImpl update() { - this.updateResource = new TagRuleUpdate(); return this; } @@ -106,8 +102,7 @@ public TagRule apply() { serviceManager .serviceClient() .getTagRules() - .updateWithResponse(resourceGroupName, monitorName, ruleSetName, updateResource, Context.NONE) - .getValue(); + .createOrUpdate(resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE); return this; } @@ -116,8 +111,7 @@ public TagRule apply(Context context) { serviceManager .serviceClient() .getTagRules() - .updateWithResponse(resourceGroupName, monitorName, ruleSetName, updateResource, context) - .getValue(); + .createOrUpdate(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context); return this; } @@ -150,26 +144,12 @@ public TagRule refresh(Context context) { } public TagRuleImpl withLogRules(LogRules logRules) { - if (isInCreateMode()) { - this.innerModel().withLogRules(logRules); - return this; - } else { - this.updateResource.withLogRules(logRules); - return this; - } + this.innerModel().withLogRules(logRules); + return this; } public TagRuleImpl withMetricRules(MetricRules metricRules) { - if (isInCreateMode()) { - this.innerModel().withMetricRules(metricRules); - return this; - } else { - this.updateResource.withMetricRules(metricRules); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; + this.innerModel().withMetricRules(metricRules); + return this; } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java index fea8fd91b6f13..3c01088ea8b18 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java @@ -12,7 +12,6 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; @@ -35,7 +34,6 @@ import com.azure.resourcemanager.dynatrace.fluent.TagRulesClient; import com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner; import com.azure.resourcemanager.dynatrace.models.TagRuleListResult; -import com.azure.resourcemanager.dynatrace.models.TagRuleUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -64,11 +62,10 @@ public final class TagRulesClientImpl implements TagRulesClient { */ @Host("{$host}") @ServiceInterface(name = "DynatraceObservabili") - private interface TagRulesService { + public interface TagRulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/tagRules/{ruleSetName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -83,8 +80,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/tagRules/{ruleSetName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -98,27 +94,9 @@ Mono>> createOrUpdate( @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, - @BodyParam("application/json") TagRuleUpdate resource, - @HeaderParam("Accept") String accept, - Context context); - @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/tagRules/{ruleSetName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/tagRules/{ruleSetName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -133,8 +111,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability" - + "/monitors/{monitorName}/tagRules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/tagRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -284,14 +261,16 @@ private Mono getAsync(String resourceGroupName, String monitorName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule. + * @return a TagRule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName) { - return getAsync(resourceGroupName, monitorName, ruleSetName).block(); + public Response getWithResponse( + String resourceGroupName, String monitorName, String ruleSetName, Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); } /** @@ -300,16 +279,14 @@ public TagRuleInner get(String resourceGroupName, String monitorName, String rul * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a TagRule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); + public TagRuleInner get(String resourceGroupName, String monitorName, String ruleSetName) { + return getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE).getValue(); } /** @@ -493,7 +470,7 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource).getSyncPoller(); } /** @@ -512,7 +489,9 @@ public SyncPoller, TagRuleInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TagRuleInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, String ruleSetName, TagRuleInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context) + .getSyncPoller(); } /** @@ -593,180 +572,6 @@ public TagRuleInner createOrUpdate( return createOrUpdateAsync(resourceGroupName, monitorName, ruleSetName, resource, context).block(); } - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - resource, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (monitorName == null) { - return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); - } - if (ruleSetName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleSetName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - resource, - accept, - context); - } - - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public TagRuleInner update( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource) { - return updateAsync(resourceGroupName, monitorName, ruleSetName, resource).block(); - } - - /** - * Update a TagRule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param ruleSetName Monitor resource name. - * @param resource The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return tag rules for a monitor resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, TagRuleUpdate resource, Context context) { - return updateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, resource, context).block(); - } - /** * Delete a TagRule. * @@ -929,7 +734,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String monitorName, String ruleSetName) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName).getSyncPoller(); } /** @@ -947,7 +752,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String monitorName, String ruleSetName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, monitorName, ruleSetName, context).getSyncPoller(); } /** diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java index 58618e0384e29..7e7cf46c199fd 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java @@ -27,15 +27,6 @@ public TagRulesImpl( this.serviceManager = serviceManager; } - public TagRule get(String resourceGroupName, String monitorName, String ruleSetName) { - TagRuleInner inner = this.serviceClient().get(resourceGroupName, monitorName, ruleSetName); - if (inner != null) { - return new TagRuleImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String monitorName, String ruleSetName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response getWithResponse( } } + public TagRule get(String resourceGroupName, String monitorName, String ruleSetName) { + TagRuleInner inner = this.serviceClient().get(resourceGroupName, monitorName, ruleSetName); + if (inner != null) { + return new TagRuleImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String monitorName, String ruleSetName) { this.serviceClient().delete(resourceGroupName, monitorName, ruleSetName); } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java index 896017ba890de..978b2920a87d6 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java @@ -22,6 +22,10 @@ public final class AccountInfo { @JsonProperty(value = "regionId") private String regionId; + /** Creates an instance of AccountInfo class. */ + public AccountInfo() { + } + /** * Get the accountId property: Account Id of the account this environment is linked to. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfoSecure.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfoSecure.java deleted file mode 100644 index 8caae5f2d4c38..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfoSecure.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.models; - -import com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner; - -/** An immutable client-side representation of AccountInfoSecure. */ -public interface AccountInfoSecure { - /** - * Gets the accountId property: Account Id of the account this environment is linked to. - * - * @return the accountId value. - */ - String accountId(); - - /** - * Gets the apiKey property: API Key of the user account. - * - * @return the apiKey value. - */ - String apiKey(); - - /** - * Gets the regionId property: Region in which the account is created. - * - * @return the regionId value. - */ - String regionId(); - - /** - * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.AccountInfoSecureInner object. - * - * @return the inner object. - */ - AccountInfoSecureInner innerModel(); -} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java index d8b1eec414d42..f237ae3b3ea0a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java @@ -13,6 +13,15 @@ public final class ActionType extends ExpandableStringEnum { /** Static value Internal for ActionType. */ public static final ActionType INTERNAL = fromString("Internal"); + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java index ace8b79ffc422..8f9800f2199a5 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java @@ -24,6 +24,10 @@ public final class AppServiceListResponse { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AppServiceListResponse class. */ + public AppServiceListResponse() { + } + /** * Get the value property: The items on this page. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java index 8eb368610602e..50fc1a7065c3d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java @@ -16,6 +16,15 @@ public final class AutoUpdateSetting extends ExpandableStringEnum userAssignedIdentities; + /** Creates an instance of IdentityProperties class. */ + public IdentityProperties() { + } + /** * Get the tenantId property: The Active Directory tenant id of the principal. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java index 74137caec0f00..2bc207d210274 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java @@ -16,6 +16,15 @@ public final class LiftrResourceCategories extends ExpandableStringEnum { /** Static value DISABLED for LogModule. */ public static final LogModule DISABLED = fromString("DISABLED"); + /** + * Creates a new instance of LogModule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogModule() { + } + /** * Creates or finds a LogModule from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java index 037d5cdecef84..3bac8ad5316d0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java @@ -38,6 +38,10 @@ public final class LogRules { @JsonProperty(value = "filteringTags") private List filteringTags; + /** Creates an instance of LogRules class. */ + public LogRules() { + } + /** * Get the sendAadLogs property: Flag specifying if AAD logs should be sent for the Monitor resource. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java index 05e73a8bfa5b1..4a3473ffffbf3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java @@ -19,6 +19,15 @@ public final class ManagedIdentityType extends ExpandableStringEnum filteringTags; + /** Creates an instance of MetricRules class. */ + public MetricRules() { + } + + /** + * Get the sendingMetrics property: Flag specifying if metrics from Azure resources should be sent for the Monitor + * resource. + * + * @return the sendingMetrics value. + */ + public SendingMetricsStatus sendingMetrics() { + return this.sendingMetrics; + } + + /** + * Set the sendingMetrics property: Flag specifying if metrics from Azure resources should be sent for the Monitor + * resource. + * + * @param sendingMetrics the sendingMetrics value to set. + * @return the MetricRules object itself. + */ + public MetricRules withSendingMetrics(SendingMetricsStatus sendingMetrics) { + this.sendingMetrics = sendingMetrics; + return this; + } + /** * Get the filteringTags property: List of filtering tags to be used for capturing metrics. If empty, all resources * will be captured. If only Exclude action is specified, the rules will apply to the list of all available diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java new file mode 100644 index 0000000000000..287f2029fc64b --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.models; + +import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; +import java.util.List; + +/** An immutable client-side representation of MetricsStatusResponse. */ +public interface MetricsStatusResponse { + /** + * Gets the azureResourceIds property: Azure resource IDs. + * + * @return the azureResourceIds value. + */ + List azureResourceIds(); + + /** + * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner object. + * + * @return the inner object. + */ + MetricsStatusResponseInner innerModel(); +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java index f58640b0b9c1f..106944a21d37c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java @@ -294,13 +294,7 @@ interface WithPlanData { MonitorResource.Update update(); /** The template for MonitorResource update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithMonitoringStatus, - UpdateStages.WithMarketplaceSubscriptionStatus, - UpdateStages.WithDynatraceEnvironmentProperties, - UpdateStages.WithUserInfo, - UpdateStages.WithPlanData { + interface Update extends UpdateStages.WithTags { /** * Executes the update request. * @@ -328,56 +322,6 @@ interface WithTags { */ Update withTags(Map tags); } - /** The stage of the MonitorResource update allowing to specify monitoringStatus. */ - interface WithMonitoringStatus { - /** - * Specifies the monitoringStatus property: Status of the monitor.. - * - * @param monitoringStatus Status of the monitor. - * @return the next definition stage. - */ - Update withMonitoringStatus(MonitoringStatus monitoringStatus); - } - /** The stage of the MonitorResource update allowing to specify marketplaceSubscriptionStatus. */ - interface WithMarketplaceSubscriptionStatus { - /** - * Specifies the marketplaceSubscriptionStatus property: Marketplace subscription status.. - * - * @param marketplaceSubscriptionStatus Marketplace subscription status. - * @return the next definition stage. - */ - Update withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus marketplaceSubscriptionStatus); - } - /** The stage of the MonitorResource update allowing to specify dynatraceEnvironmentProperties. */ - interface WithDynatraceEnvironmentProperties { - /** - * Specifies the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment.. - * - * @param dynatraceEnvironmentProperties Properties of the Dynatrace environment. - * @return the next definition stage. - */ - Update withDynatraceEnvironmentProperties(DynatraceEnvironmentProperties dynatraceEnvironmentProperties); - } - /** The stage of the MonitorResource update allowing to specify userInfo. */ - interface WithUserInfo { - /** - * Specifies the userInfo property: User info.. - * - * @param userInfo User info. - * @return the next definition stage. - */ - Update withUserInfo(UserInfo userInfo); - } - /** The stage of the MonitorResource update allowing to specify planData. */ - interface WithPlanData { - /** - * Specifies the planData property: Billing plan information.. - * - * @param planData Billing plan information. - * @return the next definition stage. - */ - Update withPlanData(PlanData planData); - } } /** * Refreshes the resource to sync with Azure. @@ -394,26 +338,6 @@ interface WithPlanData { */ MonitorResource refresh(Context context); - /** - * Gets the user account credentials for a Monitor. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor. - */ - AccountInfoSecure getAccountCredentials(); - - /** - * Gets the user account credentials for a Monitor. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response}. - */ - Response getAccountCredentialsWithResponse(Context context); - /** * List the resources currently being monitored by the Dynatrace monitor resource. * @@ -439,25 +363,25 @@ interface WithPlanData { /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. */ - VMExtensionPayload getVMHostPayload(); + Response getVMHostPayloadWithResponse(Context context); /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent along with {@link Response}. + * @return response of payload to be passed while installing VM agent. */ - Response getVMHostPayloadWithResponse(Context context); + VMExtensionPayload getVMHostPayload(); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -466,7 +390,7 @@ interface WithPlanData { PagedIterable listHosts(); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -476,6 +400,26 @@ interface WithPlanData { */ PagedIterable listHosts(Context context); + /** + * Get metric status. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response}. + */ + Response getMetricStatusWithResponse(Context context); + + /** + * Get metric status. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status. + */ + MetricsStatusResponse getMetricStatus(); + /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. * @@ -501,23 +445,27 @@ interface WithPlanData { /** * Gets the SSO configuration details from the partner. * + * @param request The details of the get sso details request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner. + * @return the SSO configuration details from the partner along with {@link Response}. */ - SsoDetailsResponse getSsoDetails(); + Response getSsoDetailsWithResponse(SsoDetailsRequest request, Context context); /** * Gets the SSO configuration details from the partner. * - * @param request The details of the get sso details request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner along with {@link Response}. + * @return the SSO configuration details from the partner. */ - Response getSsoDetailsWithResponse(SsoDetailsRequest request, Context context); + SsoDetailsResponse getSsoDetails(); /** * Gets all the Dynatrace environments that a user can link a azure resource to. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java index 6ee553b26cac3..d9ede93700e44 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java @@ -25,6 +25,10 @@ public final class MonitorResourceListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of MonitorResourceListResult class. */ + public MonitorResourceListResult() { + } + /** * Get the value property: The items on this page. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java index 890eb87822770..a1cb08a0ef4ee 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java @@ -19,35 +19,9 @@ public final class MonitorResourceUpdate { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /* - * Status of the monitor. - */ - @JsonProperty(value = "monitoringStatus") - private MonitoringStatus monitoringStatus; - - /* - * Marketplace subscription status. - */ - @JsonProperty(value = "marketplaceSubscriptionStatus") - private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; - - /* - * Properties of the Dynatrace environment. - */ - @JsonProperty(value = "dynatraceEnvironmentProperties") - private DynatraceEnvironmentProperties dynatraceEnvironmentProperties; - - /* - * User info. - */ - @JsonProperty(value = "userInfo") - private UserInfo userInfo; - - /* - * Billing plan information. - */ - @JsonProperty(value = "planData") - private PlanData planData; + /** Creates an instance of MonitorResourceUpdate class. */ + public MonitorResourceUpdate() { + } /** * Get the tags property: Resource tags. @@ -69,122 +43,11 @@ public MonitorResourceUpdate withTags(Map tags) { return this; } - /** - * Get the monitoringStatus property: Status of the monitor. - * - * @return the monitoringStatus value. - */ - public MonitoringStatus monitoringStatus() { - return this.monitoringStatus; - } - - /** - * Set the monitoringStatus property: Status of the monitor. - * - * @param monitoringStatus the monitoringStatus value to set. - * @return the MonitorResourceUpdate object itself. - */ - public MonitorResourceUpdate withMonitoringStatus(MonitoringStatus monitoringStatus) { - this.monitoringStatus = monitoringStatus; - return this; - } - - /** - * Get the marketplaceSubscriptionStatus property: Marketplace subscription status. - * - * @return the marketplaceSubscriptionStatus value. - */ - public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { - return this.marketplaceSubscriptionStatus; - } - - /** - * Set the marketplaceSubscriptionStatus property: Marketplace subscription status. - * - * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. - * @return the MonitorResourceUpdate object itself. - */ - public MonitorResourceUpdate withMarketplaceSubscriptionStatus( - MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { - this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus; - return this; - } - - /** - * Get the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * - * @return the dynatraceEnvironmentProperties value. - */ - public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { - return this.dynatraceEnvironmentProperties; - } - - /** - * Set the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * - * @param dynatraceEnvironmentProperties the dynatraceEnvironmentProperties value to set. - * @return the MonitorResourceUpdate object itself. - */ - public MonitorResourceUpdate withDynatraceEnvironmentProperties( - DynatraceEnvironmentProperties dynatraceEnvironmentProperties) { - this.dynatraceEnvironmentProperties = dynatraceEnvironmentProperties; - return this; - } - - /** - * Get the userInfo property: User info. - * - * @return the userInfo value. - */ - public UserInfo userInfo() { - return this.userInfo; - } - - /** - * Set the userInfo property: User info. - * - * @param userInfo the userInfo value to set. - * @return the MonitorResourceUpdate object itself. - */ - public MonitorResourceUpdate withUserInfo(UserInfo userInfo) { - this.userInfo = userInfo; - return this; - } - - /** - * Get the planData property: Billing plan information. - * - * @return the planData value. - */ - public PlanData planData() { - return this.planData; - } - - /** - * Set the planData property: Billing plan information. - * - * @param planData the planData value to set. - * @return the MonitorResourceUpdate object itself. - */ - public MonitorResourceUpdate withPlanData(PlanData planData) { - this.planData = planData; - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (dynatraceEnvironmentProperties() != null) { - dynatraceEnvironmentProperties().validate(); - } - if (userInfo() != null) { - userInfo().validate(); - } - if (planData() != null) { - planData().validate(); - } } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java index 8851d6e49b2fc..58d695d6d29d9 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java @@ -24,6 +24,10 @@ public final class MonitoredResourceListResponse { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of MonitoredResourceListResponse class. */ + public MonitoredResourceListResponse() { + } + /** * Get the value property: The items on this page. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java index a3e40048bebb1..1a28c5cb96db9 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java @@ -16,6 +16,15 @@ public final class MonitoringStatus extends ExpandableStringEnum { /** Static value FULL_STACK for MonitoringType. */ public static final MonitoringType FULL_STACK = fromString("FULL_STACK"); + /** + * Creates a new instance of MonitoringType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringType() { + } + /** * Creates or finds a MonitoringType from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java index 2022910d260d9..21494e867e259 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java @@ -10,32 +10,6 @@ /** Resource collection API of Monitors. */ public interface Monitors { - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor. - */ - AccountInfoSecure getAccountCredentials(String resourceGroupName, String monitorName); - - /** - * Gets the user account credentials for a Monitor. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the user account credentials for a Monitor along with {@link Response}. - */ - Response getAccountCredentialsWithResponse( - String resourceGroupName, String monitorName, Context context); - /** * List the resources currently being monitored by the Dynatrace monitor resource. * @@ -69,52 +43,52 @@ PagedIterable listMonitoredResources( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent. + * @return response of payload to be passed while installing VM agent along with {@link Response}. */ - VMExtensionPayload getVMHostPayload(String resourceGroupName, String monitorName); + Response getVMHostPayloadWithResponse( + String resourceGroupName, String monitorName, Context context); /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of payload to be passed while installing VM agent along with {@link Response}. + * @return response of payload to be passed while installing VM agent. */ - Response getVMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context); + VMExtensionPayload getVMHostPayload(String resourceGroupName, String monitorName); /** * Get a MonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource. + * @return a MonitorResource along with {@link Response}. */ - MonitorResource getByResourceGroup(String resourceGroupName, String monitorName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String monitorName, Context context); /** * Get a MonitorResource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a MonitorResource along with {@link Response}. + * @return a MonitorResource. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context); + MonitorResource getByResourceGroup(String resourceGroupName, String monitorName); /** * Delete a MonitorResource. @@ -183,7 +157,36 @@ Response getByResourceGroupWithResponse( PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response}. + */ + Response getMarketplaceSaaSResourceDetailsWithResponse( + MarketplaceSaaSResourceDetailsRequest request, Context context); + + /** + * Get Marketplace SaaS resource details of a tenant under a specific subscription. + * + * @param request Tenant Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace SaaS resource details of a tenant under a specific subscription. + */ + MarketplaceSaaSResourceDetailsResponse getMarketplaceSaaSResourceDetails( + MarketplaceSaaSResourceDetailsRequest request); + + /** + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -195,7 +198,7 @@ Response getByResourceGroupWithResponse( PagedIterable listHosts(String resourceGroupName, String monitorName); /** - * List the compute resources currently being monitored by the Dynatrace resource. + * List the VM/VMSS resources currently being monitored by the Dynatrace resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. @@ -207,6 +210,32 @@ Response getByResourceGroupWithResponse( */ PagedIterable listHosts(String resourceGroupName, String monitorName, Context context); + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status along with {@link Response}. + */ + Response getMetricStatusWithResponse( + String resourceGroupName, String monitorName, Context context); + + /** + * Get metric status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Name of the Monitor resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return metric status. + */ + MetricsStatusResponse getMetricStatus(String resourceGroupName, String monitorName); + /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. * @@ -239,27 +268,31 @@ Response getByResourceGroupWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. + * @param request The details of the get sso details request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner. + * @return the SSO configuration details from the partner along with {@link Response}. */ - SsoDetailsResponse getSsoDetails(String resourceGroupName, String monitorName); + Response getSsoDetailsWithResponse( + String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context); /** * Gets the SSO configuration details from the partner. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. - * @param request The details of the get sso details request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SSO configuration details from the partner along with {@link Response}. + * @return the SSO configuration details from the partner. */ - Response getSsoDetailsWithResponse( - String resourceGroupName, String monitorName, SsoDetailsRequest request, Context context); + SsoDetailsResponse getSsoDetails(String resourceGroupName, String monitorName); /** * Gets all the Dynatrace environments that a user can link a azure resource to. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java index faa542db48f65..3f5471dd22c81 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java @@ -37,6 +37,10 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java index 773fff1e08d67..9055c9402dce7 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java @@ -27,6 +27,10 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** * Get the value property: List of operations supported by the resource provider. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java index 1c7537232879b..93c8b13f3fcdb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java @@ -22,6 +22,15 @@ public final class Origin extends ExpandableStringEnum { /** Static value user,system for Origin. */ public static final Origin USER_SYSTEM = fromString("user,system"); + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + /** * Creates or finds a Origin from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java index eb57bcf05a8f4..4082118a3d0b8 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java @@ -35,6 +35,10 @@ public final class PlanData { @JsonProperty(value = "effectiveDate") private OffsetDateTime effectiveDate; + /** Creates an instance of PlanData class. */ + public PlanData() { + } + /** * Get the usageType property: different usage type like PAYG/COMMITTED. this could be enum. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java index cc95e4993bd49..a634fc5e04c5c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java @@ -37,6 +37,15 @@ public final class ProvisioningState extends ExpandableStringEnum getWithResponse( + String resourceGroupName, String monitorName, String configurationName, Context context); /** * Get a DynatraceSingleSignOnResource. @@ -29,14 +31,12 @@ public interface SingleSignOns { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DynatraceSingleSignOnResource along with {@link Response}. + * @return a DynatraceSingleSignOnResource. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context); + DynatraceSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName); /** * List all DynatraceSingleSignOnResource by monitorName. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java index afd5e556e2628..c685a67ae67a3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; /** Request for getting sso details for a user. */ @@ -13,9 +14,13 @@ public final class SsoDetailsRequest { /* * user principal id of the user */ - @JsonProperty(value = "userPrincipal") + @JsonProperty(value = "userPrincipal", required = true) private String userPrincipal; + /** Creates an instance of SsoDetailsRequest class. */ + public SsoDetailsRequest() { + } + /** * Get the userPrincipal property: user principal id of the user. * @@ -42,5 +47,12 @@ public SsoDetailsRequest withUserPrincipal(String userPrincipal) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (userPrincipal() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property userPrincipal in model SsoDetailsRequest")); + } } + + private static final ClientLogger LOGGER = new ClientLogger(SsoDetailsRequest.class); } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java index 610622dbbc3eb..f2a01d4c5a872 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java @@ -16,6 +16,15 @@ public final class SsoStatus extends ExpandableStringEnum { /** Static value Disabled for SsoStatus. */ public static final SsoStatus DISABLED = fromString("Disabled"); + /** + * Creates a new instance of SsoStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SsoStatus() { + } + /** * Creates or finds a SsoStatus from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java index bf7cc5353f67a..36a2eb4eaae58 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java @@ -16,6 +16,15 @@ public final class TagAction extends ExpandableStringEnum { /** Static value Exclude for TagAction. */ public static final TagAction EXCLUDE = fromString("Exclude"); + /** + * Creates a new instance of TagAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TagAction() { + } + /** * Creates or finds a TagAction from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java index 00f02c0cdc271..df2dd2bc8c0f2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java @@ -25,6 +25,10 @@ public final class TagRuleListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of TagRuleListResult class. */ + public TagRuleListResult() { + } + /** * Get the value property: The items on this page. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleUpdate.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleUpdate.java deleted file mode 100644 index 992daac50bda8..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleUpdate.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The updatable properties of the TagRule. */ -@Fluent -public final class TagRuleUpdate { - /* - * Set of rules for sending logs for the Monitor resource. - */ - @JsonProperty(value = "logRules") - private LogRules logRules; - - /* - * Set of rules for sending metrics for the Monitor resource. - */ - @JsonProperty(value = "metricRules") - private MetricRules metricRules; - - /** - * Get the logRules property: Set of rules for sending logs for the Monitor resource. - * - * @return the logRules value. - */ - public LogRules logRules() { - return this.logRules; - } - - /** - * Set the logRules property: Set of rules for sending logs for the Monitor resource. - * - * @param logRules the logRules value to set. - * @return the TagRuleUpdate object itself. - */ - public TagRuleUpdate withLogRules(LogRules logRules) { - this.logRules = logRules; - return this; - } - - /** - * Get the metricRules property: Set of rules for sending metrics for the Monitor resource. - * - * @return the metricRules value. - */ - public MetricRules metricRules() { - return this.metricRules; - } - - /** - * Set the metricRules property: Set of rules for sending metrics for the Monitor resource. - * - * @param metricRules the metricRules value to set. - * @return the TagRuleUpdate object itself. - */ - public TagRuleUpdate withMetricRules(MetricRules metricRules) { - this.metricRules = metricRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logRules() != null) { - logRules().validate(); - } - if (metricRules() != null) { - metricRules().validate(); - } - } -} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java index 8189b0b7341f6..fa271b84e311a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java @@ -16,12 +16,14 @@ public interface TagRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule. + * @return a TagRule along with {@link Response}. */ - TagRule get(String resourceGroupName, String monitorName, String ruleSetName); + Response getWithResponse( + String resourceGroupName, String monitorName, String ruleSetName, Context context); /** * Get a TagRule. @@ -29,14 +31,12 @@ public interface TagRules { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a TagRule along with {@link Response}. + * @return a TagRule. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + TagRule get(String resourceGroupName, String monitorName, String ruleSetName); /** * Delete a TagRule. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java index b757acb42bee7..2cc65ece3c3d1 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java @@ -37,6 +37,15 @@ public final class UpdateStatus extends ExpandableStringEnum { /** Static value UPDATE_PROBLEM for UpdateStatus. */ public static final UpdateStatus UPDATE_PROBLEM = fromString("UPDATE_PROBLEM"); + /** + * Creates a new instance of UpdateStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpdateStatus() { + } + /** * Creates or finds a UpdateStatus from its string representation. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java index 8eb79f1175156..6cb15e5801b93 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java @@ -10,7 +10,7 @@ /** A managed identity assigned by the user. */ @Fluent -public class UserAssignedIdentity { +public final class UserAssignedIdentity { /* * The active directory client identifier for this principal. */ @@ -23,6 +23,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "principalId", required = true) private String principalId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the clientId property: The active directory client identifier for this principal. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java index 6b4c756c28fe8..bd929e0b4ab44 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java @@ -40,6 +40,10 @@ public final class UserInfo { @JsonProperty(value = "country") private String country; + /** Creates an instance of UserInfo class. */ + public UserInfo() { + } + /** * Get the firstName property: First Name of the user. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java index 79f14e3fb4ce6..0ff246705b72d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java @@ -24,6 +24,10 @@ public final class VMHostsListResponse { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of VMHostsListResponse class. */ + public VMHostsListResponse() { + } + /** * Get the value property: The items on this page. * diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java index d217cf06aca59..74769480abca3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java @@ -21,7 +21,7 @@ /** Samples for Monitors CreateOrUpdate. */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MaximumSet_Gen. @@ -61,7 +61,7 @@ public static void monitorsCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MinimumSet_Gen. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java index 1e94896ac0053..ec3fa6df7366f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors Delete. */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MinimumSet_Gen.json */ /** * Sample code: Monitors_Delete_MinimumSet_Gen. @@ -17,11 +15,11 @@ public final class MonitorsDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MaximumSet_Gen.json */ /** * Sample code: Monitors_Delete_MaximumSet_Gen. @@ -29,6 +27,6 @@ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatra * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().delete("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetAccountCredentialsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetAccountCredentialsSamples.java deleted file mode 100644 index cf94ff75231fe..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetAccountCredentialsSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.generated; - -import com.azure.core.util.Context; - -/** Samples for Monitors GetAccountCredentials. */ -public final class MonitorsGetAccountCredentialsSamples { - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetAccountCredentials_MaximumSet_Gen.json - */ - /** - * Sample code: Monitors_GetAccountCredentials_MaximumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void monitorsGetAccountCredentialsMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getAccountCredentialsWithResponse("myResourceGroup", "myMonitor", Context.NONE); - } - - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetAccountCredentials_MinimumSet_Gen.json - */ - /** - * Sample code: Monitors_GetAccountCredentials_MinimumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void monitorsGetAccountCredentialsMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getAccountCredentialsWithResponse("myResourceGroup", "myMonitor", Context.NONE); - } -} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java index 6793353f6e187..561eb52092aca 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors GetByResourceGroup. */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MinimumSet_Gen.json */ /** * Sample code: Monitors_Get_MinimumSet_Gen. @@ -17,11 +15,13 @@ public final class MonitorsGetByResourceGroupSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MaximumSet_Gen.json */ /** * Sample code: Monitors_Get_MaximumSet_Gen. @@ -29,6 +29,8 @@ public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace. * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java new file mode 100644 index 0000000000000..f8dcefd8e9181 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.generated; + +import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; + +/** Samples for Monitors GetMarketplaceSaaSResourceDetails. */ +public final class MonitorsGetMarketplaceSaaSResourceDetailsSamples { + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMarketplaceSaaSResourceDetailsMinimumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMarketplaceSaaSResourceDetailsWithResponse( + new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMarketplaceSaaSResourceDetailsMaximumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMarketplaceSaaSResourceDetailsWithResponse( + new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java new file mode 100644 index 0000000000000..4e1e300630560 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.dynatrace.generated; + +/** Samples for Monitors GetMetricStatus. */ +public final class MonitorsGetMetricStatusSamples { + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json + */ + /** + * Sample code: Monitors_GetMetricStatus_MinimumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMetricStatusMinimumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json + */ + /** + * Sample code: Monitors_GetMetricStatus_MaximumSet_Gen. + * + * @param manager Entry point to DynatraceManager. + */ + public static void monitorsGetMetricStatusMaximumSetGen( + com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager + .monitors() + .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java index 133d97b15f52a..19dea6e0ba3ae 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; /** Samples for Monitors GetSsoDetails. */ public final class MonitorsGetSsoDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetSSODetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MaximumSet_Gen. @@ -25,11 +24,11 @@ public static void monitorsGetSSODetailsMaximumSetGen( "myResourceGroup", "myMonitor", new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetSSODetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MinimumSet_Gen. @@ -40,6 +39,10 @@ public static void monitorsGetSSODetailsMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager .monitors() - .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", new SsoDetailsRequest(), Context.NONE); + .getSsoDetailsWithResponse( + "myResourceGroup", + "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java index a712acc5f3e2f..a58c532a9061a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors GetVMHostPayload. */ public final class MonitorsGetVMHostPayloadSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MinimumSet_Gen. @@ -18,11 +16,13 @@ public final class MonitorsGetVMHostPayloadSamples { */ public static void monitorsGetVMHostPayloadMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MaximumSet_Gen. @@ -31,6 +31,8 @@ public static void monitorsGetVMHostPayloadMinimumSetGen( */ public static void monitorsGetVMHostPayloadMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", Context.NONE); + manager + .monitors() + .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java index 7079fec22af26..df44a8d451f57 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors ListAppServices. */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MaximumSet_Gen. @@ -18,11 +16,11 @@ public final class MonitorsListAppServicesSamples { */ public static void monitorsListAppServicesMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listAppServices("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MinimumSet_Gen. @@ -31,6 +29,6 @@ public static void monitorsListAppServicesMaximumSetGen( */ public static void monitorsListAppServicesMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listAppServices("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java index 5a2a6319fb81e..8803678c71eb4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors ListByResourceGroup. */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MinimumSet_Gen. @@ -18,11 +16,11 @@ public final class MonitorsListByResourceGroupSamples { */ public static void monitorsListByResourceGroupMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MaximumSet_Gen. @@ -31,6 +29,6 @@ public static void monitorsListByResourceGroupMinimumSetGen( */ public static void monitorsListByResourceGroupMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java index 690f853b50bb1..6f661e3ce26e1 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors ListHosts. */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListHosts_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MinimumSet_Gen. @@ -17,11 +15,11 @@ public final class MonitorsListHostsSamples { * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListHosts_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MaximumSet_Gen. @@ -29,6 +27,6 @@ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dyna * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listHosts("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java index cf43646c71017..36b98ff37d6bd 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; /** Samples for Monitors ListLinkableEnvironments. */ public final class MonitorsListLinkableEnvironmentsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MinimumSet_Gen. @@ -21,11 +20,18 @@ public static void monitorsListLinkableEnvironmentsMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager .monitors() - .listLinkableEnvironments("myResourceGroup", "myMonitor", new LinkableEnvironmentRequest(), Context.NONE); + .listLinkableEnvironments( + "myResourceGroup", + "myMonitor", + new LinkableEnvironmentRequest() + .withTenantId("00000000-0000-0000-0000-000000000000") + .withUserPrincipal("alice@microsoft.com") + .withRegion("East US"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MaximumSet_Gen. @@ -43,6 +49,6 @@ public static void monitorsListLinkableEnvironmentsMaximumSetGen( .withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java index 655a4fac3ae58..8ec7c8bc6ebaa 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors ListMonitoredResources. */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MinimumSet_Gen. @@ -18,11 +16,11 @@ public final class MonitorsListMonitoredResourcesSamples { */ public static void monitorsListMonitoredResourcesMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MaximumSet_Gen. @@ -31,6 +29,6 @@ public static void monitorsListMonitoredResourcesMinimumSetGen( */ public static void monitorsListMonitoredResourcesMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java index 921c214eab3c3..ece33a091e3aa 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Monitors List. */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MinimumSet_Gen. @@ -18,11 +16,11 @@ public final class MonitorsListSamples { */ public static void monitorsListBySubscriptionIdMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MaximumSet_Gen. @@ -31,6 +29,6 @@ public static void monitorsListBySubscriptionIdMinimumSetGen( */ public static void monitorsListBySubscriptionIdMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.monitors().list(Context.NONE); + manager.monitors().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java index e0a60372b73ff..442cac14654fa 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java @@ -4,24 +4,14 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnProperties; -import com.azure.resourcemanager.dynatrace.models.AccountInfo; -import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties; -import com.azure.resourcemanager.dynatrace.models.EnvironmentInfo; -import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; import com.azure.resourcemanager.dynatrace.models.MonitorResource; -import com.azure.resourcemanager.dynatrace.models.MonitoringStatus; -import com.azure.resourcemanager.dynatrace.models.PlanData; -import com.azure.resourcemanager.dynatrace.models.UserInfo; -import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; /** Samples for Monitors Update. */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MinimumSet_Gen.json */ /** * Sample code: Monitors_Update_MinimumSet_Gen. @@ -30,12 +20,15 @@ public final class MonitorsUpdateSamples { */ public static void monitorsUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { MonitorResource resource = - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Monitors_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MaximumSet_Gen.json */ /** * Sample code: Monitors_Update_MaximumSet_Gen. @@ -44,31 +37,11 @@ public static void monitorsUpdateMinimumSetGen(com.azure.resourcemanager.dynatra */ public static void monitorsUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { MonitorResource resource = - manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); - resource - .update() - .withTags(mapOf("Environment", "Dev")) - .withMonitoringStatus(MonitoringStatus.ENABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withDynatraceEnvironmentProperties( - new DynatraceEnvironmentProperties() - .withAccountInfo(new AccountInfo()) - .withEnvironmentInfo(new EnvironmentInfo()) - .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) - .withUserInfo( - new UserInfo() - .withFirstName("Alice") - .withLastName("Bobab") - .withEmailAddress("alice@microsoft.com") - .withPhoneNumber("123456") - .withCountry("westus2")) - .withPlanData( - new PlanData() - .withUsageType("Committed") - .withBillingCycle("Monthly") - .withPlanDetails("dynatraceapitestplan") - .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) - .apply(); + manager + .monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Environment", "Dev")).apply(); } @SuppressWarnings("unchecked") diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java index 0c73e15b98f9f..558f376a4bf2c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet_Gen. @@ -17,11 +15,11 @@ public final class OperationsListSamples { * @param manager Entry point to DynatraceManager. */ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet_Gen. @@ -29,6 +27,6 @@ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatra * @param manager Entry point to DynatraceManager. */ public static void operationsListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java index b3966e8dc7d07..9aa24184146db 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for SingleSignOn CreateOrUpdate. */ public final class SingleSignOnCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MaximumSet_Gen. @@ -31,7 +31,7 @@ public static void singleSignOnCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MinimumSet_Gen. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java index 8d14fb2dba43c..6439d512c4336 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for SingleSignOn Get. */ public final class SingleSignOnGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MinimumSet_Gen. @@ -17,11 +15,13 @@ public final class SingleSignOnGetSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager + .singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MaximumSet_Gen. @@ -29,6 +29,8 @@ public static void singleSignOnGetMinimumSetGen(com.azure.resourcemanager.dynatr * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager + .singleSignOns() + .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java index bef2ea30227c3..6b8704e6e2573 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for SingleSignOn List. */ public final class SingleSignOnListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MaximumSet_Gen. @@ -17,11 +15,11 @@ public final class SingleSignOnListSamples { * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().list("myResourceGroup", "myMonitor", Context.NONE); + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/SingleSignOn_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MinimumSet_Gen. @@ -29,6 +27,6 @@ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynat * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.singleSignOns().list("myResourceGroup", "myMonitor", Context.NONE); + manager.singleSignOns().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java index 244b4740a75f5..1da49844ba86a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java @@ -10,13 +10,14 @@ import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendSubscriptionLogsStatus; +import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import java.util.Arrays; /** Samples for TagRules CreateOrUpdate. */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MaximumSet_Gen. @@ -47,6 +48,7 @@ public static void tagRulesCreateOrUpdateMaximumSetGen( .withAction(TagAction.EXCLUDE)))) .withMetricRules( new MetricRules() + .withSendingMetrics(SendingMetricsStatus.ENABLED) .withFilteringTags( Arrays .asList( @@ -58,7 +60,7 @@ public static void tagRulesCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MinimumSet_Gen. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java index 23f2a43a95593..4d4e11dcb007c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for TagRules Delete. */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MinimumSet_Gen.json */ /** * Sample code: TagRules_Delete_MinimumSet_Gen. @@ -17,11 +15,11 @@ public final class TagRulesDeleteSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().delete("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MaximumSet_Gen.json */ /** * Sample code: TagRules_Delete_MaximumSet_Gen. @@ -29,6 +27,6 @@ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatra * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().delete("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().delete("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java index 8ab62a462925c..068f1e0f22ed6 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for TagRules Get. */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MinimumSet_Gen.json */ /** * Sample code: TagRules_Get_MinimumSet_Gen. @@ -17,11 +15,11 @@ public final class TagRulesGetSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MaximumSet_Gen.json */ /** * Sample code: TagRules_Get_MaximumSet_Gen. @@ -29,6 +27,6 @@ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace. * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java index 2e160a9fc93a2..2ddc9c5455b0d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.dynatrace.generated; -import com.azure.core.util.Context; - /** Samples for TagRules List. */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MaximumSet_Gen.json */ /** * Sample code: TagRules_List_MaximumSet_Gen. @@ -17,11 +15,11 @@ public final class TagRulesListSamples { * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MinimumSet_Gen.json */ /** * Sample code: TagRules_List_MinimumSet_Gen. @@ -29,6 +27,6 @@ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + manager.tagRules().list("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesUpdateSamples.java deleted file mode 100644 index 5d7d697d3f5c4..0000000000000 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesUpdateSamples.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.dynatrace.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.dynatrace.models.FilteringTag; -import com.azure.resourcemanager.dynatrace.models.LogRules; -import com.azure.resourcemanager.dynatrace.models.MetricRules; -import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; -import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; -import com.azure.resourcemanager.dynatrace.models.SendSubscriptionLogsStatus; -import com.azure.resourcemanager.dynatrace.models.TagAction; -import com.azure.resourcemanager.dynatrace.models.TagRule; -import java.util.Arrays; - -/** Samples for TagRules Update. */ -public final class TagRulesUpdateSamples { - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Update_MaximumSet_Gen.json - */ - /** - * Sample code: TagRules_Update_MaximumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void tagRulesUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - TagRule resource = - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE).getValue(); - resource - .update() - .withLogRules( - new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("Environment") - .withValue("Dev") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules( - new MetricRules() - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE)))) - .apply(); - } - - /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2021-09-01/examples/TagRules_Update_MinimumSet_Gen.json - */ - /** - * Sample code: TagRules_Update_MinimumSet_Gen. - * - * @param manager Entry point to DynatraceManager. - */ - public static void tagRulesUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - TagRule resource = - manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE).getValue(); - resource.update().apply(); - } -}