コード例 #1
0
        public virtual async Task <Response <DatabaseAccountSqlDatabaseContainerThroughputSetting> > GetAsync(CancellationToken cancellationToken = default)
        {
            using var scope = _databaseAccountSqlDatabaseContainerThroughputSettingSqlResourcesClientDiagnostics.CreateScope("DatabaseAccountSqlDatabaseContainerThroughputSetting.Get");
            scope.Start();
            try
            {
                var response = await _databaseAccountSqlDatabaseContainerThroughputSettingSqlResourcesRestClient.GetSqlContainerThroughputAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false);

                if (response.Value == null)
                {
                    throw new RequestFailedException(response.GetRawResponse());
                }
                return(Response.FromValue(new DatabaseAccountSqlDatabaseContainerThroughputSetting(Client, response.Value), response.GetRawResponse()));
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }