Beispiel #1
0
        public virtual Response <EncryptionScopeResource> Update(EncryptionScopeData data, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(data, nameof(data));

            using var scope = _encryptionScopeClientDiagnostics.CreateScope("EncryptionScopeResource.Update");
            scope.Start();
            try
            {
                var response = _encryptionScopeRestClient.Patch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
                return(Response.FromValue(new EncryptionScopeResource(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
Beispiel #2
0
        public virtual Response <EncryptionScope> Update(EncryptionScopeData encryptionScope, CancellationToken cancellationToken = default)
        {
            if (encryptionScope == null)
            {
                throw new ArgumentNullException(nameof(encryptionScope));
            }

            using var scope = _encryptionScopeClientDiagnostics.CreateScope("EncryptionScope.Update");
            scope.Start();
            try
            {
                var response = _encryptionScopeRestClient.Patch(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, encryptionScope, cancellationToken);
                return(Response.FromValue(new EncryptionScope(ArmClient, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }