public virtual WebAppUpdateFtpAllowedSlotOperation CreateOrUpdate(CsmPublishingCredentialsPoliciesEntityData csmPublishingAccessPoliciesEntity, bool waitForCompletion = true, CancellationToken cancellationToken = default) { if (csmPublishingAccessPoliciesEntity == null) { throw new ArgumentNullException(nameof(csmPublishingAccessPoliciesEntity)); } using var scope = _clientDiagnostics.CreateScope("SiteSlotBasicPublishingCredentialsPolicyFtp.CreateOrUpdate"); scope.Start(); try { var response = _webAppsRestClient.UpdateFtpAllowedSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, csmPublishingAccessPoliciesEntity, cancellationToken); var operation = new WebAppUpdateFtpAllowedSlotOperation(this, response); if (waitForCompletion) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
internal SiteSlotBasicPublishingCredentialsPolicyFtp(ArmResource options, CsmPublishingCredentialsPoliciesEntityData resource) : base(options, resource.Id) { HasData = true; _data = resource; Parent = options; _clientDiagnostics = new ClientDiagnostics(ClientOptions); _webAppsRestClient = new WebAppsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri); }
internal BasicPublishingCredentialsPolicyFtpResource(ArmClient client, CsmPublishingCredentialsPoliciesEntityData data) : this(client, data.Id) { HasData = true; _data = data; }
public virtual ArmOperation <BasicPublishingCredentialsPolicyFtpResource> CreateOrUpdate(WaitUntil waitUntil, CsmPublishingCredentialsPoliciesEntityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _basicPublishingCredentialsPolicyFtpWebAppsClientDiagnostics.CreateScope("BasicPublishingCredentialsPolicyFtpResource.CreateOrUpdate"); scope.Start(); try { var response = _basicPublishingCredentialsPolicyFtpWebAppsRestClient.UpdateFtpAllowed(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); var operation = new AppServiceArmOperation <BasicPublishingCredentialsPolicyFtpResource>(Response.FromValue(new BasicPublishingCredentialsPolicyFtpResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
internal SiteSlotBasicPublishingCredentialsPolicyScm(ArmClient armClient, CsmPublishingCredentialsPoliciesEntityData data) : this(armClient, data.Id) { HasData = true; _data = data; }
public async virtual Task <SiteSlotBasicPublishingCredentialsPolicyScmCreateOrUpdateOperation> CreateOrUpdateAsync(bool waitForCompletion, CsmPublishingCredentialsPoliciesEntityData csmPublishingAccessPoliciesEntity, CancellationToken cancellationToken = default) { if (csmPublishingAccessPoliciesEntity == null) { throw new ArgumentNullException(nameof(csmPublishingAccessPoliciesEntity)); } using var scope = _siteSlotBasicPublishingCredentialsPolicyScmWebAppsClientDiagnostics.CreateScope("SiteSlotBasicPublishingCredentialsPolicyScm.CreateOrUpdate"); scope.Start(); try { var response = await _siteSlotBasicPublishingCredentialsPolicyScmWebAppsRestClient.UpdateScmAllowedSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, csmPublishingAccessPoliciesEntity, cancellationToken).ConfigureAwait(false); var operation = new SiteSlotBasicPublishingCredentialsPolicyScmCreateOrUpdateOperation(ArmClient, response); if (waitForCompletion) { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
public async virtual Task <ArmOperation <BasicPublishingCredentialsPolicyFtp> > CreateOrUpdateAsync(bool waitForCompletion, CsmPublishingCredentialsPoliciesEntityData csmPublishingAccessPoliciesEntity, CancellationToken cancellationToken = default) { Argument.AssertNotNull(csmPublishingAccessPoliciesEntity, nameof(csmPublishingAccessPoliciesEntity)); using var scope = _basicPublishingCredentialsPolicyFtpWebAppsClientDiagnostics.CreateScope("BasicPublishingCredentialsPolicyFtp.CreateOrUpdate"); scope.Start(); try { var response = await _basicPublishingCredentialsPolicyFtpWebAppsRestClient.UpdateFtpAllowedAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, csmPublishingAccessPoliciesEntity, cancellationToken).ConfigureAwait(false); var operation = new AppServiceArmOperation <BasicPublishingCredentialsPolicyFtp>(Response.FromValue(new BasicPublishingCredentialsPolicyFtp(Client, response), response.GetRawResponse())); if (waitForCompletion) { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual ArmOperation <ScmSiteSlotBasicPublishingCredentialsPolicy> CreateOrUpdate(bool waitForCompletion, CsmPublishingCredentialsPoliciesEntityData csmPublishingAccessPoliciesEntity, CancellationToken cancellationToken = default) { Argument.AssertNotNull(csmPublishingAccessPoliciesEntity, nameof(csmPublishingAccessPoliciesEntity)); using var scope = _scmSiteSlotBasicPublishingCredentialsPolicyWebAppsClientDiagnostics.CreateScope("ScmSiteSlotBasicPublishingCredentialsPolicy.CreateOrUpdate"); scope.Start(); try { var response = _scmSiteSlotBasicPublishingCredentialsPolicyWebAppsRestClient.UpdateScmAllowedSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, csmPublishingAccessPoliciesEntity, cancellationToken); var operation = new AppServiceArmOperation <ScmSiteSlotBasicPublishingCredentialsPolicy>(Response.FromValue(new ScmSiteSlotBasicPublishingCredentialsPolicy(Client, response), response.GetRawResponse())); if (waitForCompletion) { operation.WaitForCompletion(cancellationToken); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }
internal ScmSiteBasicPublishingCredentialsPolicy(ArmClient client, CsmPublishingCredentialsPoliciesEntityData data) : this(client, data.Id) { HasData = true; _data = data; }
public virtual async Task <ArmOperation <ScmSiteSlotBasicPublishingCredentialsPolicyResource> > CreateOrUpdateAsync(WaitUntil waitUntil, CsmPublishingCredentialsPoliciesEntityData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); using var scope = _scmSiteSlotBasicPublishingCredentialsPolicyWebAppsClientDiagnostics.CreateScope("ScmSiteSlotBasicPublishingCredentialsPolicyResource.CreateOrUpdate"); scope.Start(); try { var response = await _scmSiteSlotBasicPublishingCredentialsPolicyWebAppsRestClient.UpdateScmAllowedSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); var operation = new AppServiceArmOperation <ScmSiteSlotBasicPublishingCredentialsPolicyResource>(Response.FromValue(new ScmSiteSlotBasicPublishingCredentialsPolicyResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }