diff --git a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md index 8daee380701d3..0d0f12d052e8d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md +++ b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2021-12-16) +- Azure Resource Manager MicrosoftDatadog client library for Java. This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.3 (2021-05-31) diff --git a/sdk/datadog/azure-resourcemanager-datadog/README.md b/sdk/datadog/azure-resourcemanager-datadog/README.md index d46d07d76072b..2abb974b0e268 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/README.md +++ b/sdk/datadog/azure-resourcemanager-datadog/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-datadog - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,7 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md) ## Troubleshooting diff --git a/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md new file mode 100644 index 0000000000000..e442107742a3f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md @@ -0,0 +1,513 @@ +# Code snippets and samples + + +## MarketplaceAgreements + +- [CreateOrUpdate](#marketplaceagreements_createorupdate) +- [List](#marketplaceagreements_list) + +## Monitors + +- [Create](#monitors_create) +- [Delete](#monitors_delete) +- [GetByResourceGroup](#monitors_getbyresourcegroup) +- [GetDefaultKey](#monitors_getdefaultkey) +- [List](#monitors_list) +- [ListApiKeys](#monitors_listapikeys) +- [ListByResourceGroup](#monitors_listbyresourcegroup) +- [ListHosts](#monitors_listhosts) +- [ListLinkedResources](#monitors_listlinkedresources) +- [ListMonitoredResources](#monitors_listmonitoredresources) +- [RefreshSetPasswordLink](#monitors_refreshsetpasswordlink) +- [SetDefaultKey](#monitors_setdefaultkey) +- [Update](#monitors_update) + +## Operations + +- [List](#operations_list) + +## SingleSignOnConfigurations + +- [CreateOrUpdate](#singlesignonconfigurations_createorupdate) +- [Get](#singlesignonconfigurations_get) +- [List](#singlesignonconfigurations_list) + +## TagRules + +- [CreateOrUpdate](#tagrules_createorupdate) +- [Get](#tagrules_get) +- [List](#tagrules_list) +### MarketplaceAgreements_CreateOrUpdate + +```java +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements CreateOrUpdate. */ +public final class MarketplaceAgreementsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json + */ + /** + * Sample code: MarketplaceAgreements_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().createOrUpdateWithResponse(null, Context.NONE); + } +} +``` + +### MarketplaceAgreements_List + +```java +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements List. */ +public final class MarketplaceAgreementsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json + */ + /** + * Sample code: MarketplaceAgreements_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().list(Context.NONE); + } +} +``` + +### Monitors_Create + +```java +/** Samples for Monitors Create. */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .create(); + } +} +``` + +### Monitors_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors Delete. */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors GetByResourceGroup. */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_GetDefaultKey + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors GetDefaultKey. */ +public final class MonitorsGetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json + */ + /** + * Sample code: Monitors_GetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getDefaultKeyWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_List + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors List. */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().list(Context.NONE); + } +} +``` + +### Monitors_ListApiKeys + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListApiKeys. */ +public final class MonitorsListApiKeysSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json + */ + /** + * Sample code: Monitors_ListApiKeys. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListApiKeys(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listApiKeys("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListByResourceGroup. */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + } +} +``` + +### Monitors_ListHosts + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListHosts. */ +public final class MonitorsListHostsSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json + */ + /** + * Sample code: Monitors_ListHosts. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListHosts(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListLinkedResources + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListLinkedResources. */ +public final class MonitorsListLinkedResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json + */ + /** + * Sample code: Monitors_ListLinkedResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListLinkedResources(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listLinkedResources("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListMonitoredResources + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListMonitoredResources. */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: Monitors_ListMonitoredResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListMonitoredResources( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_RefreshSetPasswordLink + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors RefreshSetPasswordLink. */ +public final class MonitorsRefreshSetPasswordLinkSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json + */ + /** + * Sample code: Monitors_RefreshSetPasswordLink. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsRefreshSetPasswordLink( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().refreshSetPasswordLinkWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_SetDefaultKey + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors SetDefaultKey. */ +public final class MonitorsSetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json + */ + /** + * Sample code: Monitors_SetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsSetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().setDefaultKeyWithResponse("myResourceGroup", "myMonitor", null, Context.NONE); + } +} +``` + +### Monitors_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datadog.models.DatadogMonitorResource; + +/** Samples for Monitors Update. */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + DatadogMonitorResource resource = + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + resource.update().apply(); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void operationsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### SingleSignOnConfigurations_CreateOrUpdate + +```java +/** Samples for SingleSignOnConfigurations CreateOrUpdate. */ +public final class SingleSignOnConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .singleSignOnConfigurations() + .define("default") + .withExistingMonitor("myResourceGroup", "myMonitor") + .create(); + } +} +``` + +### SingleSignOnConfigurations_Get + +```java +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations Get. */ +public final class SingleSignOnConfigurationsGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsGet( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} +``` + +### SingleSignOnConfigurations_List + +```java +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations List. */ +public final class SingleSignOnConfigurationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsList( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().list("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### TagRules_CreateOrUpdate + +```java +/** Samples for TagRules CreateOrUpdate. */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} +``` + +### TagRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for TagRules Get. */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} +``` + +### TagRules_List + +```java +import com.azure.core.util.Context; + +/** Samples for TagRules List. */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java index f43e14859248b..eb717dc269dd3 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -37,6 +38,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to MicrosoftDatadogManager. */ public final class MicrosoftDatadogManager { @@ -93,6 +95,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -132,6 +135,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -174,7 +188,7 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.datadog") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -188,20 +202,33 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java index f303068afa30d..82178adf9bbdc 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java @@ -273,7 +273,7 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body); @@ -289,7 +289,7 @@ SyncPoller, DatadogMonitorResourceInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context); @@ -347,7 +347,7 @@ DatadogMonitorResourceInner create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body); @@ -363,7 +363,7 @@ SyncPoller, DatadogMonitorResourceInner> * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context); @@ -421,7 +421,7 @@ DatadogMonitorResourceInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName); /** @@ -435,7 +435,7 @@ DatadogMonitorResourceInner update( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, Context context); /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java index 5847518f9365e..a785d22c807cb 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java @@ -17,7 +17,7 @@ public interface OperationsClient { * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ public interface OperationsClient { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java index e1b56b9ee1397..b46801cf9513d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java @@ -54,7 +54,7 @@ public interface SingleSignOnConfigurationsClient { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, String configurationName, DatadogSingleSignOnResourceInner body); @@ -71,7 +71,7 @@ SyncPoller, DatadogSingleSignOnReso * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java index 03840bd4e0c22..9b9d5e21fe7d3 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java @@ -1937,7 +1937,7 @@ private Mono>> createWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginCreateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body) { Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); @@ -1948,7 +1948,7 @@ private PollerFlux, DatadogMonitorResour this.client.getHttpPipeline(), DatadogMonitorResourceInner.class, DatadogMonitorResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1963,7 +1963,7 @@ private PollerFlux, DatadogMonitorResour * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginCreateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context) { context = this.client.mergeContext(context); @@ -1989,7 +1989,7 @@ private PollerFlux, DatadogMonitorResour * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body) { return beginCreateAsync(resourceGroupName, monitorName, body).getSyncPoller(); @@ -2007,7 +2007,7 @@ public SyncPoller, DatadogMonitorResourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context) { return beginCreateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); @@ -2236,7 +2236,7 @@ private Mono>> updateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginUpdateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, monitorName, body); @@ -2247,7 +2247,7 @@ private PollerFlux, DatadogMonitorResour this.client.getHttpPipeline(), DatadogMonitorResourceInner.class, DatadogMonitorResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2262,7 +2262,7 @@ private PollerFlux, DatadogMonitorResour * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginUpdateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context) { context = this.client.mergeContext(context); @@ -2288,7 +2288,7 @@ private PollerFlux, DatadogMonitorResour * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body) { return beginUpdateAsync(resourceGroupName, monitorName, body).getSyncPoller(); @@ -2306,7 +2306,7 @@ public SyncPoller, DatadogMonitorResourc * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context) { return beginUpdateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); @@ -2523,12 +2523,13 @@ private Mono>> deleteWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2542,7 +2543,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String monitorName, Context context) { context = this.client.mergeContext(context); @@ -2562,7 +2563,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName) { return beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); } @@ -2578,7 +2579,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the completion. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String monitorName, Context context) { return beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java index 7b29f953fd35e..e82a2400e3452 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java @@ -85,7 +85,7 @@ Mono> listNext( * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +118,7 @@ private Mono> listSinglePageAsync() { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +148,7 @@ private Mono> listSinglePageAsync(Context co * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +162,7 @@ private PagedFlux listAsync() { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +175,7 @@ private PagedFlux listAsync(Context context) { * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +189,7 @@ public PagedIterable list() { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +203,7 @@ public PagedIterable list(Context context) { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +239,7 @@ private Mono> listNextSinglePageAsync(String * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java index ea4564fc7355b..5d0df36eff328 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java @@ -438,7 +438,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogSingleSignOnResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -454,7 +454,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), DatadogSingleSignOnResourceInner.class, DatadogSingleSignOnResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -470,7 +470,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogSingleSignOnResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -503,7 +503,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -526,7 +526,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java index bc3934d0835c6..599cb9cc63170 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -26,6 +27,7 @@ public final class DatadogMonitorResourceUpdateParameters { * The new tags of the monitor resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java index 1a75068c37164..e979ba8a7ff49 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java @@ -14,7 +14,7 @@ public interface Operations { * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ PagedIterable list(); @@ -25,7 +25,7 @@ public interface Operations { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations. */ PagedIterable list(Context context); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..b0d4c4917b172 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements CreateOrUpdate. */ +public final class MarketplaceAgreementsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json + */ + /** + * Sample code: MarketplaceAgreements_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().createOrUpdateWithResponse(null, Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java new file mode 100644 index 0000000000000..1125a26c674af --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements List. */ +public final class MarketplaceAgreementsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json + */ + /** + * Sample code: MarketplaceAgreements_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().list(Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java new file mode 100644 index 0000000000000..7c90eb2d5da4e --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.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.datadog.generated; + +/** Samples for Monitors Create. */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .create(); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java new file mode 100644 index 0000000000000..97e6a491fad4f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors Delete. */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..420576be2795b --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors GetByResourceGroup. */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java new file mode 100644 index 0000000000000..df1fe6c1091f4 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors GetDefaultKey. */ +public final class MonitorsGetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json + */ + /** + * Sample code: Monitors_GetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getDefaultKeyWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java new file mode 100644 index 0000000000000..35b40fe03419f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListApiKeys. */ +public final class MonitorsListApiKeysSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json + */ + /** + * Sample code: Monitors_ListApiKeys. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListApiKeys(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listApiKeys("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..29547dbc8fb5f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListByResourceGroup. */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java new file mode 100644 index 0000000000000..c5dd9ef667d32 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListHosts. */ +public final class MonitorsListHostsSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json + */ + /** + * Sample code: Monitors_ListHosts. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListHosts(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java new file mode 100644 index 0000000000000..f04eee8792144 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListLinkedResources. */ +public final class MonitorsListLinkedResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json + */ + /** + * Sample code: Monitors_ListLinkedResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListLinkedResources(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listLinkedResources("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java new file mode 100644 index 0000000000000..79119ba0e57fb --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListMonitoredResources. */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: Monitors_ListMonitoredResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListMonitoredResources( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java new file mode 100644 index 0000000000000..7bad7be18a90f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors List. */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().list(Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java new file mode 100644 index 0000000000000..908c7a2d1a8a0 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors RefreshSetPasswordLink. */ +public final class MonitorsRefreshSetPasswordLinkSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json + */ + /** + * Sample code: Monitors_RefreshSetPasswordLink. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsRefreshSetPasswordLink( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().refreshSetPasswordLinkWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java new file mode 100644 index 0000000000000..8a0ce260b42f1 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Monitors SetDefaultKey. */ +public final class MonitorsSetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json + */ + /** + * Sample code: Monitors_SetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsSetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().setDefaultKeyWithResponse("myResourceGroup", "myMonitor", null, Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java new file mode 100644 index 0000000000000..97450f9f550ad --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.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.datadog.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.datadog.models.DatadogMonitorResource; + +/** Samples for Monitors Update. */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + DatadogMonitorResource resource = + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + resource.update().apply(); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java new file mode 100644 index 0000000000000..96f9b0cfb77c0 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void operationsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..9d88da2d071ca --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.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.datadog.generated; + +/** Samples for SingleSignOnConfigurations CreateOrUpdate. */ +public final class SingleSignOnConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .singleSignOnConfigurations() + .define("default") + .withExistingMonitor("myResourceGroup", "myMonitor") + .create(); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java new file mode 100644 index 0000000000000..b32e6dd10efdf --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations Get. */ +public final class SingleSignOnConfigurationsGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsGet( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java new file mode 100644 index 0000000000000..a55d6e7f57aa4 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations List. */ +public final class SingleSignOnConfigurationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsList( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().list("myResourceGroup", "myMonitor", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..6d8a0e43932e6 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +/** Samples for TagRules CreateOrUpdate. */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java new file mode 100644 index 0000000000000..aa413b29afe4d --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for TagRules Get. */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java new file mode 100644 index 0000000000000..908a8864e1b29 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +import com.azure.core.util.Context; + +/** Samples for TagRules List. */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + } +}