CustomRecommendationCollection.CreateOrUpdate Method

Definition

Creates or updates a custom recommendation over a given scope

  • Request Path. : /{scope}/providers/Microsoft.Security/customRecommendations/{customRecommendationName}.
  • Operation Id. : CustomRecommendations_CreateOrUpdate.
  • Default Api Version. : 2024-08-01.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomRecommendationResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string customRecommendationName, Azure.ResourceManager.SecurityCenter.CustomRecommendationData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.CustomRecommendationData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomRecommendationResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.CustomRecommendationData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.CustomRecommendationResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, customRecommendationName As String, data As CustomRecommendationData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of CustomRecommendationResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

customRecommendationName
String

Name of the Custom Recommendation.

data
CustomRecommendationData

Custom Recommendation body.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

customRecommendationName or data is null.

customRecommendationName is an empty string, and was expected to be non-empty.

Applies to