public virtual ArmOperation <AppPlatformAppResource> CreateOrUpdate(WaitUntil waitUntil, string appName, AppPlatformAppResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(appName, nameof(appName)); Argument.AssertNotNull(data, nameof(data)); using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResourceCollection.CreateOrUpdate"); scope.Start(); try { var response = _appPlatformAppResourceAppsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data, cancellationToken); var operation = new AppPlatformArmOperation <AppPlatformAppResource>(new AppPlatformAppResourceOperationSource(Client), _appPlatformAppResourceAppsClientDiagnostics, Pipeline, _appPlatformAppResourceAppsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, appName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }