共用方式為


SecurityCenterPricingCollection.CreateOrUpdateAsync Method

Definition

Updates a provided Microsoft Defender for Cloud pricing configuration in the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Security/pricings/{pricingName}
  • Operation Id: Pricings_Update
  • Default Api Version: 2023-01-01
  • Resource: SecurityCenterPricingResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SecurityCenterPricingResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string pricingName, Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SecurityCenterPricingResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.SecurityCenterPricingData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.SecurityCenterPricingResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, pricingName As String, data As SecurityCenterPricingData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of SecurityCenterPricingResource))

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.

pricingName
String

name of the pricing configuration.

data
SecurityCenterPricingData

Pricing object.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

pricingName or data is null.

Applies to