/// <summary> /// Creates or updates an IoT Connector resource with the specified parameters. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the service instance. /// </param> /// <param name='workspaceName'> /// The name of workspace resource. /// </param> /// <param name='iotConnectorName'> /// The name of IoT Connector resource. /// </param> /// <param name='iotConnector'> /// The parameters for creating or updating an IoT Connectors resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IotConnector> BeginCreateOrUpdateAsync(this IIotConnectorsOperations operations, string resourceGroupName, string workspaceName, string iotConnectorName, IotConnector iotConnector, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, iotConnectorName, iotConnector, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates an IoT Connector resource with the specified parameters. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the service instance. /// </param> /// <param name='workspaceName'> /// The name of workspace resource. /// </param> /// <param name='iotConnectorName'> /// The name of IoT Connector resource. /// </param> /// <param name='iotConnector'> /// The parameters for creating or updating an IoT Connectors resource. /// </param> public static IotConnector BeginCreateOrUpdate(this IIotConnectorsOperations operations, string resourceGroupName, string workspaceName, string iotConnectorName, IotConnector iotConnector) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, workspaceName, iotConnectorName, iotConnector).GetAwaiter().GetResult()); }