Share via


DeviceSecurityGroupCollection.CreateOrUpdateAsync Method

Definition

Use this method to creates or updates the device security group on a specified IoT Hub resource.

  • Request Path: /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}
  • Operation Id: DeviceSecurityGroups_CreateOrUpdate
  • Default Api Version: 2019-08-01
  • Resource: DeviceSecurityGroupResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string deviceSecurityGroupName, Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.SecurityCenter.DeviceSecurityGroupResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, deviceSecurityGroupName As String, data As DeviceSecurityGroupData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of DeviceSecurityGroupResource))

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.

deviceSecurityGroupName
String

The name of the device security group. Note that the name of the device security group is case insensitive.

data
DeviceSecurityGroupData

Security group object.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

deviceSecurityGroupName or data is null.

Applies to