Box.V2.Managers.BoxLegalHoldPoliciesManager.UpdateLegalHoldPolicyAsync C# (CSharp) Метод

UpdateLegalHoldPolicyAsync() публичный Метод

Update existing Legal Hold Policy. Only name and description can be modified.
public UpdateLegalHoldPolicyAsync ( string legalHoldPolicyId, BoxLegalHoldPolicyRequest updateRequest ) : Task
legalHoldPolicyId string Id of the legal hold policy.
updateRequest Box.V2.Models.BoxLegalHoldPolicyRequest BoxLegalHoldPolicyRequest object.
Результат Task
        public async Task<BoxLegalHoldPolicy> UpdateLegalHoldPolicyAsync(string legalHoldPolicyId, BoxLegalHoldPolicyRequest updateRequest)
        {
            legalHoldPolicyId.ThrowIfNull("legalHoldPolicyId");
            updateRequest.ThrowIfNull("updateRequest");

            BoxRequest request = new BoxRequest(_config.LegalHoldPoliciesEndpointUri, legalHoldPolicyId)
                .Method(RequestMethod.Put)
                .Payload(_converter.Serialize(updateRequest));

            IBoxResponse<BoxLegalHoldPolicy> response = await ToResponseAsync<BoxLegalHoldPolicy>(request).ConfigureAwait(false);

            return response.ResponseObject;
        }